Skip to content

Commit b3db30a

Browse files
committed
Update vision example since GPT4_VISION_PREVIEW went down
1 parent 597d787 commit b3db30a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/vision.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
use openai_api_rs::v1::api::OpenAIClient;
22
use openai_api_rs::v1::chat_completion::{self, ChatCompletionRequest};
3-
use openai_api_rs::v1::common::GPT4_VISION_PREVIEW;
3+
use openai_api_rs::v1::common::GPT4_O;
44
use std::env;
55

66
#[tokio::main]
77
async fn main() -> Result<(), Box<dyn std::error::Error>> {
88
let client = OpenAIClient::new(env::var("OPENAI_API_KEY").unwrap().to_string());
99

1010
let req = ChatCompletionRequest::new(
11-
GPT4_VISION_PREVIEW.to_string(),
11+
GPT4_O.to_string(),
1212
vec![chat_completion::ChatCompletionMessage {
1313
role: chat_completion::MessageRole::user,
1414
content: chat_completion::Content::ImageUrl(vec![
1515
chat_completion::ImageUrl {
1616
r#type: chat_completion::ContentType::text,
17-
text: Some(String::from("Whats in this image?")),
17+
text: Some(String::from("What's in this image?")),
1818
image_url: None,
1919
},
2020
chat_completion::ImageUrl {

0 commit comments

Comments
 (0)