Skip to content

Commit

Permalink
Merge pull request #2 from dongri/GPT-4
Browse files Browse the repository at this point in the history
Add GPT4 models
  • Loading branch information
Dongri Jin authored Mar 17, 2023
2 parents 2135748 + 5db42ec commit 0eedf1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/chat_completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::env;
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new(env::var("OPENAI_API_KEY").unwrap().to_string());
let req = ChatCompletionRequest {
model: chat_completion::GPT3_5_TURBO.to_string(),
model: chat_completion::GPT4.to_string(),
messages: vec![chat_completion::ChatCompletionMessage {
role: chat_completion::MessageRole::user,
content: String::from("NFTとは?"),
Expand Down
4 changes: 4 additions & 0 deletions src/v1/chat_completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ use crate::v1::common;

pub const GPT3_5_TURBO: &str = "gpt-3.5-turbo";
pub const GPT3_5_TURBO_0301: &str = "gpt-3.5-turbo-0301";
pub const GPT4: &str = "gpt-4";
pub const GPT4_0314: &str = "gpt-4-0314";
pub const GPT4_32K: &str = "gpt-4-32k";
pub const GPT4_32K_0314: &str = "gpt-4-32k-0314";

#[derive(Debug, Serialize)]
pub struct ChatCompletionRequest {
Expand Down

0 comments on commit 0eedf1c

Please sign in to comment.