@@ -27,7 +27,9 @@ public function create(array $parameters): AssistantResponse
2727 $ payload = Payload::create ('assistants ' , $ parameters );
2828
2929 /** @var Response<array{id: string, object: string, created_at: int, name: ?string, reasoning_effort?: ?string, description: ?string, model: string, instructions: ?string, tools: array<int, array{type: 'code_interpreter'}|array{type: 'file_search'}|array{type: 'function', function: array{description: string, name: string, parameters: array<string, mixed>}}>, tool_resources: array{code_interpreter?: array{file_ids: array<int,string>}, file_search?: array{vector_store_ids: array<int,string>}}, metadata: array<string, string>, temperature: ?float, top_p: ?float, response_format: string|array{type: 'text'|'json_object'}}> $response */
30- $ response = $ this ->transporter ->requestObject ($ payload );
30+ $ response = $ this ->transporter
31+ ->addHeader ('OpenAI-Beta ' , 'assistants=v2 ' )
32+ ->requestObject ($ payload );
3133
3234 return AssistantResponse::from ($ response ->data (), $ response ->meta ());
3335 }
@@ -42,7 +44,9 @@ public function retrieve(string $id): AssistantResponse
4244 $ payload = Payload::retrieve ('assistants ' , $ id );
4345
4446 /** @var Response<array{id: string, object: string, created_at: int, name: ?string, reasoning_effort?: ?string, description: ?string, model: string, instructions: ?string, tools: array<int, array{type: 'code_interpreter'}|array{type: 'file_search'}|array{type: 'function', function: array{description: string, name: string, parameters: array<string, mixed>}}>, tool_resources: array{code_interpreter?: array{file_ids: array<int,string>}, file_search?: array{vector_store_ids: array<int,string>}}, metadata: array<string, string>, temperature: ?float, top_p: ?float, response_format: string|array{type: 'text'|'json_object'}}> $response */
45- $ response = $ this ->transporter ->requestObject ($ payload );
47+ $ response = $ this ->transporter
48+ ->addHeader ('OpenAI-Beta ' , 'assistants=v2 ' )
49+ ->requestObject ($ payload );
4650
4751 return AssistantResponse::from ($ response ->data (), $ response ->meta ());
4852 }
@@ -59,7 +63,9 @@ public function modify(string $id, array $parameters): AssistantResponse
5963 $ payload = Payload::modify ('assistants ' , $ id , $ parameters );
6064
6165 /** @var Response<array{id: string, object: string, created_at: int, name: ?string, reasoning_effort?: ?string, description: ?string, model: string, instructions: ?string, tools: array<int, array{type: 'code_interpreter'}|array{type: 'file_search'}|array{type: 'function', function: array{description: string, name: string, parameters: array<string, mixed>}}>, tool_resources: array{code_interpreter?: array{file_ids: array<int,string>}, file_search?: array{vector_store_ids: array<int,string>}}, metadata: array<string, string>, temperature: ?float, top_p: ?float, response_format: string|array{type: 'text'|'json_object'}}> $response */
62- $ response = $ this ->transporter ->requestObject ($ payload );
66+ $ response = $ this ->transporter
67+ ->addHeader ('OpenAI-Beta ' , 'assistants=v2 ' )
68+ ->requestObject ($ payload );
6369
6470 return AssistantResponse::from ($ response ->data (), $ response ->meta ());
6571 }
@@ -74,7 +80,9 @@ public function delete(string $id): AssistantDeleteResponse
7480 $ payload = Payload::delete ('assistants ' , $ id );
7581
7682 /** @var Response<array{id: string, object: string, deleted: bool}> $response */
77- $ response = $ this ->transporter ->requestObject ($ payload );
83+ $ response = $ this ->transporter
84+ ->addHeader ('OpenAI-Beta ' , 'assistants=v2 ' )
85+ ->requestObject ($ payload );
7886
7987 return AssistantDeleteResponse::from ($ response ->data (), $ response ->meta ());
8088 }
@@ -91,7 +99,9 @@ public function list(array $parameters = []): AssistantListResponse
9199 $ payload = Payload::list ('assistants ' , $ parameters );
92100
93101 /** @var Response<array{object: string, data: array<int, array{id: string, object: string, created_at: int, name: ?string, reasoning_effort?: ?string, description: ?string, model: string, instructions: ?string, tools: array<int, array{type: 'code_interpreter'}|array{type: 'file_search'}|array{type: 'function', function: array{description: string, name: string, parameters: array<string, mixed>}}>, tool_resources: array{code_interpreter?: array{file_ids: array<int,string>}, file_search?: array{vector_store_ids: array<int,string>}}, metadata: array<string, string>, temperature: ?float, top_p: ?float, response_format: string|array{type: 'text'|'json_object'}}>, first_id: ?string, last_id: ?string, has_more: bool}> $response */
94- $ response = $ this ->transporter ->requestObject ($ payload );
102+ $ response = $ this ->transporter
103+ ->addHeader ('OpenAI-Beta ' , 'assistants=v2 ' )
104+ ->requestObject ($ payload );
95105
96106 return AssistantListResponse::from ($ response ->data (), $ response ->meta ());
97107 }
0 commit comments