File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
use openai_api_rs:: v1:: api:: OpenAIClient ;
2
2
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 ;
4
4
use std:: env;
5
5
6
6
#[ tokio:: main]
7
7
async fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
8
8
let client = OpenAIClient :: new ( env:: var ( "OPENAI_API_KEY" ) . unwrap ( ) . to_string ( ) ) ;
9
9
10
10
let req = ChatCompletionRequest :: new (
11
- GPT4_VISION_PREVIEW . to_string ( ) ,
11
+ GPT4_O . to_string ( ) ,
12
12
vec ! [ chat_completion:: ChatCompletionMessage {
13
13
role: chat_completion:: MessageRole :: user,
14
14
content: chat_completion:: Content :: ImageUrl ( vec![
15
15
chat_completion:: ImageUrl {
16
16
r#type: chat_completion:: ContentType :: text,
17
- text: Some ( String :: from( "What’ s in this image?" ) ) ,
17
+ text: Some ( String :: from( "What' s in this image?" ) ) ,
18
18
image_url: None ,
19
19
} ,
20
20
chat_completion:: ImageUrl {
You can’t perform that action at this time.
0 commit comments