openapi_openai 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (766) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +274 -51
  4. data/docs/AssistantFileObject.md +24 -0
  5. data/docs/AssistantObject.md +36 -0
  6. data/docs/AssistantObjectToolsInner.md +51 -0
  7. data/docs/AssistantStreamEvent.md +57 -0
  8. data/docs/AssistantToolsCode.md +18 -0
  9. data/docs/AssistantToolsFunction.md +20 -0
  10. data/docs/AssistantToolsRetrieval.md +18 -0
  11. data/docs/AssistantsApi.md +2017 -0
  12. data/docs/AssistantsApiNamedToolChoice.md +20 -0
  13. data/docs/AssistantsApiResponseFormat.md +18 -0
  14. data/docs/AssistantsApiResponseFormatOption.md +49 -0
  15. data/docs/AssistantsApiToolChoiceOption.md +49 -0
  16. data/docs/AudioApi.md +235 -0
  17. data/docs/ChatApi.md +75 -0
  18. data/docs/{CreateChatCompletionRequestFunctionCallOneOf.md → ChatCompletionFunctionCallOption.md} +2 -2
  19. data/docs/ChatCompletionFunctions.md +3 -3
  20. data/docs/ChatCompletionMessageToolCall.md +22 -0
  21. data/docs/ChatCompletionMessageToolCallChunk.md +24 -0
  22. data/docs/{ChatCompletionRequestMessageFunctionCall.md → ChatCompletionMessageToolCallChunkFunction.md} +2 -2
  23. data/docs/ChatCompletionMessageToolCallFunction.md +20 -0
  24. data/docs/ChatCompletionNamedToolChoice.md +20 -0
  25. data/docs/ChatCompletionNamedToolChoiceFunction.md +18 -0
  26. data/docs/ChatCompletionRequestAssistantMessage.md +26 -0
  27. data/docs/ChatCompletionRequestAssistantMessageFunctionCall.md +20 -0
  28. data/docs/ChatCompletionRequestFunctionMessage.md +22 -0
  29. data/docs/ChatCompletionRequestMessage.md +45 -14
  30. data/docs/ChatCompletionRequestMessageContentPart.md +49 -0
  31. data/docs/ChatCompletionRequestMessageContentPartImage.md +20 -0
  32. data/docs/ChatCompletionRequestMessageContentPartImageImageUrl.md +20 -0
  33. data/docs/ChatCompletionRequestMessageContentPartText.md +20 -0
  34. data/docs/ChatCompletionRequestSystemMessage.md +22 -0
  35. data/docs/ChatCompletionRequestToolMessage.md +22 -0
  36. data/docs/ChatCompletionRequestUserMessage.md +22 -0
  37. data/docs/ChatCompletionRequestUserMessageContent.md +49 -0
  38. data/docs/ChatCompletionResponseMessage.md +5 -3
  39. data/docs/ChatCompletionRole.md +15 -0
  40. data/docs/ChatCompletionStreamResponseDelta.md +6 -4
  41. data/docs/ChatCompletionStreamResponseDeltaFunctionCall.md +20 -0
  42. data/docs/ChatCompletionTokenLogprob.md +24 -0
  43. data/docs/ChatCompletionTokenLogprobTopLogprobsInner.md +22 -0
  44. data/docs/ChatCompletionTool.md +20 -0
  45. data/docs/ChatCompletionToolChoiceOption.md +49 -0
  46. data/docs/CompletionUsage.md +22 -0
  47. data/docs/CompletionsApi.md +75 -0
  48. data/docs/CreateAssistantFileRequest.md +18 -0
  49. data/docs/CreateAssistantRequest.md +30 -0
  50. data/docs/CreateAssistantRequestModel.md +15 -0
  51. data/docs/CreateChatCompletionFunctionResponse.md +30 -0
  52. data/docs/CreateChatCompletionFunctionResponseChoicesInner.md +22 -0
  53. data/docs/CreateChatCompletionRequest.md +33 -21
  54. data/docs/CreateChatCompletionRequestFunctionCall.md +3 -3
  55. data/docs/CreateChatCompletionRequestModel.md +5 -37
  56. data/docs/CreateChatCompletionRequestResponseFormat.md +18 -0
  57. data/docs/CreateChatCompletionResponse.md +10 -8
  58. data/docs/CreateChatCompletionResponseChoicesInner.md +6 -4
  59. data/docs/CreateChatCompletionResponseChoicesInnerLogprobs.md +18 -0
  60. data/docs/CreateChatCompletionStreamResponse.md +9 -7
  61. data/docs/CreateChatCompletionStreamResponseChoicesInner.md +7 -5
  62. data/docs/CreateCompletionRequest.md +23 -21
  63. data/docs/CreateCompletionRequestModel.md +5 -37
  64. data/docs/CreateCompletionResponse.md +10 -8
  65. data/docs/CreateCompletionResponseChoicesInner.md +4 -4
  66. data/docs/CreateCompletionResponseChoicesInnerLogprobs.md +6 -6
  67. data/docs/CreateEmbeddingRequest.md +6 -2
  68. data/docs/CreateEmbeddingRequestModel.md +5 -37
  69. data/docs/CreateEmbeddingResponse.md +5 -5
  70. data/docs/CreateEmbeddingResponseUsage.md +2 -2
  71. data/docs/CreateFineTuningJobRequest.md +30 -0
  72. data/docs/CreateFineTuningJobRequestHyperparameters.md +22 -0
  73. data/docs/CreateFineTuningJobRequestHyperparametersBatchSize.md +49 -0
  74. data/docs/CreateFineTuningJobRequestHyperparametersLearningRateMultiplier.md +49 -0
  75. data/docs/CreateFineTuningJobRequestHyperparametersNEpochs.md +49 -0
  76. data/docs/CreateFineTuningJobRequestIntegrationsInner.md +20 -0
  77. data/docs/{CreateFineTuneRequestModel.md → CreateFineTuningJobRequestIntegrationsInnerType.md} +4 -4
  78. data/docs/CreateFineTuningJobRequestIntegrationsInnerWandb.md +24 -0
  79. data/docs/CreateFineTuningJobRequestModel.md +15 -0
  80. data/docs/CreateImageEditRequestModel.md +15 -0
  81. data/docs/CreateImageRequest.md +11 -5
  82. data/docs/CreateImageRequestModel.md +15 -0
  83. data/docs/CreateMessageRequest.md +24 -0
  84. data/docs/CreateModerationRequestModel.md +5 -37
  85. data/docs/CreateModerationResponse.md +3 -3
  86. data/docs/CreateModerationResponseResultsInner.md +1 -1
  87. data/docs/CreateModerationResponseResultsInnerCategories.md +15 -7
  88. data/docs/CreateModerationResponseResultsInnerCategoryScores.md +15 -7
  89. data/docs/CreateRunRequest.md +44 -0
  90. data/docs/CreateRunRequestModel.md +15 -0
  91. data/docs/CreateSpeechRequest.md +26 -0
  92. data/docs/CreateSpeechRequestModel.md +15 -0
  93. data/docs/CreateThreadAndRunRequest.md +42 -0
  94. data/docs/CreateThreadAndRunRequestToolsInner.md +51 -0
  95. data/docs/CreateThreadRequest.md +20 -0
  96. data/docs/CreateTranscription200Response.md +49 -0
  97. data/docs/CreateTranscriptionRequestModel.md +5 -37
  98. data/docs/CreateTranscriptionResponseJson.md +18 -0
  99. data/docs/CreateTranscriptionResponseVerboseJson.md +26 -0
  100. data/docs/CreateTranslation200Response.md +49 -0
  101. data/docs/{CreateTranscriptionResponse.md → CreateTranslationResponseJson.md} +2 -2
  102. data/docs/CreateTranslationResponseVerboseJson.md +24 -0
  103. data/docs/DeleteAssistantFileResponse.md +22 -0
  104. data/docs/DeleteAssistantResponse.md +22 -0
  105. data/docs/DeleteMessageResponse.md +22 -0
  106. data/docs/DeleteModelResponse.md +3 -3
  107. data/docs/DeleteThreadResponse.md +22 -0
  108. data/docs/DoneEvent.md +20 -0
  109. data/docs/Embedding.md +22 -0
  110. data/docs/EmbeddingsApi.md +75 -0
  111. data/docs/Error.md +4 -4
  112. data/docs/ErrorEvent.md +20 -0
  113. data/docs/FilesApi.md +351 -0
  114. data/docs/FineTuningApi.md +431 -0
  115. data/docs/FineTuningIntegration.md +20 -0
  116. data/docs/FineTuningJob.md +48 -0
  117. data/docs/FineTuningJobCheckpoint.md +30 -0
  118. data/docs/FineTuningJobCheckpointMetrics.md +30 -0
  119. data/docs/FineTuningJobError.md +22 -0
  120. data/docs/{FineTuneEvent.md → FineTuningJobEvent.md} +7 -5
  121. data/docs/FineTuningJobHyperparameters.md +18 -0
  122. data/docs/FineTuningJobHyperparametersNEpochs.md +49 -0
  123. data/docs/FineTuningJobIntegrationsInner.md +47 -0
  124. data/docs/FunctionObject.md +22 -0
  125. data/docs/Image.md +22 -0
  126. data/docs/ImagesApi.md +239 -0
  127. data/docs/ImagesResponse.md +1 -1
  128. data/docs/ListAssistantFilesResponse.md +26 -0
  129. data/docs/ListAssistantsResponse.md +26 -0
  130. data/docs/ListFilesResponse.md +3 -3
  131. data/docs/ListFineTuningJobCheckpointsResponse.md +26 -0
  132. data/docs/ListFineTuningJobEventsResponse.md +20 -0
  133. data/docs/ListMessageFilesResponse.md +26 -0
  134. data/docs/ListMessagesResponse.md +26 -0
  135. data/docs/ListPaginatedFineTuningJobsResponse.md +22 -0
  136. data/docs/ListRunStepsResponse.md +26 -0
  137. data/docs/ListRunsResponse.md +26 -0
  138. data/docs/ListThreadsResponse.md +26 -0
  139. data/docs/MessageContentImageFileObject.md +20 -0
  140. data/docs/MessageContentImageFileObjectImageFile.md +18 -0
  141. data/docs/MessageContentTextAnnotationsFileCitationObject.md +26 -0
  142. data/docs/MessageContentTextAnnotationsFileCitationObjectFileCitation.md +20 -0
  143. data/docs/MessageContentTextAnnotationsFilePathObject.md +26 -0
  144. data/docs/MessageContentTextAnnotationsFilePathObjectFilePath.md +18 -0
  145. data/docs/MessageContentTextObject.md +20 -0
  146. data/docs/MessageContentTextObjectText.md +20 -0
  147. data/docs/MessageContentTextObjectTextAnnotationsInner.md +49 -0
  148. data/docs/MessageDeltaContentImageFileObject.md +22 -0
  149. data/docs/MessageDeltaContentImageFileObjectImageFile.md +18 -0
  150. data/docs/MessageDeltaContentTextAnnotationsFileCitationObject.md +28 -0
  151. data/docs/MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.md +20 -0
  152. data/docs/MessageDeltaContentTextAnnotationsFilePathObject.md +28 -0
  153. data/docs/MessageDeltaContentTextAnnotationsFilePathObjectFilePath.md +18 -0
  154. data/docs/MessageDeltaContentTextObject.md +22 -0
  155. data/docs/MessageDeltaContentTextObjectText.md +20 -0
  156. data/docs/MessageDeltaContentTextObjectTextAnnotationsInner.md +49 -0
  157. data/docs/MessageDeltaObject.md +22 -0
  158. data/docs/MessageDeltaObjectDelta.md +22 -0
  159. data/docs/MessageDeltaObjectDeltaContentInner.md +49 -0
  160. data/docs/MessageFileObject.md +24 -0
  161. data/docs/MessageObject.md +44 -0
  162. data/docs/MessageObjectContentInner.md +49 -0
  163. data/docs/MessageObjectIncompleteDetails.md +18 -0
  164. data/docs/MessageStreamEvent.md +55 -0
  165. data/docs/MessageStreamEventOneOf.md +20 -0
  166. data/docs/MessageStreamEventOneOf1.md +20 -0
  167. data/docs/MessageStreamEventOneOf2.md +20 -0
  168. data/docs/MessageStreamEventOneOf3.md +20 -0
  169. data/docs/MessageStreamEventOneOf4.md +20 -0
  170. data/docs/Model.md +5 -5
  171. data/docs/ModelsApi.md +208 -0
  172. data/docs/ModerationsApi.md +75 -0
  173. data/docs/ModifyAssistantRequest.md +30 -0
  174. data/docs/ModifyMessageRequest.md +18 -0
  175. data/docs/ModifyRunRequest.md +18 -0
  176. data/docs/ModifyThreadRequest.md +18 -0
  177. data/docs/OpenAIFile.md +9 -9
  178. data/docs/RunCompletionUsage.md +22 -0
  179. data/docs/RunObject.md +68 -0
  180. data/docs/RunObjectIncompleteDetails.md +18 -0
  181. data/docs/RunObjectLastError.md +20 -0
  182. data/docs/RunObjectRequiredAction.md +20 -0
  183. data/docs/RunObjectRequiredActionSubmitToolOutputs.md +18 -0
  184. data/docs/RunStepCompletionUsage.md +22 -0
  185. data/docs/RunStepDeltaObject.md +22 -0
  186. data/docs/RunStepDeltaObjectDelta.md +18 -0
  187. data/docs/RunStepDeltaObjectDeltaStepDetails.md +49 -0
  188. data/docs/RunStepDeltaStepDetailsMessageCreationObject.md +20 -0
  189. data/docs/RunStepDeltaStepDetailsMessageCreationObjectMessageCreation.md +18 -0
  190. data/docs/RunStepDeltaStepDetailsToolCallsCodeObject.md +24 -0
  191. data/docs/RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.md +20 -0
  192. data/docs/RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsInner.md +49 -0
  193. data/docs/RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.md +22 -0
  194. data/docs/RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.md +18 -0
  195. data/docs/RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.md +22 -0
  196. data/docs/RunStepDeltaStepDetailsToolCallsFunctionObject.md +24 -0
  197. data/docs/RunStepDeltaStepDetailsToolCallsFunctionObjectFunction.md +22 -0
  198. data/docs/RunStepDeltaStepDetailsToolCallsObject.md +20 -0
  199. data/docs/RunStepDeltaStepDetailsToolCallsObjectToolCallsInner.md +51 -0
  200. data/docs/RunStepDeltaStepDetailsToolCallsRetrievalObject.md +24 -0
  201. data/docs/RunStepDetailsMessageCreationObject.md +20 -0
  202. data/docs/RunStepDetailsMessageCreationObjectMessageCreation.md +18 -0
  203. data/docs/RunStepDetailsToolCallsCodeObject.md +22 -0
  204. data/docs/RunStepDetailsToolCallsCodeObjectCodeInterpreter.md +20 -0
  205. data/docs/RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsInner.md +49 -0
  206. data/docs/RunStepDetailsToolCallsCodeOutputImageObject.md +20 -0
  207. data/docs/RunStepDetailsToolCallsCodeOutputImageObjectImage.md +18 -0
  208. data/docs/RunStepDetailsToolCallsCodeOutputLogsObject.md +20 -0
  209. data/docs/RunStepDetailsToolCallsFunctionObject.md +22 -0
  210. data/docs/RunStepDetailsToolCallsFunctionObjectFunction.md +22 -0
  211. data/docs/RunStepDetailsToolCallsObject.md +20 -0
  212. data/docs/RunStepDetailsToolCallsObjectToolCallsInner.md +51 -0
  213. data/docs/RunStepDetailsToolCallsRetrievalObject.md +22 -0
  214. data/docs/RunStepObject.md +48 -0
  215. data/docs/RunStepObjectLastError.md +20 -0
  216. data/docs/RunStepObjectStepDetails.md +49 -0
  217. data/docs/RunStepStreamEvent.md +59 -0
  218. data/docs/RunStepStreamEventOneOf.md +20 -0
  219. data/docs/RunStepStreamEventOneOf1.md +20 -0
  220. data/docs/RunStepStreamEventOneOf2.md +20 -0
  221. data/docs/RunStepStreamEventOneOf3.md +20 -0
  222. data/docs/RunStepStreamEventOneOf4.md +20 -0
  223. data/docs/RunStepStreamEventOneOf5.md +20 -0
  224. data/docs/RunStepStreamEventOneOf6.md +20 -0
  225. data/docs/RunStreamEvent.md +63 -0
  226. data/docs/RunStreamEventOneOf.md +20 -0
  227. data/docs/RunStreamEventOneOf1.md +20 -0
  228. data/docs/RunStreamEventOneOf2.md +20 -0
  229. data/docs/RunStreamEventOneOf3.md +20 -0
  230. data/docs/RunStreamEventOneOf4.md +20 -0
  231. data/docs/RunStreamEventOneOf5.md +20 -0
  232. data/docs/RunStreamEventOneOf6.md +20 -0
  233. data/docs/RunStreamEventOneOf7.md +20 -0
  234. data/docs/RunStreamEventOneOf8.md +20 -0
  235. data/docs/RunToolCallObject.md +22 -0
  236. data/docs/RunToolCallObjectFunction.md +20 -0
  237. data/docs/SubmitToolOutputsRunRequest.md +20 -0
  238. data/docs/SubmitToolOutputsRunRequestToolOutputsInner.md +20 -0
  239. data/docs/ThreadObject.md +24 -0
  240. data/docs/{CreateEditRequestModel.md → ThreadStreamEvent.md} +7 -7
  241. data/docs/ThreadStreamEventOneOf.md +20 -0
  242. data/docs/TranscriptionSegment.md +36 -0
  243. data/docs/TranscriptionWord.md +22 -0
  244. data/docs/TruncationObject.md +20 -0
  245. data/lib/openapi_openai/api/assistants_api.rb +2006 -0
  246. data/lib/openapi_openai/api/audio_api.rb +268 -0
  247. data/lib/openapi_openai/api/chat_api.rb +88 -0
  248. data/lib/openapi_openai/api/completions_api.rb +88 -0
  249. data/lib/openapi_openai/api/embeddings_api.rb +88 -0
  250. data/lib/openapi_openai/api/files_api.rb +342 -0
  251. data/lib/openapi_openai/api/fine_tuning_api.rb +405 -0
  252. data/lib/openapi_openai/api/images_api.rb +294 -0
  253. data/lib/openapi_openai/api/models_api.rb +199 -0
  254. data/lib/openapi_openai/api/moderations_api.rb +88 -0
  255. data/lib/openapi_openai/api_client.rb +2 -1
  256. data/lib/openapi_openai/api_error.rb +1 -1
  257. data/lib/openapi_openai/configuration.rb +8 -1
  258. data/lib/openapi_openai/models/assistant_file_object.rb +308 -0
  259. data/lib/openapi_openai/models/assistant_object.rb +481 -0
  260. data/lib/openapi_openai/models/assistant_object_tools_inner.rb +106 -0
  261. data/lib/openapi_openai/models/assistant_stream_event.rb +110 -0
  262. data/lib/openapi_openai/models/assistant_tools_code.rb +256 -0
  263. data/lib/openapi_openai/models/assistant_tools_function.rb +272 -0
  264. data/lib/openapi_openai/models/assistant_tools_retrieval.rb +256 -0
  265. data/lib/openapi_openai/models/assistants_api_named_tool_choice.rb +266 -0
  266. data/lib/openapi_openai/models/assistants_api_response_format.rb +252 -0
  267. data/lib/openapi_openai/models/assistants_api_response_format_option.rb +106 -0
  268. data/lib/openapi_openai/models/assistants_api_tool_choice_option.rb +106 -0
  269. data/lib/openapi_openai/models/chat_completion_function_call_option.rb +223 -0
  270. data/lib/openapi_openai/models/chat_completion_functions.rb +13 -13
  271. data/lib/openapi_openai/models/chat_completion_message_tool_call.rb +289 -0
  272. data/lib/openapi_openai/models/chat_completion_message_tool_call_chunk.rb +284 -0
  273. data/lib/openapi_openai/models/{chat_completion_request_message_function_call.rb → chat_completion_message_tool_call_chunk_function.rb} +4 -5
  274. data/lib/openapi_openai/models/chat_completion_message_tool_call_function.rb +240 -0
  275. data/lib/openapi_openai/models/chat_completion_named_tool_choice.rb +273 -0
  276. data/lib/openapi_openai/models/{create_chat_completion_request_function_call_one_of.rb → chat_completion_named_tool_choice_function.rb} +4 -4
  277. data/lib/openapi_openai/models/chat_completion_request_assistant_message.rb +298 -0
  278. data/lib/openapi_openai/models/chat_completion_request_assistant_message_function_call.rb +240 -0
  279. data/lib/openapi_openai/models/chat_completion_request_function_message.rb +286 -0
  280. data/lib/openapi_openai/models/chat_completion_request_message.rb +78 -255
  281. data/lib/openapi_openai/models/chat_completion_request_message_content_part.rb +105 -0
  282. data/lib/openapi_openai/models/chat_completion_request_message_content_part_image.rb +272 -0
  283. data/lib/openapi_openai/models/chat_completion_request_message_content_part_image_image_url.rb +268 -0
  284. data/lib/openapi_openai/models/chat_completion_request_message_content_part_text.rb +273 -0
  285. data/lib/openapi_openai/models/chat_completion_request_system_message.rb +283 -0
  286. data/lib/openapi_openai/models/chat_completion_request_tool_message.rb +290 -0
  287. data/lib/openapi_openai/models/chat_completion_request_user_message.rb +282 -0
  288. data/lib/openapi_openai/models/{create_fine_tune_request_model.rb → chat_completion_request_user_message_content.rb} +4 -3
  289. data/lib/openapi_openai/models/chat_completion_response_message.rb +30 -15
  290. data/lib/openapi_openai/models/chat_completion_role.rb +43 -0
  291. data/lib/openapi_openai/models/chat_completion_stream_response_delta.rb +29 -17
  292. data/lib/openapi_openai/models/chat_completion_stream_response_delta_function_call.rb +226 -0
  293. data/lib/openapi_openai/models/chat_completion_token_logprob.rb +273 -0
  294. data/lib/openapi_openai/models/chat_completion_token_logprob_top_logprobs_inner.rb +254 -0
  295. data/lib/openapi_openai/models/chat_completion_tool.rb +272 -0
  296. data/lib/openapi_openai/models/chat_completion_tool_choice_option.rb +106 -0
  297. data/lib/openapi_openai/models/{create_completion_response_usage.rb → completion_usage.rb} +25 -21
  298. data/lib/openapi_openai/models/create_assistant_file_request.rb +222 -0
  299. data/lib/openapi_openai/models/create_assistant_request.rb +372 -0
  300. data/lib/openapi_openai/models/create_assistant_request_model.rb +104 -0
  301. data/lib/openapi_openai/models/create_chat_completion_function_response.rb +346 -0
  302. data/lib/openapi_openai/models/create_chat_completion_function_response_choices_inner.rb +289 -0
  303. data/lib/openapi_openai/models/create_chat_completion_request.rb +277 -152
  304. data/lib/openapi_openai/models/create_chat_completion_request_function_call.rb +3 -3
  305. data/lib/openapi_openai/models/create_chat_completion_request_model.rb +8 -9
  306. data/lib/openapi_openai/models/create_chat_completion_request_response_format.rb +252 -0
  307. data/lib/openapi_openai/models/create_chat_completion_request_stop.rb +1 -1
  308. data/lib/openapi_openai/models/create_chat_completion_response.rb +75 -25
  309. data/lib/openapi_openai/models/create_chat_completion_response_choices_inner.rb +45 -10
  310. data/lib/openapi_openai/models/create_chat_completion_response_choices_inner_logprobs.rb +221 -0
  311. data/lib/openapi_openai/models/create_chat_completion_stream_response.rb +74 -24
  312. data/lib/openapi_openai/models/create_chat_completion_stream_response_choices_inner.rb +45 -16
  313. data/lib/openapi_openai/models/create_completion_request.rb +219 -182
  314. data/lib/openapi_openai/models/create_completion_request_model.rb +8 -9
  315. data/lib/openapi_openai/models/create_completion_request_prompt.rb +1 -1
  316. data/lib/openapi_openai/models/create_completion_request_stop.rb +1 -1
  317. data/lib/openapi_openai/models/create_completion_response.rb +75 -25
  318. data/lib/openapi_openai/models/create_completion_response_choices_inner.rb +25 -24
  319. data/lib/openapi_openai/models/create_completion_response_choices_inner_logprobs.rb +23 -23
  320. data/lib/openapi_openai/models/create_embedding_request.rb +87 -12
  321. data/lib/openapi_openai/models/create_embedding_request_input.rb +2 -2
  322. data/lib/openapi_openai/models/create_embedding_request_model.rb +8 -9
  323. data/lib/openapi_openai/models/create_embedding_response.rb +61 -24
  324. data/lib/openapi_openai/models/create_embedding_response_usage.rb +4 -1
  325. data/lib/openapi_openai/models/{create_fine_tune_request.rb → create_fine_tuning_job_request.rb} +78 -111
  326. data/lib/openapi_openai/models/create_fine_tuning_job_request_hyperparameters.rb +233 -0
  327. data/lib/openapi_openai/models/create_fine_tuning_job_request_hyperparameters_batch_size.rb +106 -0
  328. data/lib/openapi_openai/models/create_fine_tuning_job_request_hyperparameters_learning_rate_multiplier.rb +106 -0
  329. data/lib/openapi_openai/models/create_fine_tuning_job_request_hyperparameters_n_epochs.rb +106 -0
  330. data/lib/openapi_openai/models/{list_fine_tunes_response.rb → create_fine_tuning_job_request_integrations_inner.rb} +25 -27
  331. data/lib/openapi_openai/models/create_fine_tuning_job_request_integrations_inner_type.rb +105 -0
  332. data/lib/openapi_openai/models/create_fine_tuning_job_request_integrations_inner_wandb.rb +257 -0
  333. data/lib/openapi_openai/models/create_fine_tuning_job_request_model.rb +104 -0
  334. data/lib/openapi_openai/models/create_image_edit_request_model.rb +104 -0
  335. data/lib/openapi_openai/models/create_image_request.rb +81 -22
  336. data/lib/openapi_openai/models/create_image_request_model.rb +104 -0
  337. data/lib/openapi_openai/models/create_message_request.rb +352 -0
  338. data/lib/openapi_openai/models/create_moderation_request.rb +1 -1
  339. data/lib/openapi_openai/models/create_moderation_request_input.rb +1 -1
  340. data/lib/openapi_openai/models/create_moderation_request_model.rb +8 -9
  341. data/lib/openapi_openai/models/create_moderation_response.rb +5 -1
  342. data/lib/openapi_openai/models/create_moderation_response_results_inner.rb +2 -1
  343. data/lib/openapi_openai/models/create_moderation_response_results_inner_categories.rb +78 -2
  344. data/lib/openapi_openai/models/create_moderation_response_results_inner_category_scores.rb +78 -2
  345. data/lib/openapi_openai/models/create_run_request.rb +433 -0
  346. data/lib/openapi_openai/models/create_run_request_model.rb +104 -0
  347. data/lib/openapi_openai/models/{create_edit_request.rb → create_speech_request.rb} +105 -95
  348. data/lib/openapi_openai/models/create_speech_request_model.rb +104 -0
  349. data/lib/openapi_openai/models/create_thread_and_run_request.rb +418 -0
  350. data/lib/openapi_openai/models/create_thread_and_run_request_tools_inner.rb +106 -0
  351. data/lib/openapi_openai/models/{list_fine_tune_events_response.rb → create_thread_request.rb} +22 -33
  352. data/lib/openapi_openai/models/create_transcription200_response.rb +105 -0
  353. data/lib/openapi_openai/models/create_transcription_request_model.rb +9 -10
  354. data/lib/openapi_openai/models/{create_transcription_response.rb → create_transcription_response_json.rb} +6 -4
  355. data/lib/openapi_openai/models/create_transcription_response_verbose_json.rb +281 -0
  356. data/lib/openapi_openai/models/create_translation200_response.rb +105 -0
  357. data/lib/openapi_openai/models/{create_translation_response.rb → create_translation_response_json.rb} +4 -4
  358. data/lib/openapi_openai/models/create_translation_response_verbose_json.rb +268 -0
  359. data/lib/openapi_openai/models/delete_assistant_file_response.rb +288 -0
  360. data/lib/openapi_openai/models/delete_assistant_response.rb +287 -0
  361. data/lib/openapi_openai/models/delete_file_response.rb +35 -1
  362. data/lib/openapi_openai/models/delete_message_response.rb +287 -0
  363. data/lib/openapi_openai/models/delete_model_response.rb +21 -21
  364. data/lib/openapi_openai/models/delete_thread_response.rb +287 -0
  365. data/lib/openapi_openai/models/done_event.rb +284 -0
  366. data/lib/openapi_openai/models/embedding.rb +293 -0
  367. data/lib/openapi_openai/models/error.rb +22 -22
  368. data/lib/openapi_openai/models/error_event.rb +272 -0
  369. data/lib/openapi_openai/models/error_response.rb +1 -1
  370. data/lib/openapi_openai/models/fine_tuning_integration.rb +272 -0
  371. data/lib/openapi_openai/models/fine_tuning_job.rb +515 -0
  372. data/lib/openapi_openai/models/{fine_tune.rb → fine_tuning_job_checkpoint.rb} +94 -146
  373. data/lib/openapi_openai/models/fine_tuning_job_checkpoint_metrics.rb +269 -0
  374. data/lib/openapi_openai/models/{fine_tune_event.rb → fine_tuning_job_error.rb} +34 -50
  375. data/lib/openapi_openai/models/fine_tuning_job_event.rb +332 -0
  376. data/lib/openapi_openai/models/fine_tuning_job_hyperparameters.rb +222 -0
  377. data/lib/openapi_openai/models/fine_tuning_job_hyperparameters_n_epochs.rb +106 -0
  378. data/lib/openapi_openai/models/{create_edit_request_model.rb → fine_tuning_job_integrations_inner.rb} +3 -4
  379. data/lib/openapi_openai/models/function_object.rb +244 -0
  380. data/lib/openapi_openai/models/image.rb +236 -0
  381. data/lib/openapi_openai/models/images_response.rb +2 -2
  382. data/lib/openapi_openai/models/list_assistant_files_response.rb +287 -0
  383. data/lib/openapi_openai/models/list_assistants_response.rb +287 -0
  384. data/lib/openapi_openai/models/list_files_response.rb +54 -20
  385. data/lib/openapi_openai/models/list_fine_tuning_job_checkpoints_response.rb +309 -0
  386. data/lib/openapi_openai/models/{create_edit_response.rb → list_fine_tuning_job_events_response.rb} +57 -55
  387. data/lib/openapi_openai/models/list_message_files_response.rb +287 -0
  388. data/lib/openapi_openai/models/list_messages_response.rb +287 -0
  389. data/lib/openapi_openai/models/list_models_response.rb +35 -1
  390. data/lib/openapi_openai/models/list_paginated_fine_tuning_jobs_response.rb +289 -0
  391. data/lib/openapi_openai/models/list_run_steps_response.rb +287 -0
  392. data/lib/openapi_openai/models/list_runs_response.rb +287 -0
  393. data/lib/openapi_openai/models/list_threads_response.rb +287 -0
  394. data/lib/openapi_openai/models/message_content_image_file_object.rb +273 -0
  395. data/lib/openapi_openai/models/message_content_image_file_object_image_file.rb +222 -0
  396. data/lib/openapi_openai/models/message_content_text_annotations_file_citation_object.rb +360 -0
  397. data/lib/openapi_openai/models/message_content_text_annotations_file_citation_object_file_citation.rb +239 -0
  398. data/lib/openapi_openai/models/message_content_text_annotations_file_path_object.rb +360 -0
  399. data/lib/openapi_openai/models/message_content_text_annotations_file_path_object_file_path.rb +222 -0
  400. data/lib/openapi_openai/models/message_content_text_object.rb +273 -0
  401. data/lib/openapi_openai/models/message_content_text_object_text.rb +240 -0
  402. data/lib/openapi_openai/models/message_content_text_object_text_annotations_inner.rb +105 -0
  403. data/lib/openapi_openai/models/message_delta_content_image_file_object.rb +283 -0
  404. data/lib/openapi_openai/models/message_delta_content_image_file_object_image_file.rb +215 -0
  405. data/lib/openapi_openai/models/message_delta_content_text_annotations_file_citation_object.rb +349 -0
  406. data/lib/openapi_openai/models/message_delta_content_text_annotations_file_citation_object_file_citation.rb +225 -0
  407. data/lib/openapi_openai/models/message_delta_content_text_annotations_file_path_object.rb +349 -0
  408. data/lib/openapi_openai/models/message_delta_content_text_annotations_file_path_object_file_path.rb +215 -0
  409. data/lib/openapi_openai/models/{create_edit_response_choices_inner.rb → message_delta_content_text_object.rb} +42 -35
  410. data/lib/openapi_openai/models/message_delta_content_text_object_text.rb +226 -0
  411. data/lib/openapi_openai/models/message_delta_content_text_object_text_annotations_inner.rb +105 -0
  412. data/lib/openapi_openai/models/message_delta_object.rb +290 -0
  413. data/lib/openapi_openai/models/message_delta_object_delta.rb +293 -0
  414. data/lib/openapi_openai/models/message_delta_object_delta_content_inner.rb +105 -0
  415. data/lib/openapi_openai/models/message_file_object.rb +308 -0
  416. data/lib/openapi_openai/models/message_object.rb +500 -0
  417. data/lib/openapi_openai/models/message_object_content_inner.rb +105 -0
  418. data/lib/openapi_openai/models/message_object_incomplete_details.rb +257 -0
  419. data/lib/openapi_openai/models/message_stream_event.rb +108 -0
  420. data/lib/openapi_openai/models/message_stream_event_one_of.rb +272 -0
  421. data/lib/openapi_openai/models/message_stream_event_one_of1.rb +272 -0
  422. data/lib/openapi_openai/models/message_stream_event_one_of2.rb +272 -0
  423. data/lib/openapi_openai/models/message_stream_event_one_of3.rb +272 -0
  424. data/lib/openapi_openai/models/message_stream_event_one_of4.rb +272 -0
  425. data/lib/openapi_openai/models/model.rb +57 -18
  426. data/lib/openapi_openai/models/modify_assistant_request.rb +365 -0
  427. data/lib/openapi_openai/models/modify_message_request.rb +216 -0
  428. data/lib/openapi_openai/models/modify_run_request.rb +216 -0
  429. data/lib/openapi_openai/models/modify_thread_request.rb +216 -0
  430. data/lib/openapi_openai/models/open_ai_file.rb +93 -20
  431. data/lib/openapi_openai/models/run_completion_usage.rb +257 -0
  432. data/lib/openapi_openai/models/run_object.rb +686 -0
  433. data/lib/openapi_openai/models/run_object_incomplete_details.rb +250 -0
  434. data/lib/openapi_openai/models/run_object_last_error.rb +274 -0
  435. data/lib/openapi_openai/models/run_object_required_action.rb +273 -0
  436. data/lib/openapi_openai/models/run_object_required_action_submit_tool_outputs.rb +225 -0
  437. data/lib/openapi_openai/models/run_step_completion_usage.rb +257 -0
  438. data/lib/openapi_openai/models/run_step_delta_object.rb +290 -0
  439. data/lib/openapi_openai/models/{images_response_data_inner.rb → run_step_delta_object_delta.rb} +12 -20
  440. data/lib/openapi_openai/models/run_step_delta_object_delta_step_details.rb +106 -0
  441. data/lib/openapi_openai/models/run_step_delta_step_details_message_creation_object.rb +266 -0
  442. data/lib/openapi_openai/models/run_step_delta_step_details_message_creation_object_message_creation.rb +215 -0
  443. data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_code_object.rb +293 -0
  444. data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_code_object_code_interpreter.rb +228 -0
  445. data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_code_object_code_interpreter_outputs_inner.rb +105 -0
  446. data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_code_output_image_object.rb +282 -0
  447. data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_code_output_image_object_image.rb +215 -0
  448. data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_code_output_logs_object.rb +284 -0
  449. data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_function_object.rb +292 -0
  450. data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_function_object_function.rb +237 -0
  451. data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_object.rb +269 -0
  452. data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_object_tool_calls_inner.rb +106 -0
  453. data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_retrieval_object.rb +293 -0
  454. data/lib/openapi_openai/models/run_step_details_message_creation_object.rb +273 -0
  455. data/lib/openapi_openai/models/run_step_details_message_creation_object_message_creation.rb +222 -0
  456. data/lib/openapi_openai/models/run_step_details_tool_calls_code_object.rb +290 -0
  457. data/lib/openapi_openai/models/run_step_details_tool_calls_code_object_code_interpreter.rb +242 -0
  458. data/lib/openapi_openai/models/run_step_details_tool_calls_code_object_code_interpreter_outputs_inner.rb +105 -0
  459. data/lib/openapi_openai/models/run_step_details_tool_calls_code_output_image_object.rb +272 -0
  460. data/lib/openapi_openai/models/run_step_details_tool_calls_code_output_image_object_image.rb +222 -0
  461. data/lib/openapi_openai/models/run_step_details_tool_calls_code_output_logs_object.rb +274 -0
  462. data/lib/openapi_openai/models/run_step_details_tool_calls_function_object.rb +289 -0
  463. data/lib/openapi_openai/models/run_step_details_tool_calls_function_object_function.rb +253 -0
  464. data/lib/openapi_openai/models/run_step_details_tool_calls_object.rb +276 -0
  465. data/lib/openapi_openai/models/run_step_details_tool_calls_object_tool_calls_inner.rb +106 -0
  466. data/lib/openapi_openai/models/run_step_details_tool_calls_retrieval_object.rb +290 -0
  467. data/lib/openapi_openai/models/run_step_object.rb +505 -0
  468. data/lib/openapi_openai/models/run_step_object_last_error.rb +274 -0
  469. data/lib/openapi_openai/models/run_step_object_step_details.rb +106 -0
  470. data/lib/openapi_openai/models/run_step_stream_event.rb +110 -0
  471. data/lib/openapi_openai/models/run_step_stream_event_one_of.rb +272 -0
  472. data/lib/openapi_openai/models/run_step_stream_event_one_of1.rb +272 -0
  473. data/lib/openapi_openai/models/run_step_stream_event_one_of2.rb +272 -0
  474. data/lib/openapi_openai/models/run_step_stream_event_one_of3.rb +272 -0
  475. data/lib/openapi_openai/models/run_step_stream_event_one_of4.rb +272 -0
  476. data/lib/openapi_openai/models/run_step_stream_event_one_of5.rb +272 -0
  477. data/lib/openapi_openai/models/run_step_stream_event_one_of6.rb +272 -0
  478. data/lib/openapi_openai/models/run_stream_event.rb +112 -0
  479. data/lib/openapi_openai/models/run_stream_event_one_of.rb +272 -0
  480. data/lib/openapi_openai/models/run_stream_event_one_of1.rb +272 -0
  481. data/lib/openapi_openai/models/run_stream_event_one_of2.rb +272 -0
  482. data/lib/openapi_openai/models/run_stream_event_one_of3.rb +272 -0
  483. data/lib/openapi_openai/models/run_stream_event_one_of4.rb +272 -0
  484. data/lib/openapi_openai/models/run_stream_event_one_of5.rb +272 -0
  485. data/lib/openapi_openai/models/run_stream_event_one_of6.rb +272 -0
  486. data/lib/openapi_openai/models/run_stream_event_one_of7.rb +272 -0
  487. data/lib/openapi_openai/models/run_stream_event_one_of8.rb +272 -0
  488. data/lib/openapi_openai/models/run_tool_call_object.rb +290 -0
  489. data/lib/openapi_openai/models/run_tool_call_object_function.rb +240 -0
  490. data/lib/openapi_openai/models/submit_tool_outputs_run_request.rb +235 -0
  491. data/lib/openapi_openai/models/submit_tool_outputs_run_request_tool_outputs_inner.rb +225 -0
  492. data/lib/openapi_openai/models/thread_object.rb +304 -0
  493. data/lib/openapi_openai/models/thread_stream_event.rb +104 -0
  494. data/lib/openapi_openai/models/thread_stream_event_one_of.rb +272 -0
  495. data/lib/openapi_openai/models/transcription_segment.rb +377 -0
  496. data/lib/openapi_openai/models/{create_embedding_response_data_inner.rb → transcription_word.rb} +38 -37
  497. data/lib/openapi_openai/models/truncation_object.rb +275 -0
  498. data/lib/openapi_openai/version.rb +2 -2
  499. data/lib/openapi_openai.rb +209 -19
  500. data/openapi_openai.gemspec +2 -2
  501. data/spec/api/assistants_api_spec.rb +389 -0
  502. data/spec/api/audio_api_spec.rb +78 -0
  503. data/spec/api/chat_api_spec.rb +46 -0
  504. data/spec/api/completions_api_spec.rb +46 -0
  505. data/spec/api/embeddings_api_spec.rb +46 -0
  506. data/spec/api/files_api_spec.rb +91 -0
  507. data/spec/api/fine_tuning_api_spec.rb +106 -0
  508. data/spec/api/images_api_spec.rb +80 -0
  509. data/spec/api/models_api_spec.rb +67 -0
  510. data/spec/api/moderations_api_spec.rb +46 -0
  511. data/spec/models/assistant_file_object_spec.rb +58 -0
  512. data/spec/models/assistant_object_spec.rb +94 -0
  513. data/spec/models/assistant_object_tools_inner_spec.rb +32 -0
  514. data/spec/models/assistant_stream_event_spec.rb +32 -0
  515. data/spec/models/assistant_tools_code_spec.rb +40 -0
  516. data/spec/models/assistant_tools_function_spec.rb +46 -0
  517. data/spec/models/assistant_tools_retrieval_spec.rb +40 -0
  518. data/spec/models/assistants_api_named_tool_choice_spec.rb +46 -0
  519. data/spec/models/assistants_api_response_format_option_spec.rb +32 -0
  520. data/spec/models/assistants_api_response_format_spec.rb +40 -0
  521. data/spec/models/assistants_api_tool_choice_option_spec.rb +32 -0
  522. data/spec/models/chat_completion_function_call_option_spec.rb +36 -0
  523. data/spec/models/chat_completion_functions_spec.rb +3 -3
  524. data/spec/models/chat_completion_message_tool_call_chunk_function_spec.rb +42 -0
  525. data/spec/models/{create_edit_response_choices_inner_spec.rb → chat_completion_message_tool_call_chunk_spec.rb} +15 -15
  526. data/spec/models/{chat_completion_request_message_function_call_spec.rb → chat_completion_message_tool_call_function_spec.rb} +7 -7
  527. data/spec/models/chat_completion_message_tool_call_spec.rb +52 -0
  528. data/spec/models/chat_completion_named_tool_choice_function_spec.rb +36 -0
  529. data/spec/models/chat_completion_named_tool_choice_spec.rb +46 -0
  530. data/spec/models/chat_completion_request_assistant_message_function_call_spec.rb +42 -0
  531. data/spec/models/chat_completion_request_assistant_message_spec.rb +64 -0
  532. data/spec/models/chat_completion_request_function_message_spec.rb +52 -0
  533. data/spec/models/chat_completion_request_message_content_part_image_image_url_spec.rb +46 -0
  534. data/spec/models/chat_completion_request_message_content_part_image_spec.rb +46 -0
  535. data/spec/models/chat_completion_request_message_content_part_spec.rb +32 -0
  536. data/spec/models/chat_completion_request_message_content_part_text_spec.rb +46 -0
  537. data/spec/models/chat_completion_request_message_spec.rb +6 -32
  538. data/spec/models/chat_completion_request_system_message_spec.rb +52 -0
  539. data/spec/models/chat_completion_request_tool_message_spec.rb +52 -0
  540. data/spec/models/chat_completion_request_user_message_content_spec.rb +32 -0
  541. data/spec/models/chat_completion_request_user_message_spec.rb +52 -0
  542. data/spec/models/chat_completion_response_message_spec.rb +13 -7
  543. data/spec/models/chat_completion_role_spec.rb +30 -0
  544. data/spec/models/chat_completion_stream_response_delta_function_call_spec.rb +42 -0
  545. data/spec/models/chat_completion_stream_response_delta_spec.rb +14 -8
  546. data/spec/models/{create_edit_response_spec.rb → chat_completion_token_logprob_spec.rb} +11 -11
  547. data/spec/models/chat_completion_token_logprob_top_logprobs_inner_spec.rb +48 -0
  548. data/spec/models/chat_completion_tool_choice_option_spec.rb +32 -0
  549. data/spec/models/chat_completion_tool_spec.rb +46 -0
  550. data/spec/models/{create_completion_response_usage_spec.rb → completion_usage_spec.rb} +9 -9
  551. data/spec/models/create_assistant_file_request_spec.rb +36 -0
  552. data/spec/models/create_assistant_request_model_spec.rb +21 -0
  553. data/spec/models/{create_edit_request_spec.rb → create_assistant_request_spec.rb} +18 -12
  554. data/spec/models/create_chat_completion_function_response_choices_inner_spec.rb +52 -0
  555. data/spec/models/create_chat_completion_function_response_spec.rb +76 -0
  556. data/spec/models/create_chat_completion_request_function_call_spec.rb +1 -1
  557. data/spec/models/create_chat_completion_request_model_spec.rb +1 -12
  558. data/spec/models/{create_chat_completion_request_function_call_one_of_spec.rb → create_chat_completion_request_response_format_spec.rb} +12 -8
  559. data/spec/models/create_chat_completion_request_spec.rb +47 -11
  560. data/spec/models/create_chat_completion_request_stop_spec.rb +1 -1
  561. data/spec/models/create_chat_completion_response_choices_inner_logprobs_spec.rb +36 -0
  562. data/spec/models/create_chat_completion_response_choices_inner_spec.rb +12 -6
  563. data/spec/models/create_chat_completion_response_spec.rb +13 -3
  564. data/spec/models/create_chat_completion_stream_response_choices_inner_spec.rb +10 -4
  565. data/spec/models/create_chat_completion_stream_response_spec.rb +13 -3
  566. data/spec/models/create_completion_request_model_spec.rb +1 -12
  567. data/spec/models/create_completion_request_prompt_spec.rb +1 -1
  568. data/spec/models/create_completion_request_spec.rb +19 -13
  569. data/spec/models/create_completion_request_stop_spec.rb +1 -1
  570. data/spec/models/create_completion_response_choices_inner_logprobs_spec.rb +4 -4
  571. data/spec/models/create_completion_response_choices_inner_spec.rb +7 -7
  572. data/spec/models/create_completion_response_spec.rb +13 -3
  573. data/spec/models/create_embedding_request_input_spec.rb +1 -1
  574. data/spec/models/create_embedding_request_model_spec.rb +1 -12
  575. data/spec/models/create_embedding_request_spec.rb +18 -2
  576. data/spec/models/create_embedding_response_spec.rb +7 -3
  577. data/spec/models/create_embedding_response_usage_spec.rb +1 -1
  578. data/spec/models/create_fine_tuning_job_request_hyperparameters_batch_size_spec.rb +32 -0
  579. data/spec/models/create_fine_tuning_job_request_hyperparameters_learning_rate_multiplier_spec.rb +32 -0
  580. data/spec/models/create_fine_tuning_job_request_hyperparameters_n_epochs_spec.rb +32 -0
  581. data/spec/models/create_fine_tuning_job_request_hyperparameters_spec.rb +48 -0
  582. data/spec/models/create_fine_tuning_job_request_integrations_inner_spec.rb +42 -0
  583. data/spec/models/create_fine_tuning_job_request_integrations_inner_type_spec.rb +32 -0
  584. data/spec/models/create_fine_tuning_job_request_integrations_inner_wandb_spec.rb +54 -0
  585. data/spec/models/create_fine_tuning_job_request_model_spec.rb +21 -0
  586. data/spec/models/create_fine_tuning_job_request_spec.rb +72 -0
  587. data/spec/models/create_image_edit_request_model_spec.rb +21 -0
  588. data/spec/models/create_image_request_model_spec.rb +21 -0
  589. data/spec/models/create_image_request_spec.rb +30 -4
  590. data/spec/models/create_message_request_spec.rb +58 -0
  591. data/spec/models/create_moderation_request_input_spec.rb +1 -1
  592. data/spec/models/create_moderation_request_model_spec.rb +1 -12
  593. data/spec/models/create_moderation_request_spec.rb +1 -1
  594. data/spec/models/create_moderation_response_results_inner_categories_spec.rb +25 -1
  595. data/spec/models/create_moderation_response_results_inner_category_scores_spec.rb +25 -1
  596. data/spec/models/create_moderation_response_results_inner_spec.rb +1 -1
  597. data/spec/models/create_moderation_response_spec.rb +1 -1
  598. data/spec/models/create_run_request_model_spec.rb +21 -0
  599. data/spec/models/{create_fine_tune_request_spec.rb → create_run_request_spec.rb} +31 -19
  600. data/spec/models/create_speech_request_model_spec.rb +21 -0
  601. data/spec/models/create_speech_request_spec.rb +68 -0
  602. data/spec/models/{fine_tune_spec.rb → create_thread_and_run_request_spec.rb} +20 -20
  603. data/spec/models/create_thread_and_run_request_tools_inner_spec.rb +32 -0
  604. data/spec/models/{list_fine_tune_events_response_spec.rb → create_thread_request_spec.rb} +9 -9
  605. data/spec/models/create_transcription200_response_spec.rb +32 -0
  606. data/spec/models/create_transcription_request_model_spec.rb +1 -12
  607. data/spec/models/{create_transcription_response_spec.rb → create_transcription_response_json_spec.rb} +7 -7
  608. data/spec/models/create_transcription_response_verbose_json_spec.rb +60 -0
  609. data/spec/models/create_translation200_response_spec.rb +32 -0
  610. data/spec/models/{create_translation_response_spec.rb → create_translation_response_json_spec.rb} +7 -7
  611. data/spec/models/create_translation_response_verbose_json_spec.rb +54 -0
  612. data/spec/models/delete_assistant_file_response_spec.rb +52 -0
  613. data/spec/models/delete_assistant_response_spec.rb +52 -0
  614. data/spec/models/delete_file_response_spec.rb +5 -1
  615. data/spec/models/delete_message_response_spec.rb +52 -0
  616. data/spec/models/delete_model_response_spec.rb +3 -3
  617. data/spec/models/delete_thread_response_spec.rb +52 -0
  618. data/spec/models/done_event_spec.rb +50 -0
  619. data/spec/models/{create_embedding_response_data_inner_spec.rb → embedding_spec.rb} +13 -9
  620. data/spec/models/error_event_spec.rb +46 -0
  621. data/spec/models/error_response_spec.rb +1 -1
  622. data/spec/models/error_spec.rb +3 -3
  623. data/spec/models/fine_tuning_integration_spec.rb +46 -0
  624. data/spec/models/fine_tuning_job_checkpoint_metrics_spec.rb +72 -0
  625. data/spec/models/fine_tuning_job_checkpoint_spec.rb +76 -0
  626. data/spec/models/{fine_tune_event_spec.rb → fine_tuning_job_error_spec.rb} +10 -16
  627. data/spec/models/fine_tuning_job_event_spec.rb +68 -0
  628. data/spec/models/fine_tuning_job_hyperparameters_n_epochs_spec.rb +32 -0
  629. data/spec/models/fine_tuning_job_hyperparameters_spec.rb +36 -0
  630. data/spec/models/fine_tuning_job_integrations_inner_spec.rb +32 -0
  631. data/spec/models/fine_tuning_job_spec.rb +134 -0
  632. data/spec/models/function_object_spec.rb +48 -0
  633. data/spec/models/{images_response_data_inner_spec.rb → image_spec.rb} +14 -8
  634. data/spec/models/images_response_spec.rb +1 -1
  635. data/spec/models/list_assistant_files_response_spec.rb +60 -0
  636. data/spec/models/list_assistants_response_spec.rb +60 -0
  637. data/spec/models/list_files_response_spec.rb +7 -3
  638. data/spec/models/list_fine_tuning_job_checkpoints_response_spec.rb +64 -0
  639. data/spec/models/{list_fine_tunes_response_spec.rb → list_fine_tuning_job_events_response_spec.rb} +13 -9
  640. data/spec/models/list_message_files_response_spec.rb +60 -0
  641. data/spec/models/list_messages_response_spec.rb +60 -0
  642. data/spec/models/list_models_response_spec.rb +5 -1
  643. data/spec/models/list_paginated_fine_tuning_jobs_response_spec.rb +52 -0
  644. data/spec/models/list_run_steps_response_spec.rb +60 -0
  645. data/spec/models/list_runs_response_spec.rb +60 -0
  646. data/spec/models/list_threads_response_spec.rb +60 -0
  647. data/spec/models/message_content_image_file_object_image_file_spec.rb +36 -0
  648. data/spec/models/message_content_image_file_object_spec.rb +46 -0
  649. data/spec/models/message_content_text_annotations_file_citation_object_file_citation_spec.rb +42 -0
  650. data/spec/models/message_content_text_annotations_file_citation_object_spec.rb +64 -0
  651. data/spec/models/message_content_text_annotations_file_path_object_file_path_spec.rb +36 -0
  652. data/spec/models/message_content_text_annotations_file_path_object_spec.rb +64 -0
  653. data/spec/models/message_content_text_object_spec.rb +46 -0
  654. data/spec/models/message_content_text_object_text_annotations_inner_spec.rb +32 -0
  655. data/spec/models/message_content_text_object_text_spec.rb +42 -0
  656. data/spec/models/message_delta_content_image_file_object_image_file_spec.rb +36 -0
  657. data/spec/models/message_delta_content_image_file_object_spec.rb +52 -0
  658. data/spec/models/message_delta_content_text_annotations_file_citation_object_file_citation_spec.rb +42 -0
  659. data/spec/models/message_delta_content_text_annotations_file_citation_object_spec.rb +70 -0
  660. data/spec/models/message_delta_content_text_annotations_file_path_object_file_path_spec.rb +36 -0
  661. data/spec/models/message_delta_content_text_annotations_file_path_object_spec.rb +70 -0
  662. data/spec/models/message_delta_content_text_object_spec.rb +52 -0
  663. data/spec/models/message_delta_content_text_object_text_annotations_inner_spec.rb +32 -0
  664. data/spec/models/message_delta_content_text_object_text_spec.rb +42 -0
  665. data/spec/models/message_delta_object_delta_content_inner_spec.rb +32 -0
  666. data/spec/models/message_delta_object_delta_spec.rb +52 -0
  667. data/spec/models/message_delta_object_spec.rb +52 -0
  668. data/spec/models/message_file_object_spec.rb +58 -0
  669. data/spec/models/message_object_content_inner_spec.rb +32 -0
  670. data/spec/models/message_object_incomplete_details_spec.rb +40 -0
  671. data/spec/models/message_object_spec.rb +126 -0
  672. data/spec/models/message_stream_event_one_of1_spec.rb +46 -0
  673. data/spec/models/message_stream_event_one_of2_spec.rb +46 -0
  674. data/spec/models/message_stream_event_one_of3_spec.rb +46 -0
  675. data/spec/models/message_stream_event_one_of4_spec.rb +46 -0
  676. data/spec/models/message_stream_event_one_of_spec.rb +46 -0
  677. data/spec/models/message_stream_event_spec.rb +32 -0
  678. data/spec/models/model_spec.rb +7 -3
  679. data/spec/models/modify_assistant_request_spec.rb +72 -0
  680. data/spec/models/modify_message_request_spec.rb +36 -0
  681. data/spec/models/modify_run_request_spec.rb +36 -0
  682. data/spec/models/modify_thread_request_spec.rb +36 -0
  683. data/spec/models/open_ai_file_spec.rb +17 -5
  684. data/spec/models/run_completion_usage_spec.rb +48 -0
  685. data/spec/models/run_object_incomplete_details_spec.rb +40 -0
  686. data/spec/models/run_object_last_error_spec.rb +46 -0
  687. data/spec/models/run_object_required_action_spec.rb +46 -0
  688. data/spec/models/run_object_required_action_submit_tool_outputs_spec.rb +36 -0
  689. data/spec/models/run_object_spec.rb +194 -0
  690. data/spec/models/run_step_completion_usage_spec.rb +48 -0
  691. data/spec/models/run_step_delta_object_delta_spec.rb +36 -0
  692. data/spec/models/run_step_delta_object_delta_step_details_spec.rb +32 -0
  693. data/spec/models/run_step_delta_object_spec.rb +52 -0
  694. data/spec/models/run_step_delta_step_details_message_creation_object_message_creation_spec.rb +36 -0
  695. data/spec/models/run_step_delta_step_details_message_creation_object_spec.rb +46 -0
  696. data/spec/models/run_step_delta_step_details_tool_calls_code_object_code_interpreter_outputs_inner_spec.rb +32 -0
  697. data/spec/models/run_step_delta_step_details_tool_calls_code_object_code_interpreter_spec.rb +42 -0
  698. data/spec/models/run_step_delta_step_details_tool_calls_code_object_spec.rb +58 -0
  699. data/spec/models/run_step_delta_step_details_tool_calls_code_output_image_object_image_spec.rb +36 -0
  700. data/spec/models/run_step_delta_step_details_tool_calls_code_output_image_object_spec.rb +52 -0
  701. data/spec/models/run_step_delta_step_details_tool_calls_code_output_logs_object_spec.rb +52 -0
  702. data/spec/models/run_step_delta_step_details_tool_calls_function_object_function_spec.rb +48 -0
  703. data/spec/models/run_step_delta_step_details_tool_calls_function_object_spec.rb +58 -0
  704. data/spec/models/run_step_delta_step_details_tool_calls_object_spec.rb +46 -0
  705. data/spec/models/run_step_delta_step_details_tool_calls_object_tool_calls_inner_spec.rb +32 -0
  706. data/spec/models/run_step_delta_step_details_tool_calls_retrieval_object_spec.rb +58 -0
  707. data/spec/models/run_step_details_message_creation_object_message_creation_spec.rb +36 -0
  708. data/spec/models/run_step_details_message_creation_object_spec.rb +46 -0
  709. data/spec/models/run_step_details_tool_calls_code_object_code_interpreter_outputs_inner_spec.rb +32 -0
  710. data/spec/models/run_step_details_tool_calls_code_object_code_interpreter_spec.rb +42 -0
  711. data/spec/models/run_step_details_tool_calls_code_object_spec.rb +52 -0
  712. data/spec/models/run_step_details_tool_calls_code_output_image_object_image_spec.rb +36 -0
  713. data/spec/models/run_step_details_tool_calls_code_output_image_object_spec.rb +46 -0
  714. data/spec/models/run_step_details_tool_calls_code_output_logs_object_spec.rb +46 -0
  715. data/spec/models/run_step_details_tool_calls_function_object_function_spec.rb +48 -0
  716. data/spec/models/run_step_details_tool_calls_function_object_spec.rb +52 -0
  717. data/spec/models/run_step_details_tool_calls_object_spec.rb +46 -0
  718. data/spec/models/run_step_details_tool_calls_object_tool_calls_inner_spec.rb +32 -0
  719. data/spec/models/run_step_details_tool_calls_retrieval_object_spec.rb +52 -0
  720. data/spec/models/run_step_object_last_error_spec.rb +46 -0
  721. data/spec/models/run_step_object_spec.rb +138 -0
  722. data/spec/models/run_step_object_step_details_spec.rb +32 -0
  723. data/spec/models/run_step_stream_event_one_of1_spec.rb +46 -0
  724. data/spec/models/run_step_stream_event_one_of2_spec.rb +46 -0
  725. data/spec/models/run_step_stream_event_one_of3_spec.rb +46 -0
  726. data/spec/models/run_step_stream_event_one_of4_spec.rb +46 -0
  727. data/spec/models/run_step_stream_event_one_of5_spec.rb +46 -0
  728. data/spec/models/run_step_stream_event_one_of6_spec.rb +46 -0
  729. data/spec/models/run_step_stream_event_one_of_spec.rb +46 -0
  730. data/spec/models/run_step_stream_event_spec.rb +32 -0
  731. data/spec/models/run_stream_event_one_of1_spec.rb +46 -0
  732. data/spec/models/run_stream_event_one_of2_spec.rb +46 -0
  733. data/spec/models/run_stream_event_one_of3_spec.rb +46 -0
  734. data/spec/models/run_stream_event_one_of4_spec.rb +46 -0
  735. data/spec/models/run_stream_event_one_of5_spec.rb +46 -0
  736. data/spec/models/run_stream_event_one_of6_spec.rb +46 -0
  737. data/spec/models/run_stream_event_one_of7_spec.rb +46 -0
  738. data/spec/models/run_stream_event_one_of8_spec.rb +46 -0
  739. data/spec/models/run_stream_event_one_of_spec.rb +46 -0
  740. data/spec/models/{create_fine_tune_request_model_spec.rb → run_stream_event_spec.rb} +3 -3
  741. data/spec/models/run_tool_call_object_function_spec.rb +42 -0
  742. data/spec/models/run_tool_call_object_spec.rb +52 -0
  743. data/spec/models/submit_tool_outputs_run_request_spec.rb +42 -0
  744. data/spec/models/submit_tool_outputs_run_request_tool_outputs_inner_spec.rb +42 -0
  745. data/spec/models/thread_object_spec.rb +58 -0
  746. data/spec/models/thread_stream_event_one_of_spec.rb +46 -0
  747. data/spec/models/{create_edit_request_model_spec.rb → thread_stream_event_spec.rb} +3 -3
  748. data/spec/models/transcription_segment_spec.rb +90 -0
  749. data/spec/models/transcription_word_spec.rb +48 -0
  750. data/spec/models/truncation_object_spec.rb +46 -0
  751. data/spec/spec_helper.rb +1 -1
  752. metadata +867 -106
  753. data/docs/CreateCompletionResponseUsage.md +0 -22
  754. data/docs/CreateEditRequest.md +0 -28
  755. data/docs/CreateEditResponse.md +0 -24
  756. data/docs/CreateEditResponseChoicesInner.md +0 -24
  757. data/docs/CreateEmbeddingResponseDataInner.md +0 -22
  758. data/docs/CreateFineTuneRequest.md +0 -40
  759. data/docs/CreateTranslationResponse.md +0 -18
  760. data/docs/FineTune.md +0 -42
  761. data/docs/ImagesResponseDataInner.md +0 -20
  762. data/docs/ListFineTuneEventsResponse.md +0 -20
  763. data/docs/ListFineTunesResponse.md +0 -20
  764. data/docs/OpenAIApi.md +0 -1499
  765. data/lib/openapi_openai/api/open_ai_api.rb +0 -1583
  766. data/spec/api/open_ai_api_spec.rb +0 -306
@@ -0,0 +1,2017 @@
1
+ # OpenApiOpenAIClient::AssistantsApi
2
+
3
+ All URIs are relative to *https://api.openai.com/v1*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**cancel_run**](AssistantsApi.md#cancel_run) | **POST** /threads/{thread_id}/runs/{run_id}/cancel | Cancels a run that is `in_progress`. |
8
+ | [**create_assistant**](AssistantsApi.md#create_assistant) | **POST** /assistants | Create an assistant with a model and instructions. |
9
+ | [**create_assistant_file**](AssistantsApi.md#create_assistant_file) | **POST** /assistants/{assistant_id}/files | Create an assistant file by attaching a [File](/docs/api-reference/files) to an [assistant](/docs/api-reference/assistants). |
10
+ | [**create_message**](AssistantsApi.md#create_message) | **POST** /threads/{thread_id}/messages | Create a message. |
11
+ | [**create_run**](AssistantsApi.md#create_run) | **POST** /threads/{thread_id}/runs | Create a run. |
12
+ | [**create_thread**](AssistantsApi.md#create_thread) | **POST** /threads | Create a thread. |
13
+ | [**create_thread_and_run**](AssistantsApi.md#create_thread_and_run) | **POST** /threads/runs | Create a thread and run it in one request. |
14
+ | [**delete_assistant**](AssistantsApi.md#delete_assistant) | **DELETE** /assistants/{assistant_id} | Delete an assistant. |
15
+ | [**delete_assistant_file**](AssistantsApi.md#delete_assistant_file) | **DELETE** /assistants/{assistant_id}/files/{file_id} | Delete an assistant file. |
16
+ | [**delete_thread**](AssistantsApi.md#delete_thread) | **DELETE** /threads/{thread_id} | Delete a thread. |
17
+ | [**get_assistant**](AssistantsApi.md#get_assistant) | **GET** /assistants/{assistant_id} | Retrieves an assistant. |
18
+ | [**get_assistant_file**](AssistantsApi.md#get_assistant_file) | **GET** /assistants/{assistant_id}/files/{file_id} | Retrieves an AssistantFile. |
19
+ | [**get_message**](AssistantsApi.md#get_message) | **GET** /threads/{thread_id}/messages/{message_id} | Retrieve a message. |
20
+ | [**get_message_file**](AssistantsApi.md#get_message_file) | **GET** /threads/{thread_id}/messages/{message_id}/files/{file_id} | Retrieves a message file. |
21
+ | [**get_run**](AssistantsApi.md#get_run) | **GET** /threads/{thread_id}/runs/{run_id} | Retrieves a run. |
22
+ | [**get_run_step**](AssistantsApi.md#get_run_step) | **GET** /threads/{thread_id}/runs/{run_id}/steps/{step_id} | Retrieves a run step. |
23
+ | [**get_thread**](AssistantsApi.md#get_thread) | **GET** /threads/{thread_id} | Retrieves a thread. |
24
+ | [**list_assistant_files**](AssistantsApi.md#list_assistant_files) | **GET** /assistants/{assistant_id}/files | Returns a list of assistant files. |
25
+ | [**list_assistants**](AssistantsApi.md#list_assistants) | **GET** /assistants | Returns a list of assistants. |
26
+ | [**list_message_files**](AssistantsApi.md#list_message_files) | **GET** /threads/{thread_id}/messages/{message_id}/files | Returns a list of message files. |
27
+ | [**list_messages**](AssistantsApi.md#list_messages) | **GET** /threads/{thread_id}/messages | Returns a list of messages for a given thread. |
28
+ | [**list_run_steps**](AssistantsApi.md#list_run_steps) | **GET** /threads/{thread_id}/runs/{run_id}/steps | Returns a list of run steps belonging to a run. |
29
+ | [**list_runs**](AssistantsApi.md#list_runs) | **GET** /threads/{thread_id}/runs | Returns a list of runs belonging to a thread. |
30
+ | [**modify_assistant**](AssistantsApi.md#modify_assistant) | **POST** /assistants/{assistant_id} | Modifies an assistant. |
31
+ | [**modify_message**](AssistantsApi.md#modify_message) | **POST** /threads/{thread_id}/messages/{message_id} | Modifies a message. |
32
+ | [**modify_run**](AssistantsApi.md#modify_run) | **POST** /threads/{thread_id}/runs/{run_id} | Modifies a run. |
33
+ | [**modify_thread**](AssistantsApi.md#modify_thread) | **POST** /threads/{thread_id} | Modifies a thread. |
34
+ | [**submit_tool_ouputs_to_run**](AssistantsApi.md#submit_tool_ouputs_to_run) | **POST** /threads/{thread_id}/runs/{run_id}/submit_tool_outputs | When a run has the `status: \"requires_action\"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request. |
35
+
36
+
37
+ ## cancel_run
38
+
39
+ > <RunObject> cancel_run(thread_id, run_id)
40
+
41
+ Cancels a run that is `in_progress`.
42
+
43
+ ### Examples
44
+
45
+ ```ruby
46
+ require 'time'
47
+ require 'openapi_openai'
48
+ # setup authorization
49
+ OpenApiOpenAIClient.configure do |config|
50
+ # Configure Bearer authorization: ApiKeyAuth
51
+ config.access_token = 'YOUR_BEARER_TOKEN'
52
+ end
53
+
54
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
55
+ thread_id = 'thread_id_example' # String | The ID of the thread to which this run belongs.
56
+ run_id = 'run_id_example' # String | The ID of the run to cancel.
57
+
58
+ begin
59
+ # Cancels a run that is `in_progress`.
60
+ result = api_instance.cancel_run(thread_id, run_id)
61
+ p result
62
+ rescue OpenApiOpenAIClient::ApiError => e
63
+ puts "Error when calling AssistantsApi->cancel_run: #{e}"
64
+ end
65
+ ```
66
+
67
+ #### Using the cancel_run_with_http_info variant
68
+
69
+ This returns an Array which contains the response data, status code and headers.
70
+
71
+ > <Array(<RunObject>, Integer, Hash)> cancel_run_with_http_info(thread_id, run_id)
72
+
73
+ ```ruby
74
+ begin
75
+ # Cancels a run that is `in_progress`.
76
+ data, status_code, headers = api_instance.cancel_run_with_http_info(thread_id, run_id)
77
+ p status_code # => 2xx
78
+ p headers # => { ... }
79
+ p data # => <RunObject>
80
+ rescue OpenApiOpenAIClient::ApiError => e
81
+ puts "Error when calling AssistantsApi->cancel_run_with_http_info: #{e}"
82
+ end
83
+ ```
84
+
85
+ ### Parameters
86
+
87
+ | Name | Type | Description | Notes |
88
+ | ---- | ---- | ----------- | ----- |
89
+ | **thread_id** | **String** | The ID of the thread to which this run belongs. | |
90
+ | **run_id** | **String** | The ID of the run to cancel. | |
91
+
92
+ ### Return type
93
+
94
+ [**RunObject**](RunObject.md)
95
+
96
+ ### Authorization
97
+
98
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
99
+
100
+ ### HTTP request headers
101
+
102
+ - **Content-Type**: Not defined
103
+ - **Accept**: application/json
104
+
105
+
106
+ ## create_assistant
107
+
108
+ > <AssistantObject> create_assistant(create_assistant_request)
109
+
110
+ Create an assistant with a model and instructions.
111
+
112
+ ### Examples
113
+
114
+ ```ruby
115
+ require 'time'
116
+ require 'openapi_openai'
117
+ # setup authorization
118
+ OpenApiOpenAIClient.configure do |config|
119
+ # Configure Bearer authorization: ApiKeyAuth
120
+ config.access_token = 'YOUR_BEARER_TOKEN'
121
+ end
122
+
123
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
124
+ create_assistant_request = OpenApiOpenAIClient::CreateAssistantRequest.new({model: OpenApiOpenAIClient::CreateAssistantRequestModel.new}) # CreateAssistantRequest |
125
+
126
+ begin
127
+ # Create an assistant with a model and instructions.
128
+ result = api_instance.create_assistant(create_assistant_request)
129
+ p result
130
+ rescue OpenApiOpenAIClient::ApiError => e
131
+ puts "Error when calling AssistantsApi->create_assistant: #{e}"
132
+ end
133
+ ```
134
+
135
+ #### Using the create_assistant_with_http_info variant
136
+
137
+ This returns an Array which contains the response data, status code and headers.
138
+
139
+ > <Array(<AssistantObject>, Integer, Hash)> create_assistant_with_http_info(create_assistant_request)
140
+
141
+ ```ruby
142
+ begin
143
+ # Create an assistant with a model and instructions.
144
+ data, status_code, headers = api_instance.create_assistant_with_http_info(create_assistant_request)
145
+ p status_code # => 2xx
146
+ p headers # => { ... }
147
+ p data # => <AssistantObject>
148
+ rescue OpenApiOpenAIClient::ApiError => e
149
+ puts "Error when calling AssistantsApi->create_assistant_with_http_info: #{e}"
150
+ end
151
+ ```
152
+
153
+ ### Parameters
154
+
155
+ | Name | Type | Description | Notes |
156
+ | ---- | ---- | ----------- | ----- |
157
+ | **create_assistant_request** | [**CreateAssistantRequest**](CreateAssistantRequest.md) | | |
158
+
159
+ ### Return type
160
+
161
+ [**AssistantObject**](AssistantObject.md)
162
+
163
+ ### Authorization
164
+
165
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
166
+
167
+ ### HTTP request headers
168
+
169
+ - **Content-Type**: application/json
170
+ - **Accept**: application/json
171
+
172
+
173
+ ## create_assistant_file
174
+
175
+ > <AssistantFileObject> create_assistant_file(assistant_id, create_assistant_file_request)
176
+
177
+ Create an assistant file by attaching a [File](/docs/api-reference/files) to an [assistant](/docs/api-reference/assistants).
178
+
179
+ ### Examples
180
+
181
+ ```ruby
182
+ require 'time'
183
+ require 'openapi_openai'
184
+ # setup authorization
185
+ OpenApiOpenAIClient.configure do |config|
186
+ # Configure Bearer authorization: ApiKeyAuth
187
+ config.access_token = 'YOUR_BEARER_TOKEN'
188
+ end
189
+
190
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
191
+ assistant_id = 'file-abc123' # String | The ID of the assistant for which to create a File.
192
+ create_assistant_file_request = OpenApiOpenAIClient::CreateAssistantFileRequest.new({file_id: 'file_id_example'}) # CreateAssistantFileRequest |
193
+
194
+ begin
195
+ # Create an assistant file by attaching a [File](/docs/api-reference/files) to an [assistant](/docs/api-reference/assistants).
196
+ result = api_instance.create_assistant_file(assistant_id, create_assistant_file_request)
197
+ p result
198
+ rescue OpenApiOpenAIClient::ApiError => e
199
+ puts "Error when calling AssistantsApi->create_assistant_file: #{e}"
200
+ end
201
+ ```
202
+
203
+ #### Using the create_assistant_file_with_http_info variant
204
+
205
+ This returns an Array which contains the response data, status code and headers.
206
+
207
+ > <Array(<AssistantFileObject>, Integer, Hash)> create_assistant_file_with_http_info(assistant_id, create_assistant_file_request)
208
+
209
+ ```ruby
210
+ begin
211
+ # Create an assistant file by attaching a [File](/docs/api-reference/files) to an [assistant](/docs/api-reference/assistants).
212
+ data, status_code, headers = api_instance.create_assistant_file_with_http_info(assistant_id, create_assistant_file_request)
213
+ p status_code # => 2xx
214
+ p headers # => { ... }
215
+ p data # => <AssistantFileObject>
216
+ rescue OpenApiOpenAIClient::ApiError => e
217
+ puts "Error when calling AssistantsApi->create_assistant_file_with_http_info: #{e}"
218
+ end
219
+ ```
220
+
221
+ ### Parameters
222
+
223
+ | Name | Type | Description | Notes |
224
+ | ---- | ---- | ----------- | ----- |
225
+ | **assistant_id** | **String** | The ID of the assistant for which to create a File. | |
226
+ | **create_assistant_file_request** | [**CreateAssistantFileRequest**](CreateAssistantFileRequest.md) | | |
227
+
228
+ ### Return type
229
+
230
+ [**AssistantFileObject**](AssistantFileObject.md)
231
+
232
+ ### Authorization
233
+
234
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
235
+
236
+ ### HTTP request headers
237
+
238
+ - **Content-Type**: application/json
239
+ - **Accept**: application/json
240
+
241
+
242
+ ## create_message
243
+
244
+ > <MessageObject> create_message(thread_id, create_message_request)
245
+
246
+ Create a message.
247
+
248
+ ### Examples
249
+
250
+ ```ruby
251
+ require 'time'
252
+ require 'openapi_openai'
253
+ # setup authorization
254
+ OpenApiOpenAIClient.configure do |config|
255
+ # Configure Bearer authorization: ApiKeyAuth
256
+ config.access_token = 'YOUR_BEARER_TOKEN'
257
+ end
258
+
259
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
260
+ thread_id = 'thread_id_example' # String | The ID of the [thread](/docs/api-reference/threads) to create a message for.
261
+ create_message_request = OpenApiOpenAIClient::CreateMessageRequest.new({role: 'user', content: 'content_example'}) # CreateMessageRequest |
262
+
263
+ begin
264
+ # Create a message.
265
+ result = api_instance.create_message(thread_id, create_message_request)
266
+ p result
267
+ rescue OpenApiOpenAIClient::ApiError => e
268
+ puts "Error when calling AssistantsApi->create_message: #{e}"
269
+ end
270
+ ```
271
+
272
+ #### Using the create_message_with_http_info variant
273
+
274
+ This returns an Array which contains the response data, status code and headers.
275
+
276
+ > <Array(<MessageObject>, Integer, Hash)> create_message_with_http_info(thread_id, create_message_request)
277
+
278
+ ```ruby
279
+ begin
280
+ # Create a message.
281
+ data, status_code, headers = api_instance.create_message_with_http_info(thread_id, create_message_request)
282
+ p status_code # => 2xx
283
+ p headers # => { ... }
284
+ p data # => <MessageObject>
285
+ rescue OpenApiOpenAIClient::ApiError => e
286
+ puts "Error when calling AssistantsApi->create_message_with_http_info: #{e}"
287
+ end
288
+ ```
289
+
290
+ ### Parameters
291
+
292
+ | Name | Type | Description | Notes |
293
+ | ---- | ---- | ----------- | ----- |
294
+ | **thread_id** | **String** | The ID of the [thread](/docs/api-reference/threads) to create a message for. | |
295
+ | **create_message_request** | [**CreateMessageRequest**](CreateMessageRequest.md) | | |
296
+
297
+ ### Return type
298
+
299
+ [**MessageObject**](MessageObject.md)
300
+
301
+ ### Authorization
302
+
303
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
304
+
305
+ ### HTTP request headers
306
+
307
+ - **Content-Type**: application/json
308
+ - **Accept**: application/json
309
+
310
+
311
+ ## create_run
312
+
313
+ > <RunObject> create_run(thread_id, create_run_request)
314
+
315
+ Create a run.
316
+
317
+ ### Examples
318
+
319
+ ```ruby
320
+ require 'time'
321
+ require 'openapi_openai'
322
+ # setup authorization
323
+ OpenApiOpenAIClient.configure do |config|
324
+ # Configure Bearer authorization: ApiKeyAuth
325
+ config.access_token = 'YOUR_BEARER_TOKEN'
326
+ end
327
+
328
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
329
+ thread_id = 'thread_id_example' # String | The ID of the thread to run.
330
+ create_run_request = OpenApiOpenAIClient::CreateRunRequest.new({assistant_id: 'assistant_id_example'}) # CreateRunRequest |
331
+
332
+ begin
333
+ # Create a run.
334
+ result = api_instance.create_run(thread_id, create_run_request)
335
+ p result
336
+ rescue OpenApiOpenAIClient::ApiError => e
337
+ puts "Error when calling AssistantsApi->create_run: #{e}"
338
+ end
339
+ ```
340
+
341
+ #### Using the create_run_with_http_info variant
342
+
343
+ This returns an Array which contains the response data, status code and headers.
344
+
345
+ > <Array(<RunObject>, Integer, Hash)> create_run_with_http_info(thread_id, create_run_request)
346
+
347
+ ```ruby
348
+ begin
349
+ # Create a run.
350
+ data, status_code, headers = api_instance.create_run_with_http_info(thread_id, create_run_request)
351
+ p status_code # => 2xx
352
+ p headers # => { ... }
353
+ p data # => <RunObject>
354
+ rescue OpenApiOpenAIClient::ApiError => e
355
+ puts "Error when calling AssistantsApi->create_run_with_http_info: #{e}"
356
+ end
357
+ ```
358
+
359
+ ### Parameters
360
+
361
+ | Name | Type | Description | Notes |
362
+ | ---- | ---- | ----------- | ----- |
363
+ | **thread_id** | **String** | The ID of the thread to run. | |
364
+ | **create_run_request** | [**CreateRunRequest**](CreateRunRequest.md) | | |
365
+
366
+ ### Return type
367
+
368
+ [**RunObject**](RunObject.md)
369
+
370
+ ### Authorization
371
+
372
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
373
+
374
+ ### HTTP request headers
375
+
376
+ - **Content-Type**: application/json
377
+ - **Accept**: application/json
378
+
379
+
380
+ ## create_thread
381
+
382
+ > <ThreadObject> create_thread(opts)
383
+
384
+ Create a thread.
385
+
386
+ ### Examples
387
+
388
+ ```ruby
389
+ require 'time'
390
+ require 'openapi_openai'
391
+ # setup authorization
392
+ OpenApiOpenAIClient.configure do |config|
393
+ # Configure Bearer authorization: ApiKeyAuth
394
+ config.access_token = 'YOUR_BEARER_TOKEN'
395
+ end
396
+
397
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
398
+ opts = {
399
+ create_thread_request: OpenApiOpenAIClient::CreateThreadRequest.new # CreateThreadRequest |
400
+ }
401
+
402
+ begin
403
+ # Create a thread.
404
+ result = api_instance.create_thread(opts)
405
+ p result
406
+ rescue OpenApiOpenAIClient::ApiError => e
407
+ puts "Error when calling AssistantsApi->create_thread: #{e}"
408
+ end
409
+ ```
410
+
411
+ #### Using the create_thread_with_http_info variant
412
+
413
+ This returns an Array which contains the response data, status code and headers.
414
+
415
+ > <Array(<ThreadObject>, Integer, Hash)> create_thread_with_http_info(opts)
416
+
417
+ ```ruby
418
+ begin
419
+ # Create a thread.
420
+ data, status_code, headers = api_instance.create_thread_with_http_info(opts)
421
+ p status_code # => 2xx
422
+ p headers # => { ... }
423
+ p data # => <ThreadObject>
424
+ rescue OpenApiOpenAIClient::ApiError => e
425
+ puts "Error when calling AssistantsApi->create_thread_with_http_info: #{e}"
426
+ end
427
+ ```
428
+
429
+ ### Parameters
430
+
431
+ | Name | Type | Description | Notes |
432
+ | ---- | ---- | ----------- | ----- |
433
+ | **create_thread_request** | [**CreateThreadRequest**](CreateThreadRequest.md) | | [optional] |
434
+
435
+ ### Return type
436
+
437
+ [**ThreadObject**](ThreadObject.md)
438
+
439
+ ### Authorization
440
+
441
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
442
+
443
+ ### HTTP request headers
444
+
445
+ - **Content-Type**: application/json
446
+ - **Accept**: application/json
447
+
448
+
449
+ ## create_thread_and_run
450
+
451
+ > <RunObject> create_thread_and_run(create_thread_and_run_request)
452
+
453
+ Create a thread and run it in one request.
454
+
455
+ ### Examples
456
+
457
+ ```ruby
458
+ require 'time'
459
+ require 'openapi_openai'
460
+ # setup authorization
461
+ OpenApiOpenAIClient.configure do |config|
462
+ # Configure Bearer authorization: ApiKeyAuth
463
+ config.access_token = 'YOUR_BEARER_TOKEN'
464
+ end
465
+
466
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
467
+ create_thread_and_run_request = OpenApiOpenAIClient::CreateThreadAndRunRequest.new({assistant_id: 'assistant_id_example'}) # CreateThreadAndRunRequest |
468
+
469
+ begin
470
+ # Create a thread and run it in one request.
471
+ result = api_instance.create_thread_and_run(create_thread_and_run_request)
472
+ p result
473
+ rescue OpenApiOpenAIClient::ApiError => e
474
+ puts "Error when calling AssistantsApi->create_thread_and_run: #{e}"
475
+ end
476
+ ```
477
+
478
+ #### Using the create_thread_and_run_with_http_info variant
479
+
480
+ This returns an Array which contains the response data, status code and headers.
481
+
482
+ > <Array(<RunObject>, Integer, Hash)> create_thread_and_run_with_http_info(create_thread_and_run_request)
483
+
484
+ ```ruby
485
+ begin
486
+ # Create a thread and run it in one request.
487
+ data, status_code, headers = api_instance.create_thread_and_run_with_http_info(create_thread_and_run_request)
488
+ p status_code # => 2xx
489
+ p headers # => { ... }
490
+ p data # => <RunObject>
491
+ rescue OpenApiOpenAIClient::ApiError => e
492
+ puts "Error when calling AssistantsApi->create_thread_and_run_with_http_info: #{e}"
493
+ end
494
+ ```
495
+
496
+ ### Parameters
497
+
498
+ | Name | Type | Description | Notes |
499
+ | ---- | ---- | ----------- | ----- |
500
+ | **create_thread_and_run_request** | [**CreateThreadAndRunRequest**](CreateThreadAndRunRequest.md) | | |
501
+
502
+ ### Return type
503
+
504
+ [**RunObject**](RunObject.md)
505
+
506
+ ### Authorization
507
+
508
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
509
+
510
+ ### HTTP request headers
511
+
512
+ - **Content-Type**: application/json
513
+ - **Accept**: application/json
514
+
515
+
516
+ ## delete_assistant
517
+
518
+ > <DeleteAssistantResponse> delete_assistant(assistant_id)
519
+
520
+ Delete an assistant.
521
+
522
+ ### Examples
523
+
524
+ ```ruby
525
+ require 'time'
526
+ require 'openapi_openai'
527
+ # setup authorization
528
+ OpenApiOpenAIClient.configure do |config|
529
+ # Configure Bearer authorization: ApiKeyAuth
530
+ config.access_token = 'YOUR_BEARER_TOKEN'
531
+ end
532
+
533
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
534
+ assistant_id = 'assistant_id_example' # String | The ID of the assistant to delete.
535
+
536
+ begin
537
+ # Delete an assistant.
538
+ result = api_instance.delete_assistant(assistant_id)
539
+ p result
540
+ rescue OpenApiOpenAIClient::ApiError => e
541
+ puts "Error when calling AssistantsApi->delete_assistant: #{e}"
542
+ end
543
+ ```
544
+
545
+ #### Using the delete_assistant_with_http_info variant
546
+
547
+ This returns an Array which contains the response data, status code and headers.
548
+
549
+ > <Array(<DeleteAssistantResponse>, Integer, Hash)> delete_assistant_with_http_info(assistant_id)
550
+
551
+ ```ruby
552
+ begin
553
+ # Delete an assistant.
554
+ data, status_code, headers = api_instance.delete_assistant_with_http_info(assistant_id)
555
+ p status_code # => 2xx
556
+ p headers # => { ... }
557
+ p data # => <DeleteAssistantResponse>
558
+ rescue OpenApiOpenAIClient::ApiError => e
559
+ puts "Error when calling AssistantsApi->delete_assistant_with_http_info: #{e}"
560
+ end
561
+ ```
562
+
563
+ ### Parameters
564
+
565
+ | Name | Type | Description | Notes |
566
+ | ---- | ---- | ----------- | ----- |
567
+ | **assistant_id** | **String** | The ID of the assistant to delete. | |
568
+
569
+ ### Return type
570
+
571
+ [**DeleteAssistantResponse**](DeleteAssistantResponse.md)
572
+
573
+ ### Authorization
574
+
575
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
576
+
577
+ ### HTTP request headers
578
+
579
+ - **Content-Type**: Not defined
580
+ - **Accept**: application/json
581
+
582
+
583
+ ## delete_assistant_file
584
+
585
+ > <DeleteAssistantFileResponse> delete_assistant_file(assistant_id, file_id)
586
+
587
+ Delete an assistant file.
588
+
589
+ ### Examples
590
+
591
+ ```ruby
592
+ require 'time'
593
+ require 'openapi_openai'
594
+ # setup authorization
595
+ OpenApiOpenAIClient.configure do |config|
596
+ # Configure Bearer authorization: ApiKeyAuth
597
+ config.access_token = 'YOUR_BEARER_TOKEN'
598
+ end
599
+
600
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
601
+ assistant_id = 'assistant_id_example' # String | The ID of the assistant that the file belongs to.
602
+ file_id = 'file_id_example' # String | The ID of the file to delete.
603
+
604
+ begin
605
+ # Delete an assistant file.
606
+ result = api_instance.delete_assistant_file(assistant_id, file_id)
607
+ p result
608
+ rescue OpenApiOpenAIClient::ApiError => e
609
+ puts "Error when calling AssistantsApi->delete_assistant_file: #{e}"
610
+ end
611
+ ```
612
+
613
+ #### Using the delete_assistant_file_with_http_info variant
614
+
615
+ This returns an Array which contains the response data, status code and headers.
616
+
617
+ > <Array(<DeleteAssistantFileResponse>, Integer, Hash)> delete_assistant_file_with_http_info(assistant_id, file_id)
618
+
619
+ ```ruby
620
+ begin
621
+ # Delete an assistant file.
622
+ data, status_code, headers = api_instance.delete_assistant_file_with_http_info(assistant_id, file_id)
623
+ p status_code # => 2xx
624
+ p headers # => { ... }
625
+ p data # => <DeleteAssistantFileResponse>
626
+ rescue OpenApiOpenAIClient::ApiError => e
627
+ puts "Error when calling AssistantsApi->delete_assistant_file_with_http_info: #{e}"
628
+ end
629
+ ```
630
+
631
+ ### Parameters
632
+
633
+ | Name | Type | Description | Notes |
634
+ | ---- | ---- | ----------- | ----- |
635
+ | **assistant_id** | **String** | The ID of the assistant that the file belongs to. | |
636
+ | **file_id** | **String** | The ID of the file to delete. | |
637
+
638
+ ### Return type
639
+
640
+ [**DeleteAssistantFileResponse**](DeleteAssistantFileResponse.md)
641
+
642
+ ### Authorization
643
+
644
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
645
+
646
+ ### HTTP request headers
647
+
648
+ - **Content-Type**: Not defined
649
+ - **Accept**: application/json
650
+
651
+
652
+ ## delete_thread
653
+
654
+ > <DeleteThreadResponse> delete_thread(thread_id)
655
+
656
+ Delete a thread.
657
+
658
+ ### Examples
659
+
660
+ ```ruby
661
+ require 'time'
662
+ require 'openapi_openai'
663
+ # setup authorization
664
+ OpenApiOpenAIClient.configure do |config|
665
+ # Configure Bearer authorization: ApiKeyAuth
666
+ config.access_token = 'YOUR_BEARER_TOKEN'
667
+ end
668
+
669
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
670
+ thread_id = 'thread_id_example' # String | The ID of the thread to delete.
671
+
672
+ begin
673
+ # Delete a thread.
674
+ result = api_instance.delete_thread(thread_id)
675
+ p result
676
+ rescue OpenApiOpenAIClient::ApiError => e
677
+ puts "Error when calling AssistantsApi->delete_thread: #{e}"
678
+ end
679
+ ```
680
+
681
+ #### Using the delete_thread_with_http_info variant
682
+
683
+ This returns an Array which contains the response data, status code and headers.
684
+
685
+ > <Array(<DeleteThreadResponse>, Integer, Hash)> delete_thread_with_http_info(thread_id)
686
+
687
+ ```ruby
688
+ begin
689
+ # Delete a thread.
690
+ data, status_code, headers = api_instance.delete_thread_with_http_info(thread_id)
691
+ p status_code # => 2xx
692
+ p headers # => { ... }
693
+ p data # => <DeleteThreadResponse>
694
+ rescue OpenApiOpenAIClient::ApiError => e
695
+ puts "Error when calling AssistantsApi->delete_thread_with_http_info: #{e}"
696
+ end
697
+ ```
698
+
699
+ ### Parameters
700
+
701
+ | Name | Type | Description | Notes |
702
+ | ---- | ---- | ----------- | ----- |
703
+ | **thread_id** | **String** | The ID of the thread to delete. | |
704
+
705
+ ### Return type
706
+
707
+ [**DeleteThreadResponse**](DeleteThreadResponse.md)
708
+
709
+ ### Authorization
710
+
711
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
712
+
713
+ ### HTTP request headers
714
+
715
+ - **Content-Type**: Not defined
716
+ - **Accept**: application/json
717
+
718
+
719
+ ## get_assistant
720
+
721
+ > <AssistantObject> get_assistant(assistant_id)
722
+
723
+ Retrieves an assistant.
724
+
725
+ ### Examples
726
+
727
+ ```ruby
728
+ require 'time'
729
+ require 'openapi_openai'
730
+ # setup authorization
731
+ OpenApiOpenAIClient.configure do |config|
732
+ # Configure Bearer authorization: ApiKeyAuth
733
+ config.access_token = 'YOUR_BEARER_TOKEN'
734
+ end
735
+
736
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
737
+ assistant_id = 'assistant_id_example' # String | The ID of the assistant to retrieve.
738
+
739
+ begin
740
+ # Retrieves an assistant.
741
+ result = api_instance.get_assistant(assistant_id)
742
+ p result
743
+ rescue OpenApiOpenAIClient::ApiError => e
744
+ puts "Error when calling AssistantsApi->get_assistant: #{e}"
745
+ end
746
+ ```
747
+
748
+ #### Using the get_assistant_with_http_info variant
749
+
750
+ This returns an Array which contains the response data, status code and headers.
751
+
752
+ > <Array(<AssistantObject>, Integer, Hash)> get_assistant_with_http_info(assistant_id)
753
+
754
+ ```ruby
755
+ begin
756
+ # Retrieves an assistant.
757
+ data, status_code, headers = api_instance.get_assistant_with_http_info(assistant_id)
758
+ p status_code # => 2xx
759
+ p headers # => { ... }
760
+ p data # => <AssistantObject>
761
+ rescue OpenApiOpenAIClient::ApiError => e
762
+ puts "Error when calling AssistantsApi->get_assistant_with_http_info: #{e}"
763
+ end
764
+ ```
765
+
766
+ ### Parameters
767
+
768
+ | Name | Type | Description | Notes |
769
+ | ---- | ---- | ----------- | ----- |
770
+ | **assistant_id** | **String** | The ID of the assistant to retrieve. | |
771
+
772
+ ### Return type
773
+
774
+ [**AssistantObject**](AssistantObject.md)
775
+
776
+ ### Authorization
777
+
778
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
779
+
780
+ ### HTTP request headers
781
+
782
+ - **Content-Type**: Not defined
783
+ - **Accept**: application/json
784
+
785
+
786
+ ## get_assistant_file
787
+
788
+ > <AssistantFileObject> get_assistant_file(assistant_id, file_id)
789
+
790
+ Retrieves an AssistantFile.
791
+
792
+ ### Examples
793
+
794
+ ```ruby
795
+ require 'time'
796
+ require 'openapi_openai'
797
+ # setup authorization
798
+ OpenApiOpenAIClient.configure do |config|
799
+ # Configure Bearer authorization: ApiKeyAuth
800
+ config.access_token = 'YOUR_BEARER_TOKEN'
801
+ end
802
+
803
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
804
+ assistant_id = 'assistant_id_example' # String | The ID of the assistant who the file belongs to.
805
+ file_id = 'file_id_example' # String | The ID of the file we're getting.
806
+
807
+ begin
808
+ # Retrieves an AssistantFile.
809
+ result = api_instance.get_assistant_file(assistant_id, file_id)
810
+ p result
811
+ rescue OpenApiOpenAIClient::ApiError => e
812
+ puts "Error when calling AssistantsApi->get_assistant_file: #{e}"
813
+ end
814
+ ```
815
+
816
+ #### Using the get_assistant_file_with_http_info variant
817
+
818
+ This returns an Array which contains the response data, status code and headers.
819
+
820
+ > <Array(<AssistantFileObject>, Integer, Hash)> get_assistant_file_with_http_info(assistant_id, file_id)
821
+
822
+ ```ruby
823
+ begin
824
+ # Retrieves an AssistantFile.
825
+ data, status_code, headers = api_instance.get_assistant_file_with_http_info(assistant_id, file_id)
826
+ p status_code # => 2xx
827
+ p headers # => { ... }
828
+ p data # => <AssistantFileObject>
829
+ rescue OpenApiOpenAIClient::ApiError => e
830
+ puts "Error when calling AssistantsApi->get_assistant_file_with_http_info: #{e}"
831
+ end
832
+ ```
833
+
834
+ ### Parameters
835
+
836
+ | Name | Type | Description | Notes |
837
+ | ---- | ---- | ----------- | ----- |
838
+ | **assistant_id** | **String** | The ID of the assistant who the file belongs to. | |
839
+ | **file_id** | **String** | The ID of the file we&#39;re getting. | |
840
+
841
+ ### Return type
842
+
843
+ [**AssistantFileObject**](AssistantFileObject.md)
844
+
845
+ ### Authorization
846
+
847
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
848
+
849
+ ### HTTP request headers
850
+
851
+ - **Content-Type**: Not defined
852
+ - **Accept**: application/json
853
+
854
+
855
+ ## get_message
856
+
857
+ > <MessageObject> get_message(thread_id, message_id)
858
+
859
+ Retrieve a message.
860
+
861
+ ### Examples
862
+
863
+ ```ruby
864
+ require 'time'
865
+ require 'openapi_openai'
866
+ # setup authorization
867
+ OpenApiOpenAIClient.configure do |config|
868
+ # Configure Bearer authorization: ApiKeyAuth
869
+ config.access_token = 'YOUR_BEARER_TOKEN'
870
+ end
871
+
872
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
873
+ thread_id = 'thread_id_example' # String | The ID of the [thread](/docs/api-reference/threads) to which this message belongs.
874
+ message_id = 'message_id_example' # String | The ID of the message to retrieve.
875
+
876
+ begin
877
+ # Retrieve a message.
878
+ result = api_instance.get_message(thread_id, message_id)
879
+ p result
880
+ rescue OpenApiOpenAIClient::ApiError => e
881
+ puts "Error when calling AssistantsApi->get_message: #{e}"
882
+ end
883
+ ```
884
+
885
+ #### Using the get_message_with_http_info variant
886
+
887
+ This returns an Array which contains the response data, status code and headers.
888
+
889
+ > <Array(<MessageObject>, Integer, Hash)> get_message_with_http_info(thread_id, message_id)
890
+
891
+ ```ruby
892
+ begin
893
+ # Retrieve a message.
894
+ data, status_code, headers = api_instance.get_message_with_http_info(thread_id, message_id)
895
+ p status_code # => 2xx
896
+ p headers # => { ... }
897
+ p data # => <MessageObject>
898
+ rescue OpenApiOpenAIClient::ApiError => e
899
+ puts "Error when calling AssistantsApi->get_message_with_http_info: #{e}"
900
+ end
901
+ ```
902
+
903
+ ### Parameters
904
+
905
+ | Name | Type | Description | Notes |
906
+ | ---- | ---- | ----------- | ----- |
907
+ | **thread_id** | **String** | The ID of the [thread](/docs/api-reference/threads) to which this message belongs. | |
908
+ | **message_id** | **String** | The ID of the message to retrieve. | |
909
+
910
+ ### Return type
911
+
912
+ [**MessageObject**](MessageObject.md)
913
+
914
+ ### Authorization
915
+
916
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
917
+
918
+ ### HTTP request headers
919
+
920
+ - **Content-Type**: Not defined
921
+ - **Accept**: application/json
922
+
923
+
924
+ ## get_message_file
925
+
926
+ > <MessageFileObject> get_message_file(thread_id, message_id, file_id)
927
+
928
+ Retrieves a message file.
929
+
930
+ ### Examples
931
+
932
+ ```ruby
933
+ require 'time'
934
+ require 'openapi_openai'
935
+ # setup authorization
936
+ OpenApiOpenAIClient.configure do |config|
937
+ # Configure Bearer authorization: ApiKeyAuth
938
+ config.access_token = 'YOUR_BEARER_TOKEN'
939
+ end
940
+
941
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
942
+ thread_id = 'thread_abc123' # String | The ID of the thread to which the message and File belong.
943
+ message_id = 'msg_abc123' # String | The ID of the message the file belongs to.
944
+ file_id = 'file-abc123' # String | The ID of the file being retrieved.
945
+
946
+ begin
947
+ # Retrieves a message file.
948
+ result = api_instance.get_message_file(thread_id, message_id, file_id)
949
+ p result
950
+ rescue OpenApiOpenAIClient::ApiError => e
951
+ puts "Error when calling AssistantsApi->get_message_file: #{e}"
952
+ end
953
+ ```
954
+
955
+ #### Using the get_message_file_with_http_info variant
956
+
957
+ This returns an Array which contains the response data, status code and headers.
958
+
959
+ > <Array(<MessageFileObject>, Integer, Hash)> get_message_file_with_http_info(thread_id, message_id, file_id)
960
+
961
+ ```ruby
962
+ begin
963
+ # Retrieves a message file.
964
+ data, status_code, headers = api_instance.get_message_file_with_http_info(thread_id, message_id, file_id)
965
+ p status_code # => 2xx
966
+ p headers # => { ... }
967
+ p data # => <MessageFileObject>
968
+ rescue OpenApiOpenAIClient::ApiError => e
969
+ puts "Error when calling AssistantsApi->get_message_file_with_http_info: #{e}"
970
+ end
971
+ ```
972
+
973
+ ### Parameters
974
+
975
+ | Name | Type | Description | Notes |
976
+ | ---- | ---- | ----------- | ----- |
977
+ | **thread_id** | **String** | The ID of the thread to which the message and File belong. | |
978
+ | **message_id** | **String** | The ID of the message the file belongs to. | |
979
+ | **file_id** | **String** | The ID of the file being retrieved. | |
980
+
981
+ ### Return type
982
+
983
+ [**MessageFileObject**](MessageFileObject.md)
984
+
985
+ ### Authorization
986
+
987
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
988
+
989
+ ### HTTP request headers
990
+
991
+ - **Content-Type**: Not defined
992
+ - **Accept**: application/json
993
+
994
+
995
+ ## get_run
996
+
997
+ > <RunObject> get_run(thread_id, run_id)
998
+
999
+ Retrieves a run.
1000
+
1001
+ ### Examples
1002
+
1003
+ ```ruby
1004
+ require 'time'
1005
+ require 'openapi_openai'
1006
+ # setup authorization
1007
+ OpenApiOpenAIClient.configure do |config|
1008
+ # Configure Bearer authorization: ApiKeyAuth
1009
+ config.access_token = 'YOUR_BEARER_TOKEN'
1010
+ end
1011
+
1012
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1013
+ thread_id = 'thread_id_example' # String | The ID of the [thread](/docs/api-reference/threads) that was run.
1014
+ run_id = 'run_id_example' # String | The ID of the run to retrieve.
1015
+
1016
+ begin
1017
+ # Retrieves a run.
1018
+ result = api_instance.get_run(thread_id, run_id)
1019
+ p result
1020
+ rescue OpenApiOpenAIClient::ApiError => e
1021
+ puts "Error when calling AssistantsApi->get_run: #{e}"
1022
+ end
1023
+ ```
1024
+
1025
+ #### Using the get_run_with_http_info variant
1026
+
1027
+ This returns an Array which contains the response data, status code and headers.
1028
+
1029
+ > <Array(<RunObject>, Integer, Hash)> get_run_with_http_info(thread_id, run_id)
1030
+
1031
+ ```ruby
1032
+ begin
1033
+ # Retrieves a run.
1034
+ data, status_code, headers = api_instance.get_run_with_http_info(thread_id, run_id)
1035
+ p status_code # => 2xx
1036
+ p headers # => { ... }
1037
+ p data # => <RunObject>
1038
+ rescue OpenApiOpenAIClient::ApiError => e
1039
+ puts "Error when calling AssistantsApi->get_run_with_http_info: #{e}"
1040
+ end
1041
+ ```
1042
+
1043
+ ### Parameters
1044
+
1045
+ | Name | Type | Description | Notes |
1046
+ | ---- | ---- | ----------- | ----- |
1047
+ | **thread_id** | **String** | The ID of the [thread](/docs/api-reference/threads) that was run. | |
1048
+ | **run_id** | **String** | The ID of the run to retrieve. | |
1049
+
1050
+ ### Return type
1051
+
1052
+ [**RunObject**](RunObject.md)
1053
+
1054
+ ### Authorization
1055
+
1056
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1057
+
1058
+ ### HTTP request headers
1059
+
1060
+ - **Content-Type**: Not defined
1061
+ - **Accept**: application/json
1062
+
1063
+
1064
+ ## get_run_step
1065
+
1066
+ > <RunStepObject> get_run_step(thread_id, run_id, step_id)
1067
+
1068
+ Retrieves a run step.
1069
+
1070
+ ### Examples
1071
+
1072
+ ```ruby
1073
+ require 'time'
1074
+ require 'openapi_openai'
1075
+ # setup authorization
1076
+ OpenApiOpenAIClient.configure do |config|
1077
+ # Configure Bearer authorization: ApiKeyAuth
1078
+ config.access_token = 'YOUR_BEARER_TOKEN'
1079
+ end
1080
+
1081
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1082
+ thread_id = 'thread_id_example' # String | The ID of the thread to which the run and run step belongs.
1083
+ run_id = 'run_id_example' # String | The ID of the run to which the run step belongs.
1084
+ step_id = 'step_id_example' # String | The ID of the run step to retrieve.
1085
+
1086
+ begin
1087
+ # Retrieves a run step.
1088
+ result = api_instance.get_run_step(thread_id, run_id, step_id)
1089
+ p result
1090
+ rescue OpenApiOpenAIClient::ApiError => e
1091
+ puts "Error when calling AssistantsApi->get_run_step: #{e}"
1092
+ end
1093
+ ```
1094
+
1095
+ #### Using the get_run_step_with_http_info variant
1096
+
1097
+ This returns an Array which contains the response data, status code and headers.
1098
+
1099
+ > <Array(<RunStepObject>, Integer, Hash)> get_run_step_with_http_info(thread_id, run_id, step_id)
1100
+
1101
+ ```ruby
1102
+ begin
1103
+ # Retrieves a run step.
1104
+ data, status_code, headers = api_instance.get_run_step_with_http_info(thread_id, run_id, step_id)
1105
+ p status_code # => 2xx
1106
+ p headers # => { ... }
1107
+ p data # => <RunStepObject>
1108
+ rescue OpenApiOpenAIClient::ApiError => e
1109
+ puts "Error when calling AssistantsApi->get_run_step_with_http_info: #{e}"
1110
+ end
1111
+ ```
1112
+
1113
+ ### Parameters
1114
+
1115
+ | Name | Type | Description | Notes |
1116
+ | ---- | ---- | ----------- | ----- |
1117
+ | **thread_id** | **String** | The ID of the thread to which the run and run step belongs. | |
1118
+ | **run_id** | **String** | The ID of the run to which the run step belongs. | |
1119
+ | **step_id** | **String** | The ID of the run step to retrieve. | |
1120
+
1121
+ ### Return type
1122
+
1123
+ [**RunStepObject**](RunStepObject.md)
1124
+
1125
+ ### Authorization
1126
+
1127
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1128
+
1129
+ ### HTTP request headers
1130
+
1131
+ - **Content-Type**: Not defined
1132
+ - **Accept**: application/json
1133
+
1134
+
1135
+ ## get_thread
1136
+
1137
+ > <ThreadObject> get_thread(thread_id)
1138
+
1139
+ Retrieves a thread.
1140
+
1141
+ ### Examples
1142
+
1143
+ ```ruby
1144
+ require 'time'
1145
+ require 'openapi_openai'
1146
+ # setup authorization
1147
+ OpenApiOpenAIClient.configure do |config|
1148
+ # Configure Bearer authorization: ApiKeyAuth
1149
+ config.access_token = 'YOUR_BEARER_TOKEN'
1150
+ end
1151
+
1152
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1153
+ thread_id = 'thread_id_example' # String | The ID of the thread to retrieve.
1154
+
1155
+ begin
1156
+ # Retrieves a thread.
1157
+ result = api_instance.get_thread(thread_id)
1158
+ p result
1159
+ rescue OpenApiOpenAIClient::ApiError => e
1160
+ puts "Error when calling AssistantsApi->get_thread: #{e}"
1161
+ end
1162
+ ```
1163
+
1164
+ #### Using the get_thread_with_http_info variant
1165
+
1166
+ This returns an Array which contains the response data, status code and headers.
1167
+
1168
+ > <Array(<ThreadObject>, Integer, Hash)> get_thread_with_http_info(thread_id)
1169
+
1170
+ ```ruby
1171
+ begin
1172
+ # Retrieves a thread.
1173
+ data, status_code, headers = api_instance.get_thread_with_http_info(thread_id)
1174
+ p status_code # => 2xx
1175
+ p headers # => { ... }
1176
+ p data # => <ThreadObject>
1177
+ rescue OpenApiOpenAIClient::ApiError => e
1178
+ puts "Error when calling AssistantsApi->get_thread_with_http_info: #{e}"
1179
+ end
1180
+ ```
1181
+
1182
+ ### Parameters
1183
+
1184
+ | Name | Type | Description | Notes |
1185
+ | ---- | ---- | ----------- | ----- |
1186
+ | **thread_id** | **String** | The ID of the thread to retrieve. | |
1187
+
1188
+ ### Return type
1189
+
1190
+ [**ThreadObject**](ThreadObject.md)
1191
+
1192
+ ### Authorization
1193
+
1194
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1195
+
1196
+ ### HTTP request headers
1197
+
1198
+ - **Content-Type**: Not defined
1199
+ - **Accept**: application/json
1200
+
1201
+
1202
+ ## list_assistant_files
1203
+
1204
+ > <ListAssistantFilesResponse> list_assistant_files(assistant_id, opts)
1205
+
1206
+ Returns a list of assistant files.
1207
+
1208
+ ### Examples
1209
+
1210
+ ```ruby
1211
+ require 'time'
1212
+ require 'openapi_openai'
1213
+ # setup authorization
1214
+ OpenApiOpenAIClient.configure do |config|
1215
+ # Configure Bearer authorization: ApiKeyAuth
1216
+ config.access_token = 'YOUR_BEARER_TOKEN'
1217
+ end
1218
+
1219
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1220
+ assistant_id = 'assistant_id_example' # String | The ID of the assistant the file belongs to.
1221
+ opts = {
1222
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
1223
+ order: 'asc', # String | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
1224
+ after: 'after_example', # String | A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
1225
+ before: 'before_example' # String | A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
1226
+ }
1227
+
1228
+ begin
1229
+ # Returns a list of assistant files.
1230
+ result = api_instance.list_assistant_files(assistant_id, opts)
1231
+ p result
1232
+ rescue OpenApiOpenAIClient::ApiError => e
1233
+ puts "Error when calling AssistantsApi->list_assistant_files: #{e}"
1234
+ end
1235
+ ```
1236
+
1237
+ #### Using the list_assistant_files_with_http_info variant
1238
+
1239
+ This returns an Array which contains the response data, status code and headers.
1240
+
1241
+ > <Array(<ListAssistantFilesResponse>, Integer, Hash)> list_assistant_files_with_http_info(assistant_id, opts)
1242
+
1243
+ ```ruby
1244
+ begin
1245
+ # Returns a list of assistant files.
1246
+ data, status_code, headers = api_instance.list_assistant_files_with_http_info(assistant_id, opts)
1247
+ p status_code # => 2xx
1248
+ p headers # => { ... }
1249
+ p data # => <ListAssistantFilesResponse>
1250
+ rescue OpenApiOpenAIClient::ApiError => e
1251
+ puts "Error when calling AssistantsApi->list_assistant_files_with_http_info: #{e}"
1252
+ end
1253
+ ```
1254
+
1255
+ ### Parameters
1256
+
1257
+ | Name | Type | Description | Notes |
1258
+ | ---- | ---- | ----------- | ----- |
1259
+ | **assistant_id** | **String** | The ID of the assistant the file belongs to. | |
1260
+ | **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional][default to 20] |
1261
+ | **order** | **String** | Sort order by the &#x60;created_at&#x60; timestamp of the objects. &#x60;asc&#x60; for ascending order and &#x60;desc&#x60; for descending order. | [optional][default to &#39;desc&#39;] |
1262
+ | **after** | **String** | A cursor for use in pagination. &#x60;after&#x60; is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after&#x3D;obj_foo in order to fetch the next page of the list. | [optional] |
1263
+ | **before** | **String** | A cursor for use in pagination. &#x60;before&#x60; is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before&#x3D;obj_foo in order to fetch the previous page of the list. | [optional] |
1264
+
1265
+ ### Return type
1266
+
1267
+ [**ListAssistantFilesResponse**](ListAssistantFilesResponse.md)
1268
+
1269
+ ### Authorization
1270
+
1271
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1272
+
1273
+ ### HTTP request headers
1274
+
1275
+ - **Content-Type**: Not defined
1276
+ - **Accept**: application/json
1277
+
1278
+
1279
+ ## list_assistants
1280
+
1281
+ > <ListAssistantsResponse> list_assistants(opts)
1282
+
1283
+ Returns a list of assistants.
1284
+
1285
+ ### Examples
1286
+
1287
+ ```ruby
1288
+ require 'time'
1289
+ require 'openapi_openai'
1290
+ # setup authorization
1291
+ OpenApiOpenAIClient.configure do |config|
1292
+ # Configure Bearer authorization: ApiKeyAuth
1293
+ config.access_token = 'YOUR_BEARER_TOKEN'
1294
+ end
1295
+
1296
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1297
+ opts = {
1298
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
1299
+ order: 'asc', # String | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
1300
+ after: 'after_example', # String | A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
1301
+ before: 'before_example' # String | A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
1302
+ }
1303
+
1304
+ begin
1305
+ # Returns a list of assistants.
1306
+ result = api_instance.list_assistants(opts)
1307
+ p result
1308
+ rescue OpenApiOpenAIClient::ApiError => e
1309
+ puts "Error when calling AssistantsApi->list_assistants: #{e}"
1310
+ end
1311
+ ```
1312
+
1313
+ #### Using the list_assistants_with_http_info variant
1314
+
1315
+ This returns an Array which contains the response data, status code and headers.
1316
+
1317
+ > <Array(<ListAssistantsResponse>, Integer, Hash)> list_assistants_with_http_info(opts)
1318
+
1319
+ ```ruby
1320
+ begin
1321
+ # Returns a list of assistants.
1322
+ data, status_code, headers = api_instance.list_assistants_with_http_info(opts)
1323
+ p status_code # => 2xx
1324
+ p headers # => { ... }
1325
+ p data # => <ListAssistantsResponse>
1326
+ rescue OpenApiOpenAIClient::ApiError => e
1327
+ puts "Error when calling AssistantsApi->list_assistants_with_http_info: #{e}"
1328
+ end
1329
+ ```
1330
+
1331
+ ### Parameters
1332
+
1333
+ | Name | Type | Description | Notes |
1334
+ | ---- | ---- | ----------- | ----- |
1335
+ | **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional][default to 20] |
1336
+ | **order** | **String** | Sort order by the &#x60;created_at&#x60; timestamp of the objects. &#x60;asc&#x60; for ascending order and &#x60;desc&#x60; for descending order. | [optional][default to &#39;desc&#39;] |
1337
+ | **after** | **String** | A cursor for use in pagination. &#x60;after&#x60; is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after&#x3D;obj_foo in order to fetch the next page of the list. | [optional] |
1338
+ | **before** | **String** | A cursor for use in pagination. &#x60;before&#x60; is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before&#x3D;obj_foo in order to fetch the previous page of the list. | [optional] |
1339
+
1340
+ ### Return type
1341
+
1342
+ [**ListAssistantsResponse**](ListAssistantsResponse.md)
1343
+
1344
+ ### Authorization
1345
+
1346
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1347
+
1348
+ ### HTTP request headers
1349
+
1350
+ - **Content-Type**: Not defined
1351
+ - **Accept**: application/json
1352
+
1353
+
1354
+ ## list_message_files
1355
+
1356
+ > <ListMessageFilesResponse> list_message_files(thread_id, message_id, opts)
1357
+
1358
+ Returns a list of message files.
1359
+
1360
+ ### Examples
1361
+
1362
+ ```ruby
1363
+ require 'time'
1364
+ require 'openapi_openai'
1365
+ # setup authorization
1366
+ OpenApiOpenAIClient.configure do |config|
1367
+ # Configure Bearer authorization: ApiKeyAuth
1368
+ config.access_token = 'YOUR_BEARER_TOKEN'
1369
+ end
1370
+
1371
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1372
+ thread_id = 'thread_id_example' # String | The ID of the thread that the message and files belong to.
1373
+ message_id = 'message_id_example' # String | The ID of the message that the files belongs to.
1374
+ opts = {
1375
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
1376
+ order: 'asc', # String | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
1377
+ after: 'after_example', # String | A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
1378
+ before: 'before_example' # String | A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
1379
+ }
1380
+
1381
+ begin
1382
+ # Returns a list of message files.
1383
+ result = api_instance.list_message_files(thread_id, message_id, opts)
1384
+ p result
1385
+ rescue OpenApiOpenAIClient::ApiError => e
1386
+ puts "Error when calling AssistantsApi->list_message_files: #{e}"
1387
+ end
1388
+ ```
1389
+
1390
+ #### Using the list_message_files_with_http_info variant
1391
+
1392
+ This returns an Array which contains the response data, status code and headers.
1393
+
1394
+ > <Array(<ListMessageFilesResponse>, Integer, Hash)> list_message_files_with_http_info(thread_id, message_id, opts)
1395
+
1396
+ ```ruby
1397
+ begin
1398
+ # Returns a list of message files.
1399
+ data, status_code, headers = api_instance.list_message_files_with_http_info(thread_id, message_id, opts)
1400
+ p status_code # => 2xx
1401
+ p headers # => { ... }
1402
+ p data # => <ListMessageFilesResponse>
1403
+ rescue OpenApiOpenAIClient::ApiError => e
1404
+ puts "Error when calling AssistantsApi->list_message_files_with_http_info: #{e}"
1405
+ end
1406
+ ```
1407
+
1408
+ ### Parameters
1409
+
1410
+ | Name | Type | Description | Notes |
1411
+ | ---- | ---- | ----------- | ----- |
1412
+ | **thread_id** | **String** | The ID of the thread that the message and files belong to. | |
1413
+ | **message_id** | **String** | The ID of the message that the files belongs to. | |
1414
+ | **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional][default to 20] |
1415
+ | **order** | **String** | Sort order by the &#x60;created_at&#x60; timestamp of the objects. &#x60;asc&#x60; for ascending order and &#x60;desc&#x60; for descending order. | [optional][default to &#39;desc&#39;] |
1416
+ | **after** | **String** | A cursor for use in pagination. &#x60;after&#x60; is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after&#x3D;obj_foo in order to fetch the next page of the list. | [optional] |
1417
+ | **before** | **String** | A cursor for use in pagination. &#x60;before&#x60; is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before&#x3D;obj_foo in order to fetch the previous page of the list. | [optional] |
1418
+
1419
+ ### Return type
1420
+
1421
+ [**ListMessageFilesResponse**](ListMessageFilesResponse.md)
1422
+
1423
+ ### Authorization
1424
+
1425
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1426
+
1427
+ ### HTTP request headers
1428
+
1429
+ - **Content-Type**: Not defined
1430
+ - **Accept**: application/json
1431
+
1432
+
1433
+ ## list_messages
1434
+
1435
+ > <ListMessagesResponse> list_messages(thread_id, opts)
1436
+
1437
+ Returns a list of messages for a given thread.
1438
+
1439
+ ### Examples
1440
+
1441
+ ```ruby
1442
+ require 'time'
1443
+ require 'openapi_openai'
1444
+ # setup authorization
1445
+ OpenApiOpenAIClient.configure do |config|
1446
+ # Configure Bearer authorization: ApiKeyAuth
1447
+ config.access_token = 'YOUR_BEARER_TOKEN'
1448
+ end
1449
+
1450
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1451
+ thread_id = 'thread_id_example' # String | The ID of the [thread](/docs/api-reference/threads) the messages belong to.
1452
+ opts = {
1453
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
1454
+ order: 'asc', # String | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
1455
+ after: 'after_example', # String | A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
1456
+ before: 'before_example', # String | A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
1457
+ run_id: 'run_id_example' # String | Filter messages by the run ID that generated them.
1458
+ }
1459
+
1460
+ begin
1461
+ # Returns a list of messages for a given thread.
1462
+ result = api_instance.list_messages(thread_id, opts)
1463
+ p result
1464
+ rescue OpenApiOpenAIClient::ApiError => e
1465
+ puts "Error when calling AssistantsApi->list_messages: #{e}"
1466
+ end
1467
+ ```
1468
+
1469
+ #### Using the list_messages_with_http_info variant
1470
+
1471
+ This returns an Array which contains the response data, status code and headers.
1472
+
1473
+ > <Array(<ListMessagesResponse>, Integer, Hash)> list_messages_with_http_info(thread_id, opts)
1474
+
1475
+ ```ruby
1476
+ begin
1477
+ # Returns a list of messages for a given thread.
1478
+ data, status_code, headers = api_instance.list_messages_with_http_info(thread_id, opts)
1479
+ p status_code # => 2xx
1480
+ p headers # => { ... }
1481
+ p data # => <ListMessagesResponse>
1482
+ rescue OpenApiOpenAIClient::ApiError => e
1483
+ puts "Error when calling AssistantsApi->list_messages_with_http_info: #{e}"
1484
+ end
1485
+ ```
1486
+
1487
+ ### Parameters
1488
+
1489
+ | Name | Type | Description | Notes |
1490
+ | ---- | ---- | ----------- | ----- |
1491
+ | **thread_id** | **String** | The ID of the [thread](/docs/api-reference/threads) the messages belong to. | |
1492
+ | **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional][default to 20] |
1493
+ | **order** | **String** | Sort order by the &#x60;created_at&#x60; timestamp of the objects. &#x60;asc&#x60; for ascending order and &#x60;desc&#x60; for descending order. | [optional][default to &#39;desc&#39;] |
1494
+ | **after** | **String** | A cursor for use in pagination. &#x60;after&#x60; is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after&#x3D;obj_foo in order to fetch the next page of the list. | [optional] |
1495
+ | **before** | **String** | A cursor for use in pagination. &#x60;before&#x60; is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before&#x3D;obj_foo in order to fetch the previous page of the list. | [optional] |
1496
+ | **run_id** | **String** | Filter messages by the run ID that generated them. | [optional] |
1497
+
1498
+ ### Return type
1499
+
1500
+ [**ListMessagesResponse**](ListMessagesResponse.md)
1501
+
1502
+ ### Authorization
1503
+
1504
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1505
+
1506
+ ### HTTP request headers
1507
+
1508
+ - **Content-Type**: Not defined
1509
+ - **Accept**: application/json
1510
+
1511
+
1512
+ ## list_run_steps
1513
+
1514
+ > <ListRunStepsResponse> list_run_steps(thread_id, run_id, opts)
1515
+
1516
+ Returns a list of run steps belonging to a run.
1517
+
1518
+ ### Examples
1519
+
1520
+ ```ruby
1521
+ require 'time'
1522
+ require 'openapi_openai'
1523
+ # setup authorization
1524
+ OpenApiOpenAIClient.configure do |config|
1525
+ # Configure Bearer authorization: ApiKeyAuth
1526
+ config.access_token = 'YOUR_BEARER_TOKEN'
1527
+ end
1528
+
1529
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1530
+ thread_id = 'thread_id_example' # String | The ID of the thread the run and run steps belong to.
1531
+ run_id = 'run_id_example' # String | The ID of the run the run steps belong to.
1532
+ opts = {
1533
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
1534
+ order: 'asc', # String | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
1535
+ after: 'after_example', # String | A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
1536
+ before: 'before_example' # String | A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
1537
+ }
1538
+
1539
+ begin
1540
+ # Returns a list of run steps belonging to a run.
1541
+ result = api_instance.list_run_steps(thread_id, run_id, opts)
1542
+ p result
1543
+ rescue OpenApiOpenAIClient::ApiError => e
1544
+ puts "Error when calling AssistantsApi->list_run_steps: #{e}"
1545
+ end
1546
+ ```
1547
+
1548
+ #### Using the list_run_steps_with_http_info variant
1549
+
1550
+ This returns an Array which contains the response data, status code and headers.
1551
+
1552
+ > <Array(<ListRunStepsResponse>, Integer, Hash)> list_run_steps_with_http_info(thread_id, run_id, opts)
1553
+
1554
+ ```ruby
1555
+ begin
1556
+ # Returns a list of run steps belonging to a run.
1557
+ data, status_code, headers = api_instance.list_run_steps_with_http_info(thread_id, run_id, opts)
1558
+ p status_code # => 2xx
1559
+ p headers # => { ... }
1560
+ p data # => <ListRunStepsResponse>
1561
+ rescue OpenApiOpenAIClient::ApiError => e
1562
+ puts "Error when calling AssistantsApi->list_run_steps_with_http_info: #{e}"
1563
+ end
1564
+ ```
1565
+
1566
+ ### Parameters
1567
+
1568
+ | Name | Type | Description | Notes |
1569
+ | ---- | ---- | ----------- | ----- |
1570
+ | **thread_id** | **String** | The ID of the thread the run and run steps belong to. | |
1571
+ | **run_id** | **String** | The ID of the run the run steps belong to. | |
1572
+ | **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional][default to 20] |
1573
+ | **order** | **String** | Sort order by the &#x60;created_at&#x60; timestamp of the objects. &#x60;asc&#x60; for ascending order and &#x60;desc&#x60; for descending order. | [optional][default to &#39;desc&#39;] |
1574
+ | **after** | **String** | A cursor for use in pagination. &#x60;after&#x60; is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after&#x3D;obj_foo in order to fetch the next page of the list. | [optional] |
1575
+ | **before** | **String** | A cursor for use in pagination. &#x60;before&#x60; is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before&#x3D;obj_foo in order to fetch the previous page of the list. | [optional] |
1576
+
1577
+ ### Return type
1578
+
1579
+ [**ListRunStepsResponse**](ListRunStepsResponse.md)
1580
+
1581
+ ### Authorization
1582
+
1583
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1584
+
1585
+ ### HTTP request headers
1586
+
1587
+ - **Content-Type**: Not defined
1588
+ - **Accept**: application/json
1589
+
1590
+
1591
+ ## list_runs
1592
+
1593
+ > <ListRunsResponse> list_runs(thread_id, opts)
1594
+
1595
+ Returns a list of runs belonging to a thread.
1596
+
1597
+ ### Examples
1598
+
1599
+ ```ruby
1600
+ require 'time'
1601
+ require 'openapi_openai'
1602
+ # setup authorization
1603
+ OpenApiOpenAIClient.configure do |config|
1604
+ # Configure Bearer authorization: ApiKeyAuth
1605
+ config.access_token = 'YOUR_BEARER_TOKEN'
1606
+ end
1607
+
1608
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1609
+ thread_id = 'thread_id_example' # String | The ID of the thread the run belongs to.
1610
+ opts = {
1611
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
1612
+ order: 'asc', # String | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
1613
+ after: 'after_example', # String | A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
1614
+ before: 'before_example' # String | A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
1615
+ }
1616
+
1617
+ begin
1618
+ # Returns a list of runs belonging to a thread.
1619
+ result = api_instance.list_runs(thread_id, opts)
1620
+ p result
1621
+ rescue OpenApiOpenAIClient::ApiError => e
1622
+ puts "Error when calling AssistantsApi->list_runs: #{e}"
1623
+ end
1624
+ ```
1625
+
1626
+ #### Using the list_runs_with_http_info variant
1627
+
1628
+ This returns an Array which contains the response data, status code and headers.
1629
+
1630
+ > <Array(<ListRunsResponse>, Integer, Hash)> list_runs_with_http_info(thread_id, opts)
1631
+
1632
+ ```ruby
1633
+ begin
1634
+ # Returns a list of runs belonging to a thread.
1635
+ data, status_code, headers = api_instance.list_runs_with_http_info(thread_id, opts)
1636
+ p status_code # => 2xx
1637
+ p headers # => { ... }
1638
+ p data # => <ListRunsResponse>
1639
+ rescue OpenApiOpenAIClient::ApiError => e
1640
+ puts "Error when calling AssistantsApi->list_runs_with_http_info: #{e}"
1641
+ end
1642
+ ```
1643
+
1644
+ ### Parameters
1645
+
1646
+ | Name | Type | Description | Notes |
1647
+ | ---- | ---- | ----------- | ----- |
1648
+ | **thread_id** | **String** | The ID of the thread the run belongs to. | |
1649
+ | **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional][default to 20] |
1650
+ | **order** | **String** | Sort order by the &#x60;created_at&#x60; timestamp of the objects. &#x60;asc&#x60; for ascending order and &#x60;desc&#x60; for descending order. | [optional][default to &#39;desc&#39;] |
1651
+ | **after** | **String** | A cursor for use in pagination. &#x60;after&#x60; is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after&#x3D;obj_foo in order to fetch the next page of the list. | [optional] |
1652
+ | **before** | **String** | A cursor for use in pagination. &#x60;before&#x60; is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before&#x3D;obj_foo in order to fetch the previous page of the list. | [optional] |
1653
+
1654
+ ### Return type
1655
+
1656
+ [**ListRunsResponse**](ListRunsResponse.md)
1657
+
1658
+ ### Authorization
1659
+
1660
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1661
+
1662
+ ### HTTP request headers
1663
+
1664
+ - **Content-Type**: Not defined
1665
+ - **Accept**: application/json
1666
+
1667
+
1668
+ ## modify_assistant
1669
+
1670
+ > <AssistantObject> modify_assistant(assistant_id, modify_assistant_request)
1671
+
1672
+ Modifies an assistant.
1673
+
1674
+ ### Examples
1675
+
1676
+ ```ruby
1677
+ require 'time'
1678
+ require 'openapi_openai'
1679
+ # setup authorization
1680
+ OpenApiOpenAIClient.configure do |config|
1681
+ # Configure Bearer authorization: ApiKeyAuth
1682
+ config.access_token = 'YOUR_BEARER_TOKEN'
1683
+ end
1684
+
1685
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1686
+ assistant_id = 'assistant_id_example' # String | The ID of the assistant to modify.
1687
+ modify_assistant_request = OpenApiOpenAIClient::ModifyAssistantRequest.new # ModifyAssistantRequest |
1688
+
1689
+ begin
1690
+ # Modifies an assistant.
1691
+ result = api_instance.modify_assistant(assistant_id, modify_assistant_request)
1692
+ p result
1693
+ rescue OpenApiOpenAIClient::ApiError => e
1694
+ puts "Error when calling AssistantsApi->modify_assistant: #{e}"
1695
+ end
1696
+ ```
1697
+
1698
+ #### Using the modify_assistant_with_http_info variant
1699
+
1700
+ This returns an Array which contains the response data, status code and headers.
1701
+
1702
+ > <Array(<AssistantObject>, Integer, Hash)> modify_assistant_with_http_info(assistant_id, modify_assistant_request)
1703
+
1704
+ ```ruby
1705
+ begin
1706
+ # Modifies an assistant.
1707
+ data, status_code, headers = api_instance.modify_assistant_with_http_info(assistant_id, modify_assistant_request)
1708
+ p status_code # => 2xx
1709
+ p headers # => { ... }
1710
+ p data # => <AssistantObject>
1711
+ rescue OpenApiOpenAIClient::ApiError => e
1712
+ puts "Error when calling AssistantsApi->modify_assistant_with_http_info: #{e}"
1713
+ end
1714
+ ```
1715
+
1716
+ ### Parameters
1717
+
1718
+ | Name | Type | Description | Notes |
1719
+ | ---- | ---- | ----------- | ----- |
1720
+ | **assistant_id** | **String** | The ID of the assistant to modify. | |
1721
+ | **modify_assistant_request** | [**ModifyAssistantRequest**](ModifyAssistantRequest.md) | | |
1722
+
1723
+ ### Return type
1724
+
1725
+ [**AssistantObject**](AssistantObject.md)
1726
+
1727
+ ### Authorization
1728
+
1729
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1730
+
1731
+ ### HTTP request headers
1732
+
1733
+ - **Content-Type**: application/json
1734
+ - **Accept**: application/json
1735
+
1736
+
1737
+ ## modify_message
1738
+
1739
+ > <MessageObject> modify_message(thread_id, message_id, modify_message_request)
1740
+
1741
+ Modifies a message.
1742
+
1743
+ ### Examples
1744
+
1745
+ ```ruby
1746
+ require 'time'
1747
+ require 'openapi_openai'
1748
+ # setup authorization
1749
+ OpenApiOpenAIClient.configure do |config|
1750
+ # Configure Bearer authorization: ApiKeyAuth
1751
+ config.access_token = 'YOUR_BEARER_TOKEN'
1752
+ end
1753
+
1754
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1755
+ thread_id = 'thread_id_example' # String | The ID of the thread to which this message belongs.
1756
+ message_id = 'message_id_example' # String | The ID of the message to modify.
1757
+ modify_message_request = OpenApiOpenAIClient::ModifyMessageRequest.new # ModifyMessageRequest |
1758
+
1759
+ begin
1760
+ # Modifies a message.
1761
+ result = api_instance.modify_message(thread_id, message_id, modify_message_request)
1762
+ p result
1763
+ rescue OpenApiOpenAIClient::ApiError => e
1764
+ puts "Error when calling AssistantsApi->modify_message: #{e}"
1765
+ end
1766
+ ```
1767
+
1768
+ #### Using the modify_message_with_http_info variant
1769
+
1770
+ This returns an Array which contains the response data, status code and headers.
1771
+
1772
+ > <Array(<MessageObject>, Integer, Hash)> modify_message_with_http_info(thread_id, message_id, modify_message_request)
1773
+
1774
+ ```ruby
1775
+ begin
1776
+ # Modifies a message.
1777
+ data, status_code, headers = api_instance.modify_message_with_http_info(thread_id, message_id, modify_message_request)
1778
+ p status_code # => 2xx
1779
+ p headers # => { ... }
1780
+ p data # => <MessageObject>
1781
+ rescue OpenApiOpenAIClient::ApiError => e
1782
+ puts "Error when calling AssistantsApi->modify_message_with_http_info: #{e}"
1783
+ end
1784
+ ```
1785
+
1786
+ ### Parameters
1787
+
1788
+ | Name | Type | Description | Notes |
1789
+ | ---- | ---- | ----------- | ----- |
1790
+ | **thread_id** | **String** | The ID of the thread to which this message belongs. | |
1791
+ | **message_id** | **String** | The ID of the message to modify. | |
1792
+ | **modify_message_request** | [**ModifyMessageRequest**](ModifyMessageRequest.md) | | |
1793
+
1794
+ ### Return type
1795
+
1796
+ [**MessageObject**](MessageObject.md)
1797
+
1798
+ ### Authorization
1799
+
1800
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1801
+
1802
+ ### HTTP request headers
1803
+
1804
+ - **Content-Type**: application/json
1805
+ - **Accept**: application/json
1806
+
1807
+
1808
+ ## modify_run
1809
+
1810
+ > <RunObject> modify_run(thread_id, run_id, modify_run_request)
1811
+
1812
+ Modifies a run.
1813
+
1814
+ ### Examples
1815
+
1816
+ ```ruby
1817
+ require 'time'
1818
+ require 'openapi_openai'
1819
+ # setup authorization
1820
+ OpenApiOpenAIClient.configure do |config|
1821
+ # Configure Bearer authorization: ApiKeyAuth
1822
+ config.access_token = 'YOUR_BEARER_TOKEN'
1823
+ end
1824
+
1825
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1826
+ thread_id = 'thread_id_example' # String | The ID of the [thread](/docs/api-reference/threads) that was run.
1827
+ run_id = 'run_id_example' # String | The ID of the run to modify.
1828
+ modify_run_request = OpenApiOpenAIClient::ModifyRunRequest.new # ModifyRunRequest |
1829
+
1830
+ begin
1831
+ # Modifies a run.
1832
+ result = api_instance.modify_run(thread_id, run_id, modify_run_request)
1833
+ p result
1834
+ rescue OpenApiOpenAIClient::ApiError => e
1835
+ puts "Error when calling AssistantsApi->modify_run: #{e}"
1836
+ end
1837
+ ```
1838
+
1839
+ #### Using the modify_run_with_http_info variant
1840
+
1841
+ This returns an Array which contains the response data, status code and headers.
1842
+
1843
+ > <Array(<RunObject>, Integer, Hash)> modify_run_with_http_info(thread_id, run_id, modify_run_request)
1844
+
1845
+ ```ruby
1846
+ begin
1847
+ # Modifies a run.
1848
+ data, status_code, headers = api_instance.modify_run_with_http_info(thread_id, run_id, modify_run_request)
1849
+ p status_code # => 2xx
1850
+ p headers # => { ... }
1851
+ p data # => <RunObject>
1852
+ rescue OpenApiOpenAIClient::ApiError => e
1853
+ puts "Error when calling AssistantsApi->modify_run_with_http_info: #{e}"
1854
+ end
1855
+ ```
1856
+
1857
+ ### Parameters
1858
+
1859
+ | Name | Type | Description | Notes |
1860
+ | ---- | ---- | ----------- | ----- |
1861
+ | **thread_id** | **String** | The ID of the [thread](/docs/api-reference/threads) that was run. | |
1862
+ | **run_id** | **String** | The ID of the run to modify. | |
1863
+ | **modify_run_request** | [**ModifyRunRequest**](ModifyRunRequest.md) | | |
1864
+
1865
+ ### Return type
1866
+
1867
+ [**RunObject**](RunObject.md)
1868
+
1869
+ ### Authorization
1870
+
1871
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1872
+
1873
+ ### HTTP request headers
1874
+
1875
+ - **Content-Type**: application/json
1876
+ - **Accept**: application/json
1877
+
1878
+
1879
+ ## modify_thread
1880
+
1881
+ > <ThreadObject> modify_thread(thread_id, modify_thread_request)
1882
+
1883
+ Modifies a thread.
1884
+
1885
+ ### Examples
1886
+
1887
+ ```ruby
1888
+ require 'time'
1889
+ require 'openapi_openai'
1890
+ # setup authorization
1891
+ OpenApiOpenAIClient.configure do |config|
1892
+ # Configure Bearer authorization: ApiKeyAuth
1893
+ config.access_token = 'YOUR_BEARER_TOKEN'
1894
+ end
1895
+
1896
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1897
+ thread_id = 'thread_id_example' # String | The ID of the thread to modify. Only the `metadata` can be modified.
1898
+ modify_thread_request = OpenApiOpenAIClient::ModifyThreadRequest.new # ModifyThreadRequest |
1899
+
1900
+ begin
1901
+ # Modifies a thread.
1902
+ result = api_instance.modify_thread(thread_id, modify_thread_request)
1903
+ p result
1904
+ rescue OpenApiOpenAIClient::ApiError => e
1905
+ puts "Error when calling AssistantsApi->modify_thread: #{e}"
1906
+ end
1907
+ ```
1908
+
1909
+ #### Using the modify_thread_with_http_info variant
1910
+
1911
+ This returns an Array which contains the response data, status code and headers.
1912
+
1913
+ > <Array(<ThreadObject>, Integer, Hash)> modify_thread_with_http_info(thread_id, modify_thread_request)
1914
+
1915
+ ```ruby
1916
+ begin
1917
+ # Modifies a thread.
1918
+ data, status_code, headers = api_instance.modify_thread_with_http_info(thread_id, modify_thread_request)
1919
+ p status_code # => 2xx
1920
+ p headers # => { ... }
1921
+ p data # => <ThreadObject>
1922
+ rescue OpenApiOpenAIClient::ApiError => e
1923
+ puts "Error when calling AssistantsApi->modify_thread_with_http_info: #{e}"
1924
+ end
1925
+ ```
1926
+
1927
+ ### Parameters
1928
+
1929
+ | Name | Type | Description | Notes |
1930
+ | ---- | ---- | ----------- | ----- |
1931
+ | **thread_id** | **String** | The ID of the thread to modify. Only the &#x60;metadata&#x60; can be modified. | |
1932
+ | **modify_thread_request** | [**ModifyThreadRequest**](ModifyThreadRequest.md) | | |
1933
+
1934
+ ### Return type
1935
+
1936
+ [**ThreadObject**](ThreadObject.md)
1937
+
1938
+ ### Authorization
1939
+
1940
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
1941
+
1942
+ ### HTTP request headers
1943
+
1944
+ - **Content-Type**: application/json
1945
+ - **Accept**: application/json
1946
+
1947
+
1948
+ ## submit_tool_ouputs_to_run
1949
+
1950
+ > <RunObject> submit_tool_ouputs_to_run(thread_id, run_id, submit_tool_outputs_run_request)
1951
+
1952
+ When a run has the `status: \"requires_action\"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.
1953
+
1954
+ ### Examples
1955
+
1956
+ ```ruby
1957
+ require 'time'
1958
+ require 'openapi_openai'
1959
+ # setup authorization
1960
+ OpenApiOpenAIClient.configure do |config|
1961
+ # Configure Bearer authorization: ApiKeyAuth
1962
+ config.access_token = 'YOUR_BEARER_TOKEN'
1963
+ end
1964
+
1965
+ api_instance = OpenApiOpenAIClient::AssistantsApi.new
1966
+ thread_id = 'thread_id_example' # String | The ID of the [thread](/docs/api-reference/threads) to which this run belongs.
1967
+ run_id = 'run_id_example' # String | The ID of the run that requires the tool output submission.
1968
+ submit_tool_outputs_run_request = OpenApiOpenAIClient::SubmitToolOutputsRunRequest.new({tool_outputs: [OpenApiOpenAIClient::SubmitToolOutputsRunRequestToolOutputsInner.new]}) # SubmitToolOutputsRunRequest |
1969
+
1970
+ begin
1971
+ # When a run has the `status: \"requires_action\"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.
1972
+ result = api_instance.submit_tool_ouputs_to_run(thread_id, run_id, submit_tool_outputs_run_request)
1973
+ p result
1974
+ rescue OpenApiOpenAIClient::ApiError => e
1975
+ puts "Error when calling AssistantsApi->submit_tool_ouputs_to_run: #{e}"
1976
+ end
1977
+ ```
1978
+
1979
+ #### Using the submit_tool_ouputs_to_run_with_http_info variant
1980
+
1981
+ This returns an Array which contains the response data, status code and headers.
1982
+
1983
+ > <Array(<RunObject>, Integer, Hash)> submit_tool_ouputs_to_run_with_http_info(thread_id, run_id, submit_tool_outputs_run_request)
1984
+
1985
+ ```ruby
1986
+ begin
1987
+ # When a run has the `status: \"requires_action\"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.
1988
+ data, status_code, headers = api_instance.submit_tool_ouputs_to_run_with_http_info(thread_id, run_id, submit_tool_outputs_run_request)
1989
+ p status_code # => 2xx
1990
+ p headers # => { ... }
1991
+ p data # => <RunObject>
1992
+ rescue OpenApiOpenAIClient::ApiError => e
1993
+ puts "Error when calling AssistantsApi->submit_tool_ouputs_to_run_with_http_info: #{e}"
1994
+ end
1995
+ ```
1996
+
1997
+ ### Parameters
1998
+
1999
+ | Name | Type | Description | Notes |
2000
+ | ---- | ---- | ----------- | ----- |
2001
+ | **thread_id** | **String** | The ID of the [thread](/docs/api-reference/threads) to which this run belongs. | |
2002
+ | **run_id** | **String** | The ID of the run that requires the tool output submission. | |
2003
+ | **submit_tool_outputs_run_request** | [**SubmitToolOutputsRunRequest**](SubmitToolOutputsRunRequest.md) | | |
2004
+
2005
+ ### Return type
2006
+
2007
+ [**RunObject**](RunObject.md)
2008
+
2009
+ ### Authorization
2010
+
2011
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
2012
+
2013
+ ### HTTP request headers
2014
+
2015
+ - **Content-Type**: application/json
2016
+ - **Accept**: application/json
2017
+