We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ca25fc6 + 4a165eb commit 20be8e7Copy full SHA for 20be8e7
src/gpt.rs
@@ -7,15 +7,14 @@ use std::env;
7
use tokio::time::timeout;
8
use openai_api_rs::v1::api::Client;
9
use openai_api_rs::v1::chat_completion::{self, ChatCompletionRequest};
10
-use openai_api_rs::v1::common::GPT3_5_TURBO;
11
12
13
pub async fn call_gpt(prompt: &str, user_text: &str) -> Result<String, Box<dyn Error>> {
14
dotenv().ok();
15
let api_key = env::var("OPEN_AI_API_KEY").expect("OPEN_AI_API_KEY is not set");
16
let client = Client::new(api_key);
17
let req = ChatCompletionRequest::new(
18
- GPT3_5_TURBO.to_string(),
+ "gpt-4o-mini".to_string(),
19
vec![
20
chat_completion::ChatCompletionMessage {
21
role: chat_completion::MessageRole::system,
0 commit comments