SYMBOL INDEX (970 symbols across 90 files) FILE: api_integration_test.go function TestAPI (line 18) | func TestAPI(t *testing.T) { function TestCompletionStream (line 113) | func TestCompletionStream(t *testing.T) { function TestAPIError (line 148) | func TestAPIError(t *testing.T) { function TestChatCompletionResponseFormat_JSONSchema (line 183) | func TestChatCompletionResponseFormat_JSONSchema(t *testing.T) { function TestChatCompletionStructuredOutputsFunctionCalling (line 240) | func TestChatCompletionStructuredOutputsFunctionCalling(t *testing.T) { FILE: api_internal_test.go function TestOpenAIFullURL (line 8) | func TestOpenAIFullURL(t *testing.T) { function TestRequestAuthHeader (line 39) | func TestRequestAuthHeader(t *testing.T) { function TestAzureFullURL (line 110) | func TestAzureFullURL(t *testing.T) { function TestCloudflareAzureFullURL (line 163) | func TestCloudflareAzureFullURL(t *testing.T) { FILE: assistant.go constant assistantsSuffix (line 12) | assistantsSuffix = "/assistants" constant assistantsFilesSuffix (line 13) | assistantsFilesSuffix = "/files" type Assistant (line 16) | type Assistant struct type AssistantToolType (line 35) | type AssistantToolType constant AssistantToolTypeCodeInterpreter (line 38) | AssistantToolTypeCodeInterpreter AssistantToolType = "code_interpreter" constant AssistantToolTypeRetrieval (line 39) | AssistantToolTypeRetrieval AssistantToolType = "retrieval" constant AssistantToolTypeFunction (line 40) | AssistantToolTypeFunction AssistantToolType = "function" constant AssistantToolTypeFileSearch (line 41) | AssistantToolTypeFileSearch AssistantToolType = "file_search" type AssistantTool (line 44) | type AssistantTool struct type AssistantToolFileSearch (line 49) | type AssistantToolFileSearch struct type AssistantToolCodeInterpreter (line 53) | type AssistantToolCodeInterpreter struct type AssistantToolResource (line 57) | type AssistantToolResource struct type AssistantRequest (line 67) | type AssistantRequest struct method MarshalJSON (line 85) | func (a AssistantRequest) MarshalJSON() ([]byte, error) { type AssistantsList (line 102) | type AssistantsList struct type AssistantDeleteResponse (line 110) | type AssistantDeleteResponse struct type AssistantFile (line 118) | type AssistantFile struct type AssistantFileRequest (line 127) | type AssistantFileRequest struct type AssistantFilesList (line 131) | type AssistantFilesList struct method CreateAssistant (line 138) | func (c *Client) CreateAssistant(ctx context.Context, request AssistantR... method RetrieveAssistant (line 150) | func (c *Client) RetrieveAssistant( method ModifyAssistant (line 166) | func (c *Client) ModifyAssistant( method DeleteAssistant (line 183) | func (c *Client) DeleteAssistant( method ListAssistants (line 199) | func (c *Client) ListAssistants( method CreateAssistantFile (line 237) | func (c *Client) CreateAssistantFile( method RetrieveAssistantFile (line 255) | func (c *Client) RetrieveAssistantFile( method DeleteAssistantFile (line 272) | func (c *Client) DeleteAssistantFile( method ListAssistantFiles (line 289) | func (c *Client) ListAssistantFiles( FILE: assistant_test.go function TestAssistant (line 16) | func TestAssistant(t *testing.T) { function TestAzureAssistant (line 259) | func TestAzureAssistant(t *testing.T) { FILE: audio.go constant Whisper1 (line 16) | Whisper1 = "whisper-1" type AudioResponseFormat (line 20) | type AudioResponseFormat constant AudioResponseFormatJSON (line 23) | AudioResponseFormatJSON AudioResponseFormat = "json" constant AudioResponseFormatText (line 24) | AudioResponseFormatText AudioResponseFormat = "text" constant AudioResponseFormatSRT (line 25) | AudioResponseFormatSRT AudioResponseFormat = "srt" constant AudioResponseFormatVerboseJSON (line 26) | AudioResponseFormatVerboseJSON AudioResponseFormat = "verbose_json" constant AudioResponseFormatVTT (line 27) | AudioResponseFormatVTT AudioResponseFormat = "vtt" type TranscriptionTimestampGranularity (line 30) | type TranscriptionTimestampGranularity constant TranscriptionTimestampGranularityWord (line 33) | TranscriptionTimestampGranularityWord TranscriptionTimestampGranulari... constant TranscriptionTimestampGranularitySegment (line 34) | TranscriptionTimestampGranularitySegment TranscriptionTimestampGranulari... type AudioRequest (line 38) | type AudioRequest struct method HasJSONResponse (line 150) | func (r AudioRequest) HasJSONResponse() bool { type AudioResponse (line 55) | type AudioResponse struct type audioTextResponse (line 82) | type audioTextResponse struct method ToAudioResponse (line 88) | func (r *audioTextResponse) ToAudioResponse() AudioResponse { method CreateTranscription (line 96) | func (c *Client) CreateTranscription( method CreateTranslation (line 104) | func (c *Client) CreateTranslation( method callAudioAPI (line 112) | func (c *Client) callAudioAPI( function audioMultipartForm (line 156) | func audioMultipartForm(request AudioRequest, b utils.FormBuilder) error { function createFileField (line 213) | func createFileField(request AudioRequest, b utils.FormBuilder) error { FILE: audio_api_test.go function TestAudio (line 21) | func TestAudio(t *testing.T) { function TestAudioWithOptionalArgs (line 68) | func TestAudioWithOptionalArgs(t *testing.T) { function handleAudioEndpoint (line 114) | func handleAudioEndpoint(w http.ResponseWriter, r *http.Request) { FILE: audio_test.go function TestAudioWithFailingFormBuilder (line 19) | func TestAudioWithFailingFormBuilder(t *testing.T) { function TestCreateFileField (line 66) | func TestCreateFileField(t *testing.T) { type failingFormBuilder (line 116) | type failingFormBuilder struct method CreateFormFile (line 118) | func (f *failingFormBuilder) CreateFormFile(_ string, _ *os.File) error { method CreateFormFileReader (line 122) | func (f *failingFormBuilder) CreateFormFileReader(_ string, _ io.Reade... method WriteField (line 126) | func (f *failingFormBuilder) WriteField(_, _ string) error { method Close (line 130) | func (f *failingFormBuilder) Close() error { method FormDataContentType (line 134) | func (f *failingFormBuilder) FormDataContentType() string { type failingAudioRequestBuilder (line 139) | type failingAudioRequestBuilder struct method Build (line 141) | func (f *failingAudioRequestBuilder) Build( type errorHTTPClient (line 151) | type errorHTTPClient struct method Do (line 153) | func (e *errorHTTPClient) Do(_ *http.Request) (*http.Response, error) { function TestCallAudioAPIMultipartFormError (line 157) | func TestCallAudioAPIMultipartFormError(t *testing.T) { function TestCallAudioAPINewRequestError (line 176) | func TestCallAudioAPINewRequestError(t *testing.T) { function TestCallAudioAPISendRequestErrorJSON (line 198) | func TestCallAudioAPISendRequestErrorJSON(t *testing.T) { function TestCallAudioAPISendRequestErrorText (line 221) | func TestCallAudioAPISendRequestErrorText(t *testing.T) { FILE: batch.go constant batchesSuffix (line 12) | batchesSuffix = "/batches" type BatchEndpoint (line 14) | type BatchEndpoint constant BatchEndpointChatCompletions (line 17) | BatchEndpointChatCompletions BatchEndpoint = "/v1/chat/completions" constant BatchEndpointCompletions (line 18) | BatchEndpointCompletions BatchEndpoint = "/v1/completions" constant BatchEndpointEmbeddings (line 19) | BatchEndpointEmbeddings BatchEndpoint = "/v1/embeddings" type BatchLineItem (line 22) | type BatchLineItem interface type BatchChatCompletionRequest (line 26) | type BatchChatCompletionRequest struct method MarshalBatchLineItem (line 33) | func (r BatchChatCompletionRequest) MarshalBatchLineItem() []byte { type BatchCompletionRequest (line 38) | type BatchCompletionRequest struct method MarshalBatchLineItem (line 45) | func (r BatchCompletionRequest) MarshalBatchLineItem() []byte { type BatchEmbeddingRequest (line 50) | type BatchEmbeddingRequest struct method MarshalBatchLineItem (line 57) | func (r BatchEmbeddingRequest) MarshalBatchLineItem() []byte { type Batch (line 62) | type Batch struct type BatchRequestCounts (line 93) | type BatchRequestCounts struct type CreateBatchRequest (line 99) | type CreateBatchRequest struct type BatchResponse (line 106) | type BatchResponse struct method CreateBatch (line 112) | func (c *Client) CreateBatch( type UploadBatchFileRequest (line 129) | type UploadBatchFileRequest struct method MarshalJSONL (line 134) | func (r *UploadBatchFileRequest) MarshalJSONL() []byte { method AddChatCompletion (line 145) | func (r *UploadBatchFileRequest) AddChatCompletion(customerID string, ... method AddCompletion (line 154) | func (r *UploadBatchFileRequest) AddCompletion(customerID string, body... method AddEmbedding (line 163) | func (r *UploadBatchFileRequest) AddEmbedding(customerID string, body ... method UploadBatchFile (line 173) | func (c *Client) UploadBatchFile(ctx context.Context, request UploadBatc... type CreateBatchWithUploadFileRequest (line 184) | type CreateBatchWithUploadFileRequest struct method CreateBatchWithUploadFile (line 192) | func (c *Client) CreateBatchWithUploadFile( method RetrieveBatch (line 213) | func (c *Client) RetrieveBatch( method CancelBatch (line 227) | func (c *Client) CancelBatch( type ListBatchResponse (line 240) | type ListBatchResponse struct method ListBatch (line 250) | func (c *Client) ListBatch(ctx context.Context, after *string, limit *in... FILE: batch_test.go function TestUploadBatchFile (line 14) | func TestUploadBatchFile(t *testing.T) { function TestCreateBatch (line 34) | func TestCreateBatch(t *testing.T) { function TestCreateBatchWithUploadFile (line 47) | func TestCreateBatchWithUploadFile(t *testing.T) { function TestRetrieveBatch (line 69) | func TestRetrieveBatch(t *testing.T) { function TestCancelBatch (line 77) | func TestCancelBatch(t *testing.T) { function TestListBatch (line 85) | func TestListBatch(t *testing.T) { function TestUploadBatchFileRequest_AddChatCompletion (line 95) | func TestUploadBatchFileRequest_AddChatCompletion(t *testing.T) { function TestUploadBatchFileRequest_AddCompletion (line 148) | func TestUploadBatchFileRequest_AddCompletion(t *testing.T) { function TestUploadBatchFileRequest_AddEmbedding (line 189) | func TestUploadBatchFileRequest_AddEmbedding(t *testing.T) { function handleBatchEndpoint (line 230) | func handleBatchEndpoint(w http.ResponseWriter, r *http.Request) { function handleRetrieveBatchEndpoint (line 302) | func handleRetrieveBatchEndpoint(w http.ResponseWriter, r *http.Request) { function handleCancelBatchEndpoint (line 336) | func handleCancelBatchEndpoint(w http.ResponseWriter, r *http.Request) { FILE: chat.go constant ChatMessageRoleSystem (line 14) | ChatMessageRoleSystem = "system" constant ChatMessageRoleUser (line 15) | ChatMessageRoleUser = "user" constant ChatMessageRoleAssistant (line 16) | ChatMessageRoleAssistant = "assistant" constant ChatMessageRoleFunction (line 17) | ChatMessageRoleFunction = "function" constant ChatMessageRoleTool (line 18) | ChatMessageRoleTool = "tool" constant ChatMessageRoleDeveloper (line 19) | ChatMessageRoleDeveloper = "developer" constant chatCompletionsSuffix (line 22) | chatCompletionsSuffix = "/chat/completions" type Hate (line 30) | type Hate struct type SelfHarm (line 34) | type SelfHarm struct type Sexual (line 38) | type Sexual struct type Violence (line 42) | type Violence struct type JailBreak (line 47) | type JailBreak struct type Profanity (line 52) | type Profanity struct type ContentFilterResults (line 57) | type ContentFilterResults struct type PromptAnnotation (line 66) | type PromptAnnotation struct type ImageURLDetail (line 71) | type ImageURLDetail constant ImageURLDetailHigh (line 74) | ImageURLDetailHigh ImageURLDetail = "high" constant ImageURLDetailLow (line 75) | ImageURLDetailLow ImageURLDetail = "low" constant ImageURLDetailAuto (line 76) | ImageURLDetailAuto ImageURLDetail = "auto" type ChatMessageImageURL (line 79) | type ChatMessageImageURL struct type ChatMessagePartType (line 84) | type ChatMessagePartType constant ChatMessagePartTypeText (line 87) | ChatMessagePartTypeText ChatMessagePartType = "text" constant ChatMessagePartTypeImageURL (line 88) | ChatMessagePartTypeImageURL ChatMessagePartType = "image_url" type ChatMessagePart (line 91) | type ChatMessagePart struct type ChatCompletionMessage (line 97) | type ChatCompletionMessage struct method MarshalJSON (line 124) | func (m ChatCompletionMessage) MarshalJSON() ([]byte, error) { method UnmarshalJSON (line 157) | func (m *ChatCompletionMessage) UnmarshalJSON(bs []byte) error { type ToolCall (line 192) | type ToolCall struct type FunctionCall (line 200) | type FunctionCall struct type ChatCompletionResponseFormatType (line 206) | type ChatCompletionResponseFormatType constant ChatCompletionResponseFormatTypeJSONObject (line 209) | ChatCompletionResponseFormatTypeJSONObject ChatCompletionResponseFormatT... constant ChatCompletionResponseFormatTypeJSONSchema (line 210) | ChatCompletionResponseFormatTypeJSONSchema ChatCompletionResponseFormatT... constant ChatCompletionResponseFormatTypeText (line 211) | ChatCompletionResponseFormatTypeText ChatCompletionResponseFormatT... type ChatCompletionResponseFormat (line 214) | type ChatCompletionResponseFormat struct type ChatCompletionResponseFormatJSONSchema (line 219) | type ChatCompletionResponseFormatJSONSchema struct method UnmarshalJSON (line 226) | func (r *ChatCompletionResponseFormatJSONSchema) UnmarshalJSON(data []... type ChatCompletionRequestExtensions (line 253) | type ChatCompletionRequestExtensions struct type ChatCompletionRequest (line 263) | type ChatCompletionRequest struct type StreamOptions (line 338) | type StreamOptions struct type ToolType (line 346) | type ToolType constant ToolTypeFunction (line 349) | ToolTypeFunction ToolType = "function" type Tool (line 352) | type Tool struct type ToolChoice (line 357) | type ToolChoice struct type ToolFunction (line 362) | type ToolFunction struct type FunctionDefinition (line 366) | type FunctionDefinition struct type TopLogProbs (line 381) | type TopLogProbs struct type LogProb (line 388) | type LogProb struct type LogProbs (line 398) | type LogProbs struct type Prediction (line 403) | type Prediction struct type FinishReason (line 408) | type FinishReason method MarshalJSON (line 428) | func (r FinishReason) MarshalJSON() ([]byte, error) { constant FinishReasonStop (line 411) | FinishReasonStop FinishReason = "stop" constant FinishReasonLength (line 412) | FinishReasonLength FinishReason = "length" constant FinishReasonFunctionCall (line 413) | FinishReasonFunctionCall FinishReason = "function_call" constant FinishReasonToolCalls (line 414) | FinishReasonToolCalls FinishReason = "tool_calls" constant FinishReasonContentFilter (line 415) | FinishReasonContentFilter FinishReason = "content_filter" constant FinishReasonNull (line 416) | FinishReasonNull FinishReason = "null" type ServiceTier (line 419) | type ServiceTier constant ServiceTierAuto (line 422) | ServiceTierAuto ServiceTier = "auto" constant ServiceTierDefault (line 423) | ServiceTierDefault ServiceTier = "default" constant ServiceTierFlex (line 424) | ServiceTierFlex ServiceTier = "flex" constant ServiceTierPriority (line 425) | ServiceTierPriority ServiceTier = "priority" type ChatCompletionChoice (line 435) | type ChatCompletionChoice struct type ChatCompletionResponse (line 451) | type ChatCompletionResponse struct method CreateChatCompletion (line 466) | func (c *Client) CreateChatCompletion( FILE: chat_stream.go type ChatCompletionStreamChoiceDelta (line 8) | type ChatCompletionStreamChoiceDelta struct type ChatCompletionStreamChoiceLogprobs (line 22) | type ChatCompletionStreamChoiceLogprobs struct type ChatCompletionTokenLogprob (line 27) | type ChatCompletionTokenLogprob struct type ChatCompletionTokenLogprobTopLogprob (line 34) | type ChatCompletionTokenLogprobTopLogprob struct type ChatCompletionStreamChoice (line 40) | type ChatCompletionStreamChoice struct type PromptFilterResult (line 48) | type PromptFilterResult struct type ChatCompletionStreamResponse (line 53) | type ChatCompletionStreamResponse struct type ChatCompletionStream (line 70) | type ChatCompletionStream struct method CreateChatCompletionStream (line 78) | func (c *Client) CreateChatCompletionStream( FILE: chat_stream_test.go function TestChatCompletionsStreamWrongModel (line 17) | func TestChatCompletionsStreamWrongModel(t *testing.T) { function TestCreateChatCompletionStream (line 39) | func TestCreateChatCompletionStream(t *testing.T) { function TestCreateChatCompletionStreamError (line 135) | func TestCreateChatCompletionStreamError(t *testing.T) { function TestCreateChatCompletionStreamWithHeaders (line 185) | func TestCreateChatCompletionStreamWithHeaders(t *testing.T) { function TestCreateChatCompletionStreamWithRatelimitHeaders (line 221) | func TestCreateChatCompletionStreamWithRatelimitHeaders(t *testing.T) { function TestCreateChatCompletionStreamErrorWithDataPrefix (line 266) | func TestCreateChatCompletionStreamErrorWithDataPrefix(t *testing.T) { function TestCreateChatCompletionStreamRateLimitError (line 305) | func TestCreateChatCompletionStreamRateLimitError(t *testing.T) { function TestCreateChatCompletionStreamWithRefusal (line 340) | func TestCreateChatCompletionStreamWithRefusal(t *testing.T) { function TestCreateChatCompletionStreamWithLogprobs (line 460) | func TestCreateChatCompletionStreamWithLogprobs(t *testing.T) { function TestAzureCreateChatCompletionStreamRateLimitError (line 605) | func TestAzureCreateChatCompletionStreamRateLimitError(t *testing.T) { function TestCreateChatCompletionStreamStreamOptions (line 656) | func TestCreateChatCompletionStreamStreamOptions(t *testing.T) { function compareChatResponses (line 771) | func compareChatResponses(r1, r2 openai.ChatCompletionStreamResponse) bo... function TestCreateChatCompletionStreamWithReasoningModel (line 795) | func TestCreateChatCompletionStreamWithReasoningModel(t *testing.T) { function TestCreateChatCompletionStreamReasoningValidatorFails (line 937) | func TestCreateChatCompletionStreamReasoningValidatorFails(t *testing.T) { function TestCreateChatCompletionStreamO3ReasoningValidatorFails (line 962) | func TestCreateChatCompletionStreamO3ReasoningValidatorFails(t *testing.... function TestCreateChatCompletionStreamO4MiniReasoningValidatorFails (line 987) | func TestCreateChatCompletionStreamO4MiniReasoningValidatorFails(t *test... function compareChatStreamResponseChoices (line 1012) | func compareChatStreamResponseChoices(c1, c2 openai.ChatCompletionStream... FILE: chat_test.go constant xCustomHeader (line 21) | xCustomHeader = "X-CUSTOM-HEADER" constant xCustomHeaderValue (line 22) | xCustomHeaderValue = "test" function TestChatCompletionsWrongModel (line 34) | func TestChatCompletionsWrongModel(t *testing.T) { function TestO1ModelsChatCompletionsDeprecatedFields (line 55) | func TestO1ModelsChatCompletionsDeprecatedFields(t *testing.T) { function TestO1ModelsChatCompletionsBetaLimitations (line 94) | func TestO1ModelsChatCompletionsBetaLimitations(t *testing.T) { function TestO3ModelsChatCompletionsBetaLimitations (line 214) | func TestO3ModelsChatCompletionsBetaLimitations(t *testing.T) { function TestGPT5ModelsChatCompletionsBetaLimitations (line 334) | func TestGPT5ModelsChatCompletionsBetaLimitations(t *testing.T) { function TestChatRequestOmitEmpty (line 454) | func TestChatRequestOmitEmpty(t *testing.T) { function TestChatCompletionsWithStream (line 468) | func TestChatCompletionsWithStream(t *testing.T) { function TestChatCompletions (line 482) | func TestChatCompletions(t *testing.T) { function TestO1ModelChatCompletions (line 500) | func TestO1ModelChatCompletions(t *testing.T) { function TestO3ModelChatCompletions (line 517) | func TestO3ModelChatCompletions(t *testing.T) { function TestDeepseekR1ModelChatCompletions (line 534) | func TestDeepseekR1ModelChatCompletions(t *testing.T) { function TestChatCompletionsWithHeaders (line 552) | func TestChatCompletionsWithHeaders(t *testing.T) { function TestChatCompletionsWithRateLimitHeaders (line 576) | func TestChatCompletionsWithRateLimitHeaders(t *testing.T) { function TestChatCompletionsFunctions (line 610) | func TestChatCompletionsFunctions(t *testing.T) { function TestAzureChatCompletions (line 759) | func TestAzureChatCompletions(t *testing.T) { function TestMultipartChatCompletions (line 777) | func TestMultipartChatCompletions(t *testing.T) { function TestMultipartChatMessageSerialization (line 807) | func TestMultipartChatMessageSerialization(t *testing.T) { function handleChatCompletionEndpoint (line 880) | func handleChatCompletionEndpoint(w http.ResponseWriter, r *http.Request) { function handleDeepseekR1ChatCompletionEndpoint (line 962) | func handleDeepseekR1ChatCompletionEndpoint(w http.ResponseWriter, r *ht... function getChatCompletionBody (line 1025) | func getChatCompletionBody(r *http.Request) (openai.ChatCompletionReques... function TestFinishReason (line 1039) | func TestFinishReason(t *testing.T) { function TestChatCompletionResponseFormatJSONSchema_UnmarshalJSON (line 1070) | func TestChatCompletionResponseFormatJSONSchema_UnmarshalJSON(t *testing... function TestChatCompletionRequest_UnmarshalJSON (line 1150) | func TestChatCompletionRequest_UnmarshalJSON(t *testing.T) { FILE: client.go type Client (line 17) | type Client struct method newRequest (line 113) | func (c *Client) newRequest(ctx context.Context, method, url string, s... method sendRequest (line 130) | func (c *Client) sendRequest(req *http.Request, v Response) error { method sendRequestRaw (line 158) | func (c *Client) sendRequestRaw(req *http.Request) (response RawRespon... method setCommonHeaders (line 197) | func (c *Client) setCommonHeaders(req *http.Request) { method fullURL (line 270) | func (c *Client) fullURL(suffix string, setters ...fullURLOption) stri... method suffixWithAPIVersion (line 287) | func (c *Client) suffixWithAPIVersion(suffix string) string { method baseURLWithAzureDeployment (line 297) | func (c *Client) baseURLWithAzureDeployment(baseURL, suffix, model str... method handleErrorResp (line 309) | func (c *Client) handleErrorResp(resp *http.Response) error { type Response (line 24) | type Response interface type httpHeader (line 28) | type httpHeader method SetHeader (line 30) | func (h *httpHeader) SetHeader(header http.Header) { method Header (line 34) | func (h *httpHeader) Header() http.Header { method GetRateLimitHeaders (line 38) | func (h *httpHeader) GetRateLimitHeaders() RateLimitHeaders { type RawResponse (line 42) | type RawResponse struct function NewClient (line 49) | func NewClient(authToken string) *Client { function NewClientWithConfig (line 55) | func NewClientWithConfig(config ClientConfig) *Client { function NewOrgClient (line 68) | func NewOrgClient(authToken, org string) *Client { type requestOptions (line 74) | type requestOptions struct type requestOption (line 79) | type requestOption function withBody (line 81) | func withBody(body any) requestOption { function withExtraBody (line 87) | func withExtraBody(extraBody map[string]any) requestOption { function withContentType (line 101) | func withContentType(contentType string) requestOption { function withBetaAssistantVersion (line 107) | func withBetaAssistantVersion(version string) requestOption { function sendRequestStream (line 174) | func sendRequestStream[T streamable](client *Client, req *http.Request) ... function isFailureStatusCode (line 219) | func isFailureStatusCode(resp *http.Response) bool { function decodeResponse (line 223) | func decodeResponse(body io.Reader, v any) error { function decodeString (line 238) | func decodeString(body io.Reader, output *string) error { type fullURLOptions (line 247) | type fullURLOptions struct type fullURLOption (line 251) | type fullURLOption function withModel (line 253) | func withModel(model string) fullURLOption { function containsSubstr (line 334) | func containsSubstr(s []string, e string) bool { FILE: client_test.go type failingRequestBuilder (line 19) | type failingRequestBuilder struct method Build (line 21) | func (*failingRequestBuilder) Build(_ context.Context, _, _ string, _ ... function TestClient (line 25) | func TestClient(t *testing.T) { function TestSetCommonHeadersAnthropic (line 42) | func TestSetCommonHeadersAnthropic(t *testing.T) { function TestDecodeResponse (line 57) | func TestDecodeResponse(t *testing.T) { type errorReader (line 129) | type errorReader struct method Read (line 133) | func (e *errorReader) Read(_ []byte) (n int, err error) { function TestHandleErrorResp (line 137) | func TestHandleErrorResp(t *testing.T) { function TestClientReturnsRequestBuilderErrors (line 266) | func TestClientReturnsRequestBuilderErrors(t *testing.T) { function TestClientReturnsRequestBuilderErrorsAddition (line 473) | func TestClientReturnsRequestBuilderErrorsAddition(t *testing.T) { function TestClient_suffixWithAPIVersion (line 488) | func TestClient_suffixWithAPIVersion(t *testing.T) { function TestClient_baseURLWithAzureDeployment (line 549) | func TestClient_baseURLWithAzureDeployment(t *testing.T) { FILE: common.go type Usage (line 6) | type Usage struct type CompletionTokensDetails (line 15) | type CompletionTokensDetails struct type PromptTokensDetails (line 23) | type PromptTokensDetails struct FILE: completion.go constant O1Mini (line 13) | O1Mini = "o1-mini" constant O1Mini20240912 (line 14) | O1Mini20240912 = "o1-mini-2024-09-12" constant O1Preview (line 15) | O1Preview = "o1-preview" constant O1Preview20240912 (line 16) | O1Preview20240912 = "o1-preview-2024-09-12" constant O1 (line 17) | O1 = "o1" constant O120241217 (line 18) | O120241217 = "o1-2024-12-17" constant O3 (line 19) | O3 = "o3" constant O320250416 (line 20) | O320250416 = "o3-2025-04-16" constant O3Mini (line 21) | O3Mini = "o3-mini" constant O3Mini20250131 (line 22) | O3Mini20250131 = "o3-mini-2025-01-31" constant O4Mini (line 23) | O4Mini = "o4-mini" constant O4Mini20250416 (line 24) | O4Mini20250416 = "o4-mini-2025-04-16" constant GPT432K0613 (line 25) | GPT432K0613 = "gpt-4-32k-0613" constant GPT432K0314 (line 26) | GPT432K0314 = "gpt-4-32k-0314" constant GPT432K (line 27) | GPT432K = "gpt-4-32k" constant GPT40613 (line 28) | GPT40613 = "gpt-4-0613" constant GPT40314 (line 29) | GPT40314 = "gpt-4-0314" constant GPT4o (line 30) | GPT4o = "gpt-4o" constant GPT4o20240513 (line 31) | GPT4o20240513 = "gpt-4o-2024-05-13" constant GPT4o20240806 (line 32) | GPT4o20240806 = "gpt-4o-2024-08-06" constant GPT4o20241120 (line 33) | GPT4o20241120 = "gpt-4o-2024-11-20" constant GPT4oLatest (line 34) | GPT4oLatest = "chatgpt-4o-latest" constant GPT4oMini (line 35) | GPT4oMini = "gpt-4o-mini" constant GPT4oMini20240718 (line 36) | GPT4oMini20240718 = "gpt-4o-mini-2024-07-18" constant GPT4Turbo (line 37) | GPT4Turbo = "gpt-4-turbo" constant GPT4Turbo20240409 (line 38) | GPT4Turbo20240409 = "gpt-4-turbo-2024-04-09" constant GPT4Turbo0125 (line 39) | GPT4Turbo0125 = "gpt-4-0125-preview" constant GPT4Turbo1106 (line 40) | GPT4Turbo1106 = "gpt-4-1106-preview" constant GPT4TurboPreview (line 41) | GPT4TurboPreview = "gpt-4-turbo-preview" constant GPT4VisionPreview (line 42) | GPT4VisionPreview = "gpt-4-vision-preview" constant GPT4 (line 43) | GPT4 = "gpt-4" constant GPT4Dot1 (line 44) | GPT4Dot1 = "gpt-4.1" constant GPT4Dot120250414 (line 45) | GPT4Dot120250414 = "gpt-4.1-2025-04-14" constant GPT4Dot1Mini (line 46) | GPT4Dot1Mini = "gpt-4.1-mini" constant GPT4Dot1Mini20250414 (line 47) | GPT4Dot1Mini20250414 = "gpt-4.1-mini-2025-04-14" constant GPT4Dot1Nano (line 48) | GPT4Dot1Nano = "gpt-4.1-nano" constant GPT4Dot1Nano20250414 (line 49) | GPT4Dot1Nano20250414 = "gpt-4.1-nano-2025-04-14" constant GPT4Dot5Preview (line 50) | GPT4Dot5Preview = "gpt-4.5-preview" constant GPT4Dot5Preview20250227 (line 51) | GPT4Dot5Preview20250227 = "gpt-4.5-preview-2025-02-27" constant GPT5 (line 52) | GPT5 = "gpt-5" constant GPT5Mini (line 53) | GPT5Mini = "gpt-5-mini" constant GPT5Nano (line 54) | GPT5Nano = "gpt-5-nano" constant GPT5ChatLatest (line 55) | GPT5ChatLatest = "gpt-5-chat-latest" constant GPT3Dot5Turbo0125 (line 56) | GPT3Dot5Turbo0125 = "gpt-3.5-turbo-0125" constant GPT3Dot5Turbo1106 (line 57) | GPT3Dot5Turbo1106 = "gpt-3.5-turbo-1106" constant GPT3Dot5Turbo0613 (line 58) | GPT3Dot5Turbo0613 = "gpt-3.5-turbo-0613" constant GPT3Dot5Turbo0301 (line 59) | GPT3Dot5Turbo0301 = "gpt-3.5-turbo-0301" constant GPT3Dot5Turbo16K (line 60) | GPT3Dot5Turbo16K = "gpt-3.5-turbo-16k" constant GPT3Dot5Turbo16K0613 (line 61) | GPT3Dot5Turbo16K0613 = "gpt-3.5-turbo-16k-0613" constant GPT3Dot5Turbo (line 62) | GPT3Dot5Turbo = "gpt-3.5-turbo" constant GPT3Dot5TurboInstruct (line 63) | GPT3Dot5TurboInstruct = "gpt-3.5-turbo-instruct" constant GPT3TextDavinci003 (line 65) | GPT3TextDavinci003 = "text-davinci-003" constant GPT3TextDavinci002 (line 67) | GPT3TextDavinci002 = "text-davinci-002" constant GPT3TextCurie001 (line 69) | GPT3TextCurie001 = "text-curie-001" constant GPT3TextBabbage001 (line 71) | GPT3TextBabbage001 = "text-babbage-001" constant GPT3TextAda001 (line 73) | GPT3TextAda001 = "text-ada-001" constant GPT3TextDavinci001 (line 75) | GPT3TextDavinci001 = "text-davinci-001" constant GPT3DavinciInstructBeta (line 77) | GPT3DavinciInstructBeta = "davinci-instruct-beta" constant GPT3Davinci (line 79) | GPT3Davinci = "davinci" constant GPT3Davinci002 (line 80) | GPT3Davinci002 = "davinci-002" constant GPT3CurieInstructBeta (line 82) | GPT3CurieInstructBeta = "curie-instruct-beta" constant GPT3Curie (line 83) | GPT3Curie = "curie" constant GPT3Curie002 (line 84) | GPT3Curie002 = "curie-002" constant GPT3Ada (line 86) | GPT3Ada = "ada" constant GPT3Ada002 (line 87) | GPT3Ada002 = "ada-002" constant GPT3Babbage (line 89) | GPT3Babbage = "babbage" constant GPT3Babbage002 (line 90) | GPT3Babbage002 = "babbage-002" constant CodexCodeDavinci002 (line 97) | CodexCodeDavinci002 = "code-davinci-002" constant CodexCodeCushman001 (line 98) | CodexCodeCushman001 = "code-cushman-001" constant CodexCodeDavinci001 (line 99) | CodexCodeDavinci001 = "code-davinci-001" function checkEndpointSupportsModel (line 173) | func checkEndpointSupportsModel(endpoint, model string) bool { function checkPromptType (line 177) | func checkPromptType(prompt any) bool { type CompletionRequest (line 200) | type CompletionRequest struct type CompletionChoice (line 231) | type CompletionChoice struct type LogprobResult (line 239) | type LogprobResult struct type CompletionResponse (line 247) | type CompletionResponse struct method CreateCompletion (line 263) | func (c *Client) CreateCompletion( FILE: completion_test.go function TestCompletionsWrongModel (line 19) | func TestCompletionsWrongModel(t *testing.T) { function TestCompletionsWrongModelO3 (line 37) | func TestCompletionsWrongModelO3(t *testing.T) { function TestCompletionsWrongModelO4Mini (line 55) | func TestCompletionsWrongModelO4Mini(t *testing.T) { function TestCompletionWithStream (line 72) | func TestCompletionWithStream(t *testing.T) { function TestCompletions (line 85) | func TestCompletions(t *testing.T) { function TestMultiplePromptsCompletionsWrong (line 100) | func TestMultiplePromptsCompletionsWrong(t *testing.T) { function TestMultiplePromptsCompletions (line 117) | func TestMultiplePromptsCompletions(t *testing.T) { function handleCompletionEndpoint (line 131) | func handleCompletionEndpoint(w http.ResponseWriter, r *http.Request) { function getCompletionBody (line 207) | func getCompletionBody(r *http.Request) (openai.CompletionRequest, error) { function TestCompletionWithO1Model (line 222) | func TestCompletionWithO1Model(t *testing.T) { function TestCompletionWithGPT4DotModels (line 240) | func TestCompletionWithGPT4DotModels(t *testing.T) { function TestCompletionWithGPT4oModels (line 273) | func TestCompletionWithGPT4oModels(t *testing.T) { function TestCompletionWithGPT5Models (line 305) | func TestCompletionWithGPT5Models(t *testing.T) { FILE: config.go constant openaiAPIURLv1 (line 10) | openaiAPIURLv1 = "https://api.openai.com/v1" constant defaultEmptyMessagesLimit (line 11) | defaultEmptyMessagesLimit uint = 300 constant azureAPIPrefix (line 13) | azureAPIPrefix = "openai" constant azureDeploymentsPrefix (line 14) | azureDeploymentsPrefix = "deployments" constant AnthropicAPIVersion (line 16) | AnthropicAPIVersion = "2023-06-01" type APIType (line 19) | type APIType constant APITypeOpenAI (line 22) | APITypeOpenAI APIType = "OPEN_AI" constant APITypeAzure (line 23) | APITypeAzure APIType = "AZURE" constant APITypeAzureAD (line 24) | APITypeAzureAD APIType = "AZURE_AD" constant APITypeCloudflareAzure (line 25) | APITypeCloudflareAzure APIType = "CLOUDFLARE_AZURE" constant APITypeAnthropic (line 26) | APITypeAnthropic APIType = "ANTHROPIC" constant AzureAPIKeyHeader (line 29) | AzureAPIKeyHeader = "api-key" constant defaultAssistantVersion (line 31) | defaultAssistantVersion = "v2" type HTTPDoer (line 33) | type HTTPDoer interface type ClientConfig (line 38) | type ClientConfig struct method String (line 104) | func (ClientConfig) String() string { method GetAzureDeploymentByModel (line 108) | func (c ClientConfig) GetAzureDeploymentByModel(model string) string { function DefaultConfig (line 52) | func DefaultConfig(authToken string) ClientConfig { function DefaultAzureConfig (line 66) | func DefaultAzureConfig(apiKey, baseURL string) ClientConfig { function DefaultAnthropicConfig (line 87) | func DefaultAnthropicConfig(apiKey, baseURL string) ClientConfig { FILE: config_test.go function TestGetAzureDeploymentByModel (line 9) | func TestGetAzureDeploymentByModel(t *testing.T) { function TestDefaultAnthropicConfig (line 68) | func TestDefaultAnthropicConfig(t *testing.T) { function TestDefaultAnthropicConfigWithEmptyValues (line 91) | func TestDefaultAnthropicConfigWithEmptyValues(t *testing.T) { function TestClientConfigString (line 108) | func TestClientConfigString(t *testing.T) { function TestGetAzureDeploymentByModel_NoMapper (line 118) | func TestGetAzureDeploymentByModel_NoMapper(t *testing.T) { FILE: edits.go type EditsRequest (line 10) | type EditsRequest struct type EditsChoice (line 20) | type EditsChoice struct type EditsResponse (line 26) | type EditsResponse struct method Edits (line 40) | func (c *Client) Edits(ctx context.Context, request EditsRequest) (respo... FILE: edits_test.go function TestEdits (line 17) | func TestEdits(t *testing.T) { function handleEditEndpoint (line 40) | func handleEditEndpoint(w http.ResponseWriter, r *http.Request) { function getEditBody (line 80) | func getEditBody(r *http.Request) (openai.EditsRequest, error) { FILE: embeddings.go type EmbeddingModel (line 17) | type EmbeddingModel constant AdaSimilarity (line 21) | AdaSimilarity EmbeddingModel = "text-similarity-ada-001" constant BabbageSimilarity (line 22) | BabbageSimilarity EmbeddingModel = "text-similarity-babbage-001" constant CurieSimilarity (line 23) | CurieSimilarity EmbeddingModel = "text-similarity-curie-001" constant DavinciSimilarity (line 24) | DavinciSimilarity EmbeddingModel = "text-similarity-davinci-001" constant AdaSearchDocument (line 25) | AdaSearchDocument EmbeddingModel = "text-search-ada-doc-001" constant AdaSearchQuery (line 26) | AdaSearchQuery EmbeddingModel = "text-search-ada-query-001" constant BabbageSearchDocument (line 27) | BabbageSearchDocument EmbeddingModel = "text-search-babbage-doc-001" constant BabbageSearchQuery (line 28) | BabbageSearchQuery EmbeddingModel = "text-search-babbage-query-001" constant CurieSearchDocument (line 29) | CurieSearchDocument EmbeddingModel = "text-search-curie-doc-001" constant CurieSearchQuery (line 30) | CurieSearchQuery EmbeddingModel = "text-search-curie-query-001" constant DavinciSearchDocument (line 31) | DavinciSearchDocument EmbeddingModel = "text-search-davinci-doc-001" constant DavinciSearchQuery (line 32) | DavinciSearchQuery EmbeddingModel = "text-search-davinci-query-001" constant AdaCodeSearchCode (line 33) | AdaCodeSearchCode EmbeddingModel = "code-search-ada-code-001" constant AdaCodeSearchText (line 34) | AdaCodeSearchText EmbeddingModel = "code-search-ada-text-001" constant BabbageCodeSearchCode (line 35) | BabbageCodeSearchCode EmbeddingModel = "code-search-babbage-code-001" constant BabbageCodeSearchText (line 36) | BabbageCodeSearchText EmbeddingModel = "code-search-babbage-text-001" constant AdaEmbeddingV2 (line 38) | AdaEmbeddingV2 EmbeddingModel = "text-embedding-ada-002" constant SmallEmbedding3 (line 39) | SmallEmbedding3 EmbeddingModel = "text-embedding-3-small" constant LargeEmbedding3 (line 40) | LargeEmbedding3 EmbeddingModel = "text-embedding-3-large" type Embedding (line 49) | type Embedding struct method DotProduct (line 59) | func (e *Embedding) DotProduct(other *Embedding) (float32, error) { type EmbeddingResponse (line 73) | type EmbeddingResponse struct type base64String (line 82) | type base64String method Decode (line 84) | func (b base64String) Decode() ([]float32, error) { type Base64Embedding (line 100) | type Base64Embedding struct type EmbeddingResponseBase64 (line 107) | type EmbeddingResponseBase64 struct method ToEmbeddingResponse (line 117) | func (r *EmbeddingResponseBase64) ToEmbeddingResponse() (EmbeddingResp... type EmbeddingRequestConverter (line 141) | type EmbeddingRequestConverter interface type EmbeddingEncodingFormat (line 149) | type EmbeddingEncodingFormat constant EmbeddingEncodingFormatFloat (line 152) | EmbeddingEncodingFormatFloat EmbeddingEncodingFormat = "float" constant EmbeddingEncodingFormatBase64 (line 153) | EmbeddingEncodingFormatBase64 EmbeddingEncodingFormat = "base64" type EmbeddingRequest (line 156) | type EmbeddingRequest struct method Convert (line 169) | func (r EmbeddingRequest) Convert() EmbeddingRequest { type EmbeddingRequestStrings (line 174) | type EmbeddingRequestStrings struct method Convert (line 199) | func (r EmbeddingRequestStrings) Convert() EmbeddingRequest { type EmbeddingRequestTokens (line 210) | type EmbeddingRequestTokens struct method Convert (line 235) | func (r EmbeddingRequestTokens) Convert() EmbeddingRequest { method CreateEmbeddings (line 251) | func (c *Client) CreateEmbeddings( FILE: embeddings_test.go function TestEmbedding (line 18) | func TestEmbedding(t *testing.T) { function TestEmbeddingEndpoint (line 102) | func TestEmbeddingEndpoint(t *testing.T) { function TestAzureEmbeddingEndpoint (line 205) | func TestAzureEmbeddingEndpoint(t *testing.T) { function TestEmbeddingResponseBase64_ToEmbeddingResponse (line 231) | func TestEmbeddingResponseBase64_ToEmbeddingResponse(t *testing.T) { function TestDotProduct (line 293) | func TestDotProduct(t *testing.T) { FILE: engines.go type Engine (line 10) | type Engine struct type EnginesList (line 20) | type EnginesList struct method ListEngines (line 28) | func (c *Client) ListEngines(ctx context.Context) (engines EnginesList, ... method GetEngine (line 40) | func (c *Client) GetEngine( FILE: engines_test.go function TestGetEngine (line 15) | func TestGetEngine(t *testing.T) { function TestListEngines (line 27) | func TestListEngines(t *testing.T) { function TestListEnginesReturnError (line 38) | func TestListEnginesReturnError(t *testing.T) { FILE: error.go type APIError (line 11) | type APIError struct method Error (line 39) | func (e *APIError) Error() string { method UnmarshalJSON (line 47) | func (e *APIError) UnmarshalJSON(data []byte) (err error) { type InnerError (line 22) | type InnerError struct type RequestError (line 28) | type RequestError struct method Error (line 106) | func (e *RequestError) Error() string { method Unwrap (line 113) | func (e *RequestError) Unwrap() error { type ErrorResponse (line 35) | type ErrorResponse struct FILE: error_test.go function TestAPIErrorUnmarshalJSON (line 12) | func TestAPIErrorUnmarshalJSON(t *testing.T) { function assertAPIErrorMessage (line 221) | func assertAPIErrorMessage(t *testing.T, apiErr openai.APIError, expecte... function assertAPIErrorInnerError (line 227) | func assertAPIErrorInnerError(t *testing.T, apiErr openai.APIError, expe... function assertAPIErrorCode (line 233) | func assertAPIErrorCode(t *testing.T, apiErr openai.APIError, expected i... function assertAPIErrorParam (line 249) | func assertAPIErrorParam(t *testing.T, apiErr openai.APIError, expected ... function assertAPIErrorType (line 255) | func assertAPIErrorType(t *testing.T, apiErr openai.APIError, typ string) { function TestRequestError (line 261) | func TestRequestError(t *testing.T) { FILE: example_test.go function Example (line 17) | func Example() { function ExampleClient_CreateChatCompletionStream (line 39) | func ExampleClient_CreateChatCompletionStream() { function ExampleClient_CreateCompletion (line 80) | func ExampleClient_CreateCompletion() { function ExampleClient_CreateCompletionStream (line 97) | func ExampleClient_CreateCompletionStream() { function ExampleClient_CreateTranscription (line 131) | func ExampleClient_CreateTranscription() { function ExampleClient_CreateTranscription_captions (line 147) | func ExampleClient_CreateTranscription_captions() { function ExampleClient_CreateTranslation (line 174) | func ExampleClient_CreateTranslation() { function ExampleClient_CreateImage (line 190) | func ExampleClient_CreateImage() { function ExampleClient_CreateImage_base64 (line 209) | func ExampleClient_CreateImage_base64() { function ExampleClientConfig_clientWithProxy (line 248) | func ExampleClientConfig_clientWithProxy() { function Example_chatbot (line 272) | func Example_chatbot() { function ExampleDefaultAzureConfig (line 304) | func ExampleDefaultAzureConfig() { function ExampleAPIError (line 332) | func ExampleAPIError() { FILE: examples/chatbot/main.go function main (line 12) | func main() { FILE: examples/completion-with-tool/main.go function main (line 12) | func main() { FILE: examples/completion/main.go function main (line 11) | func main() { FILE: examples/images/main.go function main (line 11) | func main() { FILE: examples/voice-to-text/main.go function main (line 12) | func main() { FILE: files.go type FileRequest (line 11) | type FileRequest struct type PurposeType (line 18) | type PurposeType constant PurposeFineTune (line 21) | PurposeFineTune PurposeType = "fine-tune" constant PurposeFineTuneResults (line 22) | PurposeFineTuneResults PurposeType = "fine-tune-results" constant PurposeAssistants (line 23) | PurposeAssistants PurposeType = "assistants" constant PurposeAssistantsOutput (line 24) | PurposeAssistantsOutput PurposeType = "assistants_output" constant PurposeBatch (line 25) | PurposeBatch PurposeType = "batch" type FileBytesRequest (line 29) | type FileBytesRequest struct type File (line 39) | type File struct type FilesList (line 53) | type FilesList struct method CreateFileBytes (line 60) | func (c *Client) CreateFileBytes(ctx context.Context, request FileBytesR... method CreateFile (line 92) | func (c *Client) CreateFile(ctx context.Context, request FileRequest) (f... method DeleteFile (line 128) | func (c *Client) DeleteFile(ctx context.Context, fileID string) (err err... method ListFiles (line 140) | func (c *Client) ListFiles(ctx context.Context) (files FilesList, err er... method GetFile (line 152) | func (c *Client) GetFile(ctx context.Context, fileID string) (file File,... method GetFileContent (line 163) | func (c *Client) GetFileContent(ctx context.Context, fileID string) (con... FILE: files_api_test.go function TestFileBytesUpload (line 19) | func TestFileBytesUpload(t *testing.T) { function TestFileUpload (line 32) | func TestFileUpload(t *testing.T) { function handleCreateFile (line 46) | func handleCreateFile(w http.ResponseWriter, r *http.Request) { function TestDeleteFile (line 86) | func TestDeleteFile(t *testing.T) { function TestListFile (line 94) | func TestListFile(t *testing.T) { function TestGetFile (line 105) | func TestGetFile(t *testing.T) { function TestGetFileContent (line 116) | func TestGetFileContent(t *testing.T) { function TestGetFileContentReturnError (line 141) | func TestGetFileContentReturnError(t *testing.T) { function TestGetFileContentReturnTimeoutError (line 179) | func TestGetFileContentReturnTimeoutError(t *testing.T) { FILE: files_test.go function TestFileBytesUploadWithFailingFormBuilder (line 14) | func TestFileBytesUploadWithFailingFormBuilder(t *testing.T) { function TestFileUploadWithFailingFormBuilder (line 61) | func TestFileUploadWithFailingFormBuilder(t *testing.T) { function TestFileUploadWithNonExistentPath (line 111) | func TestFileUploadWithNonExistentPath(t *testing.T) { function TestCreateFileRequestBuilderFailure (line 124) | func TestCreateFileRequestBuilderFailure(t *testing.T) { FILE: fine_tunes.go type FineTuneRequest (line 12) | type FineTuneRequest struct type FineTune (line 30) | type FineTune struct type FineTuneEvent (line 51) | type FineTuneEvent struct type FineTuneHyperParams (line 61) | type FineTuneHyperParams struct type FineTuneList (line 71) | type FineTuneList struct type FineTuneEventList (line 81) | type FineTuneEventList struct type FineTuneDeleteResponse (line 91) | type FineTuneDeleteResponse struct method CreateFineTune (line 102) | func (c *Client) CreateFineTune(ctx context.Context, request FineTuneReq... method CancelFineTune (line 117) | func (c *Client) CancelFineTune(ctx context.Context, fineTuneID string) ... method ListFineTunes (line 130) | func (c *Client) ListFineTunes(ctx context.Context) (response FineTuneLi... method GetFineTune (line 143) | func (c *Client) GetFineTune(ctx context.Context, fineTuneID string) (re... method DeleteFineTune (line 157) | func (c *Client) DeleteFineTune(ctx context.Context, fineTuneID string) ... method ListFineTuneEvents (line 170) | func (c *Client) ListFineTuneEvents(ctx context.Context, fineTuneID stri... FILE: fine_tunes_test.go constant testFineTuneID (line 14) | testFineTuneID = "fine-tune-id" function TestFineTunes (line 17) | func TestFineTunes(t *testing.T) { FILE: fine_tuning_job.go type FineTuningJob (line 10) | type FineTuningJob struct type Hyperparameters (line 28) | type Hyperparameters struct type FineTuningJobRequest (line 34) | type FineTuningJobRequest struct type FineTuningJobEventList (line 42) | type FineTuningJobEventList struct type FineTuningJobEvent (line 50) | type FineTuningJobEvent struct method CreateFineTuningJob (line 61) | func (c *Client) CreateFineTuningJob( method CancelFineTuningJob (line 76) | func (c *Client) CancelFineTuningJob(ctx context.Context, fineTuningJobI... method RetrieveFineTuningJob (line 87) | func (c *Client) RetrieveFineTuningJob( type listFineTuningJobEventsParameters (line 101) | type listFineTuningJobEventsParameters struct type ListFineTuningJobEventsParameter (line 106) | type ListFineTuningJobEventsParameter function ListFineTuningJobEventsWithAfter (line 108) | func ListFineTuningJobEventsWithAfter(after string) ListFineTuningJobEve... function ListFineTuningJobEventsWithLimit (line 114) | func ListFineTuningJobEventsWithLimit(limit int) ListFineTuningJobEvents... method ListFineTuningJobEvents (line 121) | func (c *Client) ListFineTuningJobEvents( FILE: fine_tuning_job_test.go constant testFineTuninigJobID (line 14) | testFineTuninigJobID = "fine-tuning-job-id" function TestFineTuningJob (line 17) | func TestFineTuningJob(t *testing.T) { FILE: image.go constant CreateImageSize256x256 (line 13) | CreateImageSize256x256 = "256x256" constant CreateImageSize512x512 (line 14) | CreateImageSize512x512 = "512x512" constant CreateImageSize1024x1024 (line 15) | CreateImageSize1024x1024 = "1024x1024" constant CreateImageSize1792x1024 (line 18) | CreateImageSize1792x1024 = "1792x1024" constant CreateImageSize1024x1792 (line 19) | CreateImageSize1024x1792 = "1024x1792" constant CreateImageSize1536x1024 (line 22) | CreateImageSize1536x1024 = "1536x1024" constant CreateImageSize1024x1536 (line 23) | CreateImageSize1024x1536 = "1024x1536" constant CreateImageResponseFormatB64JSON (line 28) | CreateImageResponseFormatB64JSON = "b64_json" constant CreateImageResponseFormatURL (line 29) | CreateImageResponseFormatURL = "url" constant CreateImageModelDallE2 (line 33) | CreateImageModelDallE2 = "dall-e-2" constant CreateImageModelDallE3 (line 34) | CreateImageModelDallE3 = "dall-e-3" constant CreateImageModelGptImage1 (line 35) | CreateImageModelGptImage1 = "gpt-image-1" constant CreateImageQualityHD (line 39) | CreateImageQualityHD = "hd" constant CreateImageQualityStandard (line 40) | CreateImageQualityStandard = "standard" constant CreateImageQualityHigh (line 43) | CreateImageQualityHigh = "high" constant CreateImageQualityMedium (line 44) | CreateImageQualityMedium = "medium" constant CreateImageQualityLow (line 45) | CreateImageQualityLow = "low" constant CreateImageStyleVivid (line 50) | CreateImageStyleVivid = "vivid" constant CreateImageStyleNatural (line 51) | CreateImageStyleNatural = "natural" constant CreateImageBackgroundTransparent (line 56) | CreateImageBackgroundTransparent = "transparent" constant CreateImageBackgroundOpaque (line 57) | CreateImageBackgroundOpaque = "opaque" constant CreateImageModerationLow (line 62) | CreateImageModerationLow = "low" constant CreateImageOutputFormatPNG (line 67) | CreateImageOutputFormatPNG = "png" constant CreateImageOutputFormatJPEG (line 68) | CreateImageOutputFormatJPEG = "jpeg" constant CreateImageOutputFormatWEBP (line 69) | CreateImageOutputFormatWEBP = "webp" type ImageRequest (line 73) | type ImageRequest struct type ImageResponse (line 89) | type ImageResponse struct type ImageResponseInputTokensDetails (line 98) | type ImageResponseInputTokensDetails struct type ImageResponseUsage (line 104) | type ImageResponseUsage struct type ImageResponseDataInner (line 112) | type ImageResponseDataInner struct method CreateImage (line 119) | func (c *Client) CreateImage(ctx context.Context, request ImageRequest) ... function WrapReader (line 136) | func WrapReader(rdr io.Reader, filename string, contentType string) io.R... type file (line 140) | type file struct method Name (line 146) | func (f file) Name() string { method ContentType (line 155) | func (f file) ContentType() string { type ImageEditRequest (line 161) | type ImageEditRequest struct method CreateEditImage (line 174) | func (c *Client) CreateEditImage(ctx context.Context, request ImageEditR... type ImageVariRequest (line 235) | type ImageVariRequest struct method CreateVariImage (line 246) | func (c *Client) CreateVariImage(ctx context.Context, request ImageVariR... FILE: image_api_test.go function TestImages (line 18) | func TestImages(t *testing.T) { function handleImageEndpoint (line 36) | func handleImageEndpoint(w http.ResponseWriter, r *http.Request) { function getImageBody (line 71) | func getImageBody(r *http.Request) (openai.ImageRequest, error) { function TestImageEdit (line 85) | func TestImageEdit(t *testing.T) { function TestImageEditWithoutMask (line 113) | func TestImageEditWithoutMask(t *testing.T) { function handleEditImageEndpoint (line 135) | func handleEditImageEndpoint(w http.ResponseWriter, r *http.Request) { function TestImageVariation (line 165) | func TestImageVariation(t *testing.T) { function handleVariateImageEndpoint (line 186) | func handleVariateImageEndpoint(w http.ResponseWriter, r *http.Request) { FILE: image_test.go type mockFormBuilder (line 15) | type mockFormBuilder struct method CreateFormFile (line 22) | func (fb *mockFormBuilder) CreateFormFile(fieldname string, file *os.F... method CreateFormFileReader (line 26) | func (fb *mockFormBuilder) CreateFormFileReader(fieldname string, r io... method WriteField (line 30) | func (fb *mockFormBuilder) WriteField(fieldname, value string) error { method Close (line 34) | func (fb *mockFormBuilder) Close() error { method FormDataContentType (line 38) | func (fb *mockFormBuilder) FormDataContentType() string { function TestImageFormBuilderFailures (line 42) | func TestImageFormBuilderFailures(t *testing.T) { function TestVariImageFormBuilderFailures (line 173) | func TestVariImageFormBuilderFailures(t *testing.T) { type testNamedReader (line 276) | type testNamedReader struct method Name (line 278) | func (testNamedReader) Name() string { return "named.txt" } function TestWrapReader (line 280) | func TestWrapReader(t *testing.T) { FILE: internal/error_accumulator.go type ErrorAccumulator (line 9) | type ErrorAccumulator interface type errorBuffer (line 14) | type errorBuffer interface type DefaultErrorAccumulator (line 20) | type DefaultErrorAccumulator struct method Write (line 30) | func (e *DefaultErrorAccumulator) Write(p []byte) error { method Bytes (line 38) | func (e *DefaultErrorAccumulator) Bytes() (errBytes []byte) { function NewErrorAccumulator (line 24) | func NewErrorAccumulator() ErrorAccumulator { FILE: internal/error_accumulator_test.go function TestDefaultErrorAccumulator_WriteMultiple (line 11) | func TestDefaultErrorAccumulator_WriteMultiple(t *testing.T) { function TestDefaultErrorAccumulator_EmptyBuffer (line 25) | func TestDefaultErrorAccumulator_EmptyBuffer(t *testing.T) { function TestDefaultErrorAccumulator_WriteError (line 35) | func TestDefaultErrorAccumulator_WriteError(t *testing.T) { FILE: internal/form_builder.go type FormBuilder (line 13) | type FormBuilder interface type DefaultFormBuilder (line 21) | type DefaultFormBuilder struct method CreateFormFile (line 31) | func (fb *DefaultFormBuilder) CreateFormFile(fieldname string, file *o... method CreateFormFileReader (line 43) | func (fb *DefaultFormBuilder) CreateFormFileReader(fieldname string, r... method createFormFile (line 81) | func (fb *DefaultFormBuilder) createFormFile(fieldname string, r io.Re... method WriteField (line 99) | func (fb *DefaultFormBuilder) WriteField(fieldname, value string) error { method Close (line 106) | func (fb *DefaultFormBuilder) Close() error { method FormDataContentType (line 110) | func (fb *DefaultFormBuilder) FormDataContentType() string { function NewFormBuilder (line 25) | func NewFormBuilder(body io.Writer) *DefaultFormBuilder { function escapeQuotes (line 37) | func escapeQuotes(s string) string { FILE: internal/form_builder_test.go type mockFormBuilder (line 15) | type mockFormBuilder struct method CreateFormFile (line 21) | func (m *mockFormBuilder) CreateFormFile(fieldname string, file *os.Fi... method WriteField (line 25) | func (m *mockFormBuilder) WriteField(fieldname, value string) error { method Close (line 29) | func (m *mockFormBuilder) Close() error { method FormDataContentType (line 33) | func (m *mockFormBuilder) FormDataContentType() string { function TestCloseMethod (line 37) | func TestCloseMethod(t *testing.T) { type failingWriter (line 56) | type failingWriter struct method Write (line 61) | func (*failingWriter) Write([]byte) (int, error) { function TestFormBuilderWithFailingWriter (line 65) | func TestFormBuilderWithFailingWriter(t *testing.T) { function TestFormBuilderWithClosedFile (line 77) | func TestFormBuilderWithClosedFile(t *testing.T) { type failingReader (line 91) | type failingReader struct method Read (line 96) | func (*failingReader) Read([]byte) (int, error) { type readerWithNameAndContentType (line 100) | type readerWithNameAndContentType struct method Name (line 104) | func (*readerWithNameAndContentType) Name() string { method ContentType (line 108) | func (*readerWithNameAndContentType) ContentType() string { function TestFormBuilderWithReader (line 112) | func TestFormBuilderWithReader(t *testing.T) { function TestFormDataContentType (line 136) | func TestFormDataContentType(t *testing.T) { function TestWriteField (line 148) | func TestWriteField(t *testing.T) { function TestCreateFormFile (line 166) | func TestCreateFormFile(t *testing.T) { function TestCreateFormFileSuccess (line 180) | func TestCreateFormFileSuccess(t *testing.T) { FILE: internal/marshaller.go type Marshaller (line 7) | type Marshaller interface type JSONMarshaller (line 11) | type JSONMarshaller struct method Marshal (line 13) | func (jm *JSONMarshaller) Marshal(value any) ([]byte, error) { FILE: internal/marshaller_test.go function TestJSONMarshaller_Normal (line 10) | func TestJSONMarshaller_Normal(t *testing.T) { function TestJSONMarshaller_InvalidInput (line 21) | func TestJSONMarshaller_InvalidInput(t *testing.T) { function TestJSONMarshaller_EmptyValue (line 27) | func TestJSONMarshaller_EmptyValue(t *testing.T) { FILE: internal/request_builder.go type RequestBuilder (line 10) | type RequestBuilder interface type HTTPRequestBuilder (line 14) | type HTTPRequestBuilder struct method Build (line 24) | func (b *HTTPRequestBuilder) Build( function NewRequestBuilder (line 18) | func NewRequestBuilder() *HTTPRequestBuilder { FILE: internal/request_builder_test.go type failingMarshaller (line 15) | type failingMarshaller struct method Marshal (line 17) | func (*failingMarshaller) Marshal(_ any) ([]byte, error) { function TestRequestBuilderReturnsMarshallerErrors (line 21) | func TestRequestBuilderReturnsMarshallerErrors(t *testing.T) { function TestRequestBuilderReturnsRequest (line 32) | func TestRequestBuilderReturnsRequest(t *testing.T) { function TestRequestBuilderReturnsRequestWhenRequestOfArgsIsNil (line 50) | func TestRequestBuilderReturnsRequestWhenRequestOfArgsIsNil(t *testing.T) { function TestRequestBuilderWithReaderBodyAndHeader (line 64) | func TestRequestBuilderWithReaderBodyAndHeader(t *testing.T) { function TestRequestBuilderInvalidURL (line 90) | func TestRequestBuilderInvalidURL(t *testing.T) { FILE: internal/test/checks/checks.go function NoError (line 8) | func NoError(t *testing.T, err error, message ...string) { function NoErrorF (line 15) | func NoErrorF(t *testing.T, err error, message ...string) { function HasError (line 22) | func HasError(t *testing.T, err error, message ...string) { function ErrorIs (line 29) | func ErrorIs(t *testing.T, err, target error, msg ...string) { function ErrorIsF (line 36) | func ErrorIsF(t *testing.T, err, target error, format string, msg ...str... function ErrorIsNot (line 43) | func ErrorIsNot(t *testing.T, err, target error, msg ...string) { function ErrorIsNotf (line 50) | func ErrorIsNotf(t *testing.T, err, target error, format string, msg ...... FILE: internal/test/checks/checks_test.go function TestChecksSuccessPaths (line 10) | func TestChecksSuccessPaths(t *testing.T) { FILE: internal/test/failer.go type FailingErrorBuffer (line 9) | type FailingErrorBuffer struct method Write (line 11) | func (b *FailingErrorBuffer) Write(_ []byte) (n int, err error) { method Len (line 15) | func (b *FailingErrorBuffer) Len() int { method Bytes (line 19) | func (b *FailingErrorBuffer) Bytes() []byte { FILE: internal/test/failer_test.go function TestFailingErrorBuffer (line 9) | func TestFailingErrorBuffer(t *testing.T) { FILE: internal/test/helpers.go function CreateTestFile (line 12) | func CreateTestFile(t *testing.T, path string) { type TokenRoundTripper (line 27) | type TokenRoundTripper struct method RoundTrip (line 40) | func (t *TokenRoundTripper) RoundTrip(req *http.Request) (*http.Respon... FILE: internal/test/helpers_test.go function TestCreateTestFile (line 14) | func TestCreateTestFile(t *testing.T) { function TestTokenRoundTripperAddsHeader (line 27) | func TestTokenRoundTripperAddsHeader(t *testing.T) { FILE: internal/test/server.go constant testAPI (line 11) | testAPI = "this-is-my-secure-token-do-not-steal!!" function GetTestToken (line 13) | func GetTestToken() string { type ServerTest (line 17) | type ServerTest struct method HandlerCount (line 27) | func (ts *ServerTest) HandlerCount() int { method HasHandler (line 32) | func (ts *ServerTest) HasHandler(path string) bool { method RegisterHandler (line 38) | func (ts *ServerTest) RegisterHandler(path string, handler handler) { method OpenAITestServer (line 46) | func (ts *ServerTest) OpenAITestServer() *httptest.Server { type handler (line 20) | type handler function NewTestServer (line 22) | func NewTestServer() *ServerTest { FILE: internal/test/server_test.go function TestGetTestToken (line 11) | func TestGetTestToken(t *testing.T) { function TestNewTestServer (line 17) | func TestNewTestServer(t *testing.T) { function TestRegisterHandlerTransformsPath (line 27) | func TestRegisterHandlerTransformsPath(t *testing.T) { function TestOpenAITestServer (line 36) | func TestOpenAITestServer(t *testing.T) { FILE: internal/unmarshaler.go type Unmarshaler (line 7) | type Unmarshaler interface type JSONUnmarshaler (line 11) | type JSONUnmarshaler struct method Unmarshal (line 13) | func (jm *JSONUnmarshaler) Unmarshal(data []byte, v any) error { FILE: internal/unmarshaler_test.go function TestJSONUnmarshaler_Normal (line 10) | func TestJSONUnmarshaler_Normal(t *testing.T) { function TestJSONUnmarshaler_InvalidJSON (line 22) | func TestJSONUnmarshaler_InvalidJSON(t *testing.T) { function TestJSONUnmarshaler_EmptyInput (line 31) | func TestJSONUnmarshaler_EmptyInput(t *testing.T) { FILE: jsonschema/containsref_test.go type SelfRef (line 10) | type SelfRef struct type Address (line 15) | type Address struct type Person (line 19) | type Person struct function TestGenerateSchemaForType_SelfRef (line 25) | func TestGenerateSchemaForType_SelfRef(t *testing.T) { function TestGenerateSchemaForType_NoSelfRef (line 37) | func TestGenerateSchemaForType_NoSelfRef(t *testing.T) { FILE: jsonschema/json.go type DataType (line 15) | type DataType constant Object (line 18) | Object DataType = "object" constant Number (line 19) | Number DataType = "number" constant Integer (line 20) | Integer DataType = "integer" constant String (line 21) | String DataType = "string" constant Array (line 22) | Array DataType = "array" constant Null (line 23) | Null DataType = "null" constant Boolean (line 24) | Boolean DataType = "boolean" type Definition (line 29) | type Definition struct method MarshalJSON (line 58) | func (d *Definition) MarshalJSON() ([]byte, error) { method Unmarshal (line 70) | func (d *Definition) Unmarshal(content string, v any) error { function GenerateSchemaForType (line 74) | func GenerateSchemaForType(v any) (*Definition, error) { function reflectSchema (line 105) | func reflectSchema(t reflect.Type, defs map[string]Definition) (*Definit... function reflectSchemaObject (line 158) | func reflectSchemaObject(t reflect.Type, defs map[string]Definition) (*D... function containsRef (line 214) | func containsRef(def Definition, targetRef string) bool { FILE: jsonschema/json_additional_test.go function TestDefinitionUnmarshal (line 11) | func TestDefinitionUnmarshal(t *testing.T) { function TestGenerateSchemaForTypeUnsupported (line 45) | func TestGenerateSchemaForTypeUnsupported(t *testing.T) { function TestValidateInvalidContainers (line 55) | func TestValidateInvalidContainers(t *testing.T) { function TestValidateRefNotFound (line 68) | func TestValidateRefNotFound(t *testing.T) { FILE: jsonschema/json_errors_test.go function TestGenerateSchemaForType_ErrorPaths (line 10) | func TestGenerateSchemaForType_ErrorPaths(t *testing.T) { FILE: jsonschema/json_test.go function TestDefinition_MarshalJSON (line 11) | func TestDefinition_MarshalJSON(t *testing.T) { type User (line 185) | type User struct type Order (line 191) | type Order struct function TestStructToSchema (line 197) | func TestStructToSchema(t *testing.T) { function structToMap (line 655) | func structToMap(t *testing.T, v any) map[string]any { FILE: jsonschema/validate.go function CollectDefs (line 8) | func CollectDefs(def Definition) map[string]Definition { function collectDefsRecursive (line 14) | func collectDefsRecursive(def Definition, result map[string]Definition, ... function VerifySchemaAndUnmarshal (line 28) | func VerifySchemaAndUnmarshal(schema Definition, content []byte, v any) ... type validateArgs (line 40) | type validateArgs struct type ValidateOption (line 44) | type ValidateOption function WithDefs (line 46) | func WithDefs(defs map[string]Definition) ValidateOption { function Validate (line 52) | func Validate(schema Definition, data any, opts ...ValidateOption) bool { function validateObject (line 99) | func validateObject(schema Definition, data any, defs map[string]Definit... function validateArray (line 120) | func validateArray(schema Definition, data any, defs map[string]Definiti... function contains (line 133) | func contains[S ~[]E, E comparable](s S, v E) bool { FILE: jsonschema/validate_test.go function Test_Validate (line 10) | func Test_Validate(t *testing.T) { function TestUnmarshal (line 174) | func TestUnmarshal(t *testing.T) { function TestCollectDefs (line 255) | func TestCollectDefs(t *testing.T) { FILE: messages.go constant messagesSuffix (line 11) | messagesSuffix = "messages" type Message (line 14) | type Message struct type MessagesList (line 29) | type MessagesList struct type MessageContent (line 40) | type MessageContent struct type MessageText (line 46) | type MessageText struct type ImageFile (line 51) | type ImageFile struct type ImageURL (line 55) | type ImageURL struct type MessageRequest (line 60) | type MessageRequest struct type MessageFile (line 68) | type MessageFile struct type MessageFilesList (line 77) | type MessageFilesList struct type MessageDeletionStatus (line 83) | type MessageDeletionStatus struct method CreateMessage (line 92) | func (c *Client) CreateMessage(ctx context.Context, threadID string, req... method ListMessage (line 105) | func (c *Client) ListMessage(ctx context.Context, threadID string, method RetrieveMessage (line 146) | func (c *Client) RetrieveMessage( method ModifyMessage (line 162) | func (c *Client) ModifyMessage( method RetrieveMessageFile (line 179) | func (c *Client) RetrieveMessageFile( method ListMessageFiles (line 195) | func (c *Client) ListMessageFiles( method DeleteMessage (line 211) | func (c *Client) DeleteMessage( FILE: messages_test.go function setupServerForTestMessage (line 17) | func setupServerForTestMessage(t *testing.T, server *test.ServerTest) { function TestMessages (line 186) | func TestMessages(t *testing.T) { FILE: models.go type Model (line 10) | type Model struct type Permission (line 23) | type Permission struct type FineTuneModelDeleteResponse (line 39) | type FineTuneModelDeleteResponse struct type ModelsList (line 48) | type ModelsList struct method ListModels (line 56) | func (c *Client) ListModels(ctx context.Context) (models ModelsList, err... method GetModel (line 68) | func (c *Client) GetModel(ctx context.Context, modelID string) (model Mo... method DeleteFineTuneModel (line 81) | func (c *Client) DeleteFineTuneModel(ctx context.Context, modelID string) ( FILE: models_test.go constant testFineTuneModelID (line 16) | testFineTuneModelID = "fine-tune-model-id" function TestListModels (line 19) | func TestListModels(t *testing.T) { function TestAzureListModels (line 27) | func TestAzureListModels(t *testing.T) { function handleListModelsEndpoint (line 36) | func handleListModelsEndpoint(w http.ResponseWriter, _ *http.Request) { function TestGetModel (line 42) | func TestGetModel(t *testing.T) { function TestGetModelO3 (line 51) | func TestGetModelO3(t *testing.T) { function TestGetModelO4Mini (line 60) | func TestGetModelO4Mini(t *testing.T) { function TestAzureGetModel (line 68) | func TestAzureGetModel(t *testing.T) { function handleGetModelEndpoint (line 77) | func handleGetModelEndpoint(w http.ResponseWriter, _ *http.Request) { function TestGetModelReturnTimeoutError (line 82) | func TestGetModelReturnTimeoutError(t *testing.T) { function TestDeleteFineTuneModel (line 101) | func TestDeleteFineTuneModel(t *testing.T) { function handleDeleteFineTuneModelEndpoint (line 109) | func handleDeleteFineTuneModelEndpoint(w http.ResponseWriter, _ *http.Re... FILE: moderation.go constant ModerationOmniLatest (line 17) | ModerationOmniLatest = "omni-moderation-latest" constant ModerationOmni20240926 (line 18) | ModerationOmni20240926 = "omni-moderation-2024-09-26" constant ModerationTextStable (line 19) | ModerationTextStable = "text-moderation-stable" constant ModerationTextLatest (line 20) | ModerationTextLatest = "text-moderation-latest" constant ModerationText001 (line 22) | ModerationText001 = "text-moderation-001" type ModerationRequest (line 37) | type ModerationRequest struct type Result (line 43) | type Result struct type ResultCategories (line 50) | type ResultCategories struct type ResultCategoryScores (line 65) | type ResultCategoryScores struct type ModerationResponse (line 80) | type ModerationResponse struct method Moderations (line 90) | func (c *Client) Moderations(ctx context.Context, request ModerationRequ... FILE: moderation_test.go function TestModerations (line 19) | func TestModerations(t *testing.T) { function TestModerationsWithDifferentModelOptions (line 31) | func TestModerationsWithDifferentModelOptions(t *testing.T) { function getModerationModelTestOption (line 57) | func getModerationModelTestOption(model string, expect error) struct { function handleModerationEndpoint (line 68) | func handleModerationEndpoint(w http.ResponseWriter, r *http.Request) { function getModerationBody (line 143) | func getModerationBody(r *http.Request) (openai.ModerationRequest, error) { FILE: openai_test.go function setupOpenAITestServer (line 8) | func setupOpenAITestServer() (client *openai.Client, server *test.Server... function setupAzureTestServer (line 19) | func setupAzureTestServer() (client *openai.Client, server *test.ServerT... function numTokens (line 35) | func numTokens(s string) int { FILE: ratelimit.go type RateLimitHeaders (line 10) | type RateLimitHeaders struct type ResetTime (line 19) | type ResetTime method String (line 21) | func (r ResetTime) String() string { method Time (line 25) | func (r ResetTime) Time() time.Time { function newRateLimitHeaders (line 30) | func newRateLimitHeaders(h http.Header) RateLimitHeaders { FILE: reasoning_validator.go type ReasoningValidator (line 32) | type ReasoningValidator struct method Validate (line 40) | func (v *ReasoningValidator) Validate(request ChatCompletionRequest) e... method validateReasoningModelParams (line 58) | func (v *ReasoningValidator) validateReasoningModelParams(request Chat... function NewReasoningValidator (line 35) | func NewReasoningValidator() *ReasoningValidator { FILE: run.go type Run (line 10) | type Run struct type RunStatus (line 44) | type RunStatus constant RunStatusQueued (line 47) | RunStatusQueued RunStatus = "queued" constant RunStatusInProgress (line 48) | RunStatusInProgress RunStatus = "in_progress" constant RunStatusRequiresAction (line 49) | RunStatusRequiresAction RunStatus = "requires_action" constant RunStatusCancelling (line 50) | RunStatusCancelling RunStatus = "cancelling" constant RunStatusFailed (line 51) | RunStatusFailed RunStatus = "failed" constant RunStatusCompleted (line 52) | RunStatusCompleted RunStatus = "completed" constant RunStatusIncomplete (line 53) | RunStatusIncomplete RunStatus = "incomplete" constant RunStatusExpired (line 54) | RunStatusExpired RunStatus = "expired" constant RunStatusCancelled (line 55) | RunStatusCancelled RunStatus = "cancelled" type RunRequiredAction (line 58) | type RunRequiredAction struct type RequiredActionType (line 63) | type RequiredActionType constant RequiredActionTypeSubmitToolOutputs (line 66) | RequiredActionTypeSubmitToolOutputs RequiredActionType = "submit_tool_ou... type SubmitToolOutputs (line 69) | type SubmitToolOutputs struct type RunLastError (line 73) | type RunLastError struct type RunError (line 78) | type RunError constant RunErrorServerError (line 81) | RunErrorServerError RunError = "server_error" constant RunErrorRateLimitExceeded (line 82) | RunErrorRateLimitExceeded RunError = "rate_limit_exceeded" type RunRequest (line 85) | type RunRequest struct type ThreadTruncationStrategy (line 120) | type ThreadTruncationStrategy struct type TruncationStrategy (line 128) | type TruncationStrategy constant TruncationStrategyAuto (line 132) | TruncationStrategyAuto = TruncationStrategy("auto") constant TruncationStrategyLastMessages (line 134) | TruncationStrategyLastMessages = TruncationStrategy("last_messages") type ReponseFormat (line 140) | type ReponseFormat struct type RunModifyRequest (line 144) | type RunModifyRequest struct type RunList (line 149) | type RunList struct type SubmitToolOutputsRequest (line 155) | type SubmitToolOutputsRequest struct type ToolOutput (line 159) | type ToolOutput struct type CreateThreadAndRunRequest (line 164) | type CreateThreadAndRunRequest struct type RunStep (line 169) | type RunStep struct type RunStepStatus (line 189) | type RunStepStatus constant RunStepStatusInProgress (line 192) | RunStepStatusInProgress RunStepStatus = "in_progress" constant RunStepStatusCancelling (line 193) | RunStepStatusCancelling RunStepStatus = "cancelled" constant RunStepStatusFailed (line 194) | RunStepStatusFailed RunStepStatus = "failed" constant RunStepStatusCompleted (line 195) | RunStepStatusCompleted RunStepStatus = "completed" constant RunStepStatusExpired (line 196) | RunStepStatusExpired RunStepStatus = "expired" type RunStepType (line 199) | type RunStepType constant RunStepTypeMessageCreation (line 202) | RunStepTypeMessageCreation RunStepType = "message_creation" constant RunStepTypeToolCalls (line 203) | RunStepTypeToolCalls RunStepType = "tool_calls" type StepDetails (line 206) | type StepDetails struct type StepDetailsMessageCreation (line 212) | type StepDetailsMessageCreation struct type RunStepList (line 217) | type RunStepList struct type Pagination (line 227) | type Pagination struct method CreateRun (line 235) | func (c *Client) CreateRun( method RetrieveRun (line 256) | func (c *Client) RetrieveRun( method ModifyRun (line 276) | func (c *Client) ModifyRun( method ListRuns (line 298) | func (c *Client) ListRuns( method SubmitToolOutputs (line 337) | func (c *Client) SubmitToolOutputs( method CancelRun (line 358) | func (c *Client) CancelRun( method CreateThreadAndRun (line 377) | func (c *Client) CreateThreadAndRun( method RetrieveRunStep (line 396) | func (c *Client) RetrieveRunStep( method ListRunSteps (line 417) | func (c *Client) ListRunSteps( FILE: run_test.go function TestRun (line 16) | func TestRun(t *testing.T) { FILE: speech.go type SpeechModel (line 8) | type SpeechModel constant TTSModel1 (line 11) | TTSModel1 SpeechModel = "tts-1" constant TTSModel1HD (line 12) | TTSModel1HD SpeechModel = "tts-1-hd" constant TTSModelCanary (line 13) | TTSModelCanary SpeechModel = "canary-tts" constant TTSModelGPT4oMini (line 14) | TTSModelGPT4oMini SpeechModel = "gpt-4o-mini-tts" type SpeechVoice (line 17) | type SpeechVoice constant VoiceAlloy (line 20) | VoiceAlloy SpeechVoice = "alloy" constant VoiceAsh (line 21) | VoiceAsh SpeechVoice = "ash" constant VoiceBallad (line 22) | VoiceBallad SpeechVoice = "ballad" constant VoiceCoral (line 23) | VoiceCoral SpeechVoice = "coral" constant VoiceEcho (line 24) | VoiceEcho SpeechVoice = "echo" constant VoiceFable (line 25) | VoiceFable SpeechVoice = "fable" constant VoiceOnyx (line 26) | VoiceOnyx SpeechVoice = "onyx" constant VoiceNova (line 27) | VoiceNova SpeechVoice = "nova" constant VoiceShimmer (line 28) | VoiceShimmer SpeechVoice = "shimmer" constant VoiceVerse (line 29) | VoiceVerse SpeechVoice = "verse" type SpeechResponseFormat (line 32) | type SpeechResponseFormat constant SpeechResponseFormatMp3 (line 35) | SpeechResponseFormatMp3 SpeechResponseFormat = "mp3" constant SpeechResponseFormatOpus (line 36) | SpeechResponseFormatOpus SpeechResponseFormat = "opus" constant SpeechResponseFormatAac (line 37) | SpeechResponseFormatAac SpeechResponseFormat = "aac" constant SpeechResponseFormatFlac (line 38) | SpeechResponseFormatFlac SpeechResponseFormat = "flac" constant SpeechResponseFormatWav (line 39) | SpeechResponseFormatWav SpeechResponseFormat = "wav" constant SpeechResponseFormatPcm (line 40) | SpeechResponseFormatPcm SpeechResponseFormat = "pcm" type CreateSpeechRequest (line 43) | type CreateSpeechRequest struct method CreateSpeech (line 52) | func (c *Client) CreateSpeech(ctx context.Context, request CreateSpeechR... FILE: speech_test.go function TestSpeechIntegration (line 19) | func TestSpeechIntegration(t *testing.T) { FILE: stream.go type CompletionStream (line 13) | type CompletionStream struct method CreateCompletionStream (line 21) | func (c *Client) CreateCompletionStream( FILE: stream_reader.go type streamable (line 19) | type streamable interface type streamReader (line 23) | type streamReader struct method Recv (line 35) | func (stream *streamReader[T]) Recv() (response T, err error) { method RecvRaw (line 48) | func (stream *streamReader[T]) RecvRaw() ([]byte, error) { method processLines (line 57) | func (stream *streamReader[T]) processLines() ([]byte, error) { method unmarshalError (line 103) | func (stream *streamReader[T]) unmarshalError() (errResp *ErrorResponse) { method Close (line 117) | func (stream *streamReader[T]) Close() error { FILE: stream_reader_test.go type failingUnMarshaller (line 16) | type failingUnMarshaller struct method Unmarshal (line 18) | func (*failingUnMarshaller) Unmarshal(_ []byte, _ any) error { function TestStreamReaderReturnsUnmarshalerErrors (line 22) | func TestStreamReaderReturnsUnmarshalerErrors(t *testing.T) { function TestStreamReaderReturnsErrTooManyEmptyStreamMessages (line 44) | func TestStreamReaderReturnsErrTooManyEmptyStreamMessages(t *testing.T) { function TestStreamReaderReturnsErrTestErrorAccumulatorWriteFailed (line 55) | func TestStreamReaderReturnsErrTestErrorAccumulatorWriteFailed(t *testin... function TestStreamReaderRecvRaw (line 67) | func TestStreamReaderRecvRaw(t *testing.T) { FILE: stream_test.go function TestCompletionsStreamWrongModel (line 17) | func TestCompletionsStreamWrongModel(t *testing.T) { function TestCreateCompletionStream (line 34) | func TestCreateCompletionStream(t *testing.T) { function TestCreateCompletionStreamError (line 106) | func TestCreateCompletionStreamError(t *testing.T) { function TestCreateCompletionStreamRateLimitError (line 151) | func TestCreateCompletionStreamRateLimitError(t *testing.T) { function TestCreateCompletionStreamTooManyEmptyStreamMessagesError (line 182) | func TestCreateCompletionStreamTooManyEmptyStreamMessagesError(t *testin... function TestCreateCompletionStreamUnexpectedTerminatedError (line 228) | func TestCreateCompletionStreamUnexpectedTerminatedError(t *testing.T) { function TestCreateCompletionStreamBrokenJSONError (line 263) | func TestCreateCompletionStreamBrokenJSONError(t *testing.T) { function TestCreateCompletionStreamReturnTimeoutError (line 305) | func TestCreateCompletionStreamReturnTimeoutError(t *testing.T) { function compareResponses (line 330) | func compareResponses(r1, r2 openai.CompletionResponse) bool { function compareResponseChoices (line 345) | func compareResponseChoices(c1, c2 openai.CompletionChoice) bool { FILE: thread.go constant threadsSuffix (line 9) | threadsSuffix = "/threads" type Thread (line 12) | type Thread struct type ThreadRequest (line 22) | type ThreadRequest struct type ToolResources (line 28) | type ToolResources struct type CodeInterpreterToolResources (line 33) | type CodeInterpreterToolResources struct type FileSearchToolResources (line 37) | type FileSearchToolResources struct type ToolResourcesRequest (line 41) | type ToolResourcesRequest struct type CodeInterpreterToolResourcesRequest (line 46) | type CodeInterpreterToolResourcesRequest struct type FileSearchToolResourcesRequest (line 50) | type FileSearchToolResourcesRequest struct type VectorStoreToolResources (line 55) | type VectorStoreToolResources struct type ChunkingStrategy (line 61) | type ChunkingStrategy struct type StaticChunkingStrategy (line 66) | type StaticChunkingStrategy struct type ChunkingStrategyType (line 71) | type ChunkingStrategyType constant ChunkingStrategyTypeAuto (line 74) | ChunkingStrategyTypeAuto ChunkingStrategyType = "auto" constant ChunkingStrategyTypeStatic (line 75) | ChunkingStrategyTypeStatic ChunkingStrategyType = "static" type ModifyThreadRequest (line 78) | type ModifyThreadRequest struct type ThreadMessageRole (line 83) | type ThreadMessageRole constant ThreadMessageRoleAssistant (line 86) | ThreadMessageRoleAssistant ThreadMessageRole = "assistant" constant ThreadMessageRoleUser (line 87) | ThreadMessageRoleUser ThreadMessageRole = "user" type ThreadMessage (line 90) | type ThreadMessage struct type ThreadAttachment (line 98) | type ThreadAttachment struct type ThreadAttachmentTool (line 103) | type ThreadAttachmentTool struct type ThreadDeleteResponse (line 107) | type ThreadDeleteResponse struct method CreateThread (line 116) | func (c *Client) CreateThread(ctx context.Context, request ThreadRequest... method RetrieveThread (line 128) | func (c *Client) RetrieveThread(ctx context.Context, threadID string) (r... method ModifyThread (line 141) | func (c *Client) ModifyThread( method DeleteThread (line 158) | func (c *Client) DeleteThread( FILE: thread_test.go function TestThread (line 15) | func TestThread(t *testing.T) { function TestAzureThread (line 98) | func TestAzureThread(t *testing.T) { FILE: vector_store.go constant vectorStoresSuffix (line 11) | vectorStoresSuffix = "/vector_stores" constant vectorStoresFilesSuffix (line 12) | vectorStoresFilesSuffix = "/files" constant vectorStoresFileBatchesSuffix (line 13) | vectorStoresFileBatchesSuffix = "/file_batches" type VectorStoreFileCount (line 16) | type VectorStoreFileCount struct type VectorStore (line 24) | type VectorStore struct type VectorStoreExpires (line 39) | type VectorStoreExpires struct type VectorStoreRequest (line 45) | type VectorStoreRequest struct type VectorStoresList (line 53) | type VectorStoresList struct type VectorStoreDeleteResponse (line 61) | type VectorStoreDeleteResponse struct type VectorStoreFile (line 69) | type VectorStoreFile struct type VectorStoreFileRequest (line 80) | type VectorStoreFileRequest struct type VectorStoreFilesList (line 84) | type VectorStoreFilesList struct type VectorStoreFileBatch (line 93) | type VectorStoreFileBatch struct type VectorStoreFileBatchRequest (line 104) | type VectorStoreFileBatchRequest struct method CreateVectorStore (line 109) | func (c *Client) CreateVectorStore(ctx context.Context, request VectorSt... method RetrieveVectorStore (line 123) | func (c *Client) RetrieveVectorStore( method ModifyVectorStore (line 136) | func (c *Client) ModifyVectorStore( method DeleteVectorStore (line 150) | func (c *Client) DeleteVectorStore( method ListVectorStores (line 163) | func (c *Client) ListVectorStores( method CreateVectorStoreFile (line 196) | func (c *Client) CreateVectorStoreFile( method RetrieveVectorStoreFile (line 211) | func (c *Client) RetrieveVectorStoreFile( method DeleteVectorStoreFile (line 225) | func (c *Client) DeleteVectorStoreFile( method ListVectorStoreFiles (line 239) | func (c *Client) ListVectorStoreFiles( method CreateVectorStoreFileBatch (line 272) | func (c *Client) CreateVectorStoreFileBatch( method RetrieveVectorStoreFileBatch (line 287) | func (c *Client) RetrieveVectorStoreFileBatch( method CancelVectorStoreFileBatch (line 301) | func (c *Client) CancelVectorStoreFileBatch( method ListVectorStoreFilesInBatch (line 316) | func (c *Client) ListVectorStoreFilesInBatch( FILE: vector_store_test.go function TestVectorStore (line 16) | func TestVectorStore(t *testing.T) {