Skip to content

Commit 0eedf1c

Browse files
author
Dongri Jin
authored
Merge pull request #2 from dongri/GPT-4
Add GPT4 models
2 parents 2135748 + 5db42ec commit 0eedf1c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

examples/chat_completion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::env;
66
async fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let client = Client::new(env::var("OPENAI_API_KEY").unwrap().to_string());
88
let req = ChatCompletionRequest {
9-
model: chat_completion::GPT3_5_TURBO.to_string(),
9+
model: chat_completion::GPT4.to_string(),
1010
messages: vec![chat_completion::ChatCompletionMessage {
1111
role: chat_completion::MessageRole::user,
1212
content: String::from("NFTとは?"),

src/v1/chat_completion.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ use crate::v1::common;
44

55
pub const GPT3_5_TURBO: &str = "gpt-3.5-turbo";
66
pub const GPT3_5_TURBO_0301: &str = "gpt-3.5-turbo-0301";
7+
pub const GPT4: &str = "gpt-4";
8+
pub const GPT4_0314: &str = "gpt-4-0314";
9+
pub const GPT4_32K: &str = "gpt-4-32k";
10+
pub const GPT4_32K_0314: &str = "gpt-4-32k-0314";
711

812
#[derive(Debug, Serialize)]
913
pub struct ChatCompletionRequest {

0 commit comments

Comments
 (0)