-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
let body = ChatBody {
model: "gpt-3.5-turbo".to_string(),
max_tokens: Some(15),
temperature: Some(0_f32),
top_p: Some(0.5_f32),
n: None,
stream: Some(true), // this argument
stop: None,
presence_penalty: None,
frequency_penalty: None,
logit_bias: None,
user: None,
messages: chat.to_vec(),
};
let mut result = match openai.chat_completion_create(&body) {
Ok(result) => result,
Err(error) => {
send.send(Err(LlmError::APIError(error))).await.unwrap();
return;
}
};results in this error
thread 'smol-1' panicked at /Users/ejohn/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openai_api_rust-0.1.9/src/requests.rs:67:49:
called `Result::unwrap()` on an `Err` value: Custom { kind: InvalidData, error: "Failed to read JSON: expected value at line 1 column 1" }
wangbyby
Metadata
Metadata
Assignees
Labels
No labels