mirror of
https://github.com/mii443/openai-api-rs.git
synced 2025-08-22 23:25:39 +00:00
Fix function call type
This commit is contained in:
@ -46,7 +46,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
required: Some(vec![String::from("coin")]),
|
||||
},
|
||||
}]),
|
||||
function_call: Some(FunctionCallType::auto), //Some(FunctionCallType::Function { name: "test".to_string() })
|
||||
function_call: Some(FunctionCallType::Auto), // Some(FunctionCallType::Function { name: "test".to_string() }),
|
||||
temperature: None,
|
||||
top_p: None,
|
||||
n: None,
|
||||
@ -59,6 +59,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
user: None,
|
||||
};
|
||||
|
||||
// debug reuqest json
|
||||
// let serialized = serde_json::to_string(&req).unwrap();
|
||||
// println!("{}", serialized);
|
||||
|
||||
let result = client.chat_completion(req)?;
|
||||
|
||||
match result.choices[0].finish_reason {
|
||||
|
Reference in New Issue
Block a user