Documentation
¶
Index ¶
- func Bool(value bool) param.Field[bool]
- func DefaultClientOptions() []option.RequestOption
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type ActiveListCallbacksResponse
- type ActiveService
- type AddAddAllowedIPParams
- type AddAddAllowedIPResponse
- type AddService
- type AnthropicDeleteResponse
- type AnthropicGetResponse
- type AnthropicModifyResponse
- type AnthropicNewResponse
- type AnthropicService
- func (r *AnthropicService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AnthropicDeleteResponse, err error)
- func (r *AnthropicService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AnthropicGetResponse, err error)
- func (r *AnthropicService) Modify(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AnthropicModifyResponse, err error)
- func (r *AnthropicService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AnthropicNewResponse, err error)
- func (r *AnthropicService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AnthropicUpdateResponse, err error)
- type AnthropicUpdateResponse
- type AssemblyaiDeleteResponse
- type AssemblyaiGetResponse
- type AssemblyaiNewResponse
- type AssemblyaiPatchResponse
- type AssemblyaiService
- func (r *AssemblyaiService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AssemblyaiDeleteResponse, err error)
- func (r *AssemblyaiService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AssemblyaiGetResponse, err error)
- func (r *AssemblyaiService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AssemblyaiNewResponse, err error)
- func (r *AssemblyaiService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AssemblyaiPatchResponse, err error)
- func (r *AssemblyaiService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AssemblyaiUpdateResponse, err error)
- type AssemblyaiUpdateResponse
- type AssistantDeleteResponse
- type AssistantListResponse
- type AssistantNewResponse
- type AssistantService
- func (r *AssistantService) Delete(ctx context.Context, assistantID string, opts ...option.RequestOption) (res *AssistantDeleteResponse, err error)
- func (r *AssistantService) List(ctx context.Context, opts ...option.RequestOption) (res *AssistantListResponse, err error)
- func (r *AssistantService) New(ctx context.Context, opts ...option.RequestOption) (res *AssistantNewResponse, err error)
- type AudioService
- type AudioSpeechNewResponse
- type AudioSpeechService
- type AudioTranscriptionNewParams
- type AudioTranscriptionNewResponse
- type AudioTranscriptionService
- type AzureCallResponse
- type AzureDeleteResponse
- type AzureNewResponse
- type AzurePatchResponse
- type AzureService
- func (r *AzureService) Call(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AzureCallResponse, err error)
- func (r *AzureService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AzureDeleteResponse, err error)
- func (r *AzureService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AzureNewResponse, err error)
- func (r *AzureService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AzurePatchResponse, err error)
- func (r *AzureService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AzureUpdateResponse, err error)
- type AzureUpdateResponse
- type BatchCancelCancelParams
- type BatchCancelCancelResponse
- type BatchCancelService
- type BatchCancelWithProviderResponse
- type BatchGetParams
- type BatchGetResponse
- type BatchGetWithProviderResponse
- type BatchListParams
- type BatchListResponse
- type BatchListWithProviderParams
- type BatchListWithProviderResponse
- type BatchNewParams
- type BatchNewResponse
- type BatchNewWithProviderResponse
- type BatchService
- func (r *BatchService) CancelWithProvider(ctx context.Context, provider string, batchID string, ...) (res *BatchCancelWithProviderResponse, err error)
- func (r *BatchService) Get(ctx context.Context, batchID string, query BatchGetParams, ...) (res *BatchGetResponse, err error)
- func (r *BatchService) GetWithProvider(ctx context.Context, provider string, batchID string, ...) (res *BatchGetWithProviderResponse, err error)
- func (r *BatchService) List(ctx context.Context, query BatchListParams, opts ...option.RequestOption) (res *BatchListResponse, err error)
- func (r *BatchService) ListWithProvider(ctx context.Context, provider string, query BatchListWithProviderParams, ...) (res *BatchListWithProviderResponse, err error)
- func (r *BatchService) New(ctx context.Context, body BatchNewParams, opts ...option.RequestOption) (res *BatchNewResponse, err error)
- func (r *BatchService) NewWithProvider(ctx context.Context, provider string, opts ...option.RequestOption) (res *BatchNewWithProviderResponse, err error)
- type BedrockDeleteResponse
- type BedrockGetResponse
- type BedrockNewResponse
- type BedrockPatchResponse
- type BedrockService
- func (r *BedrockService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *BedrockDeleteResponse, err error)
- func (r *BedrockService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *BedrockGetResponse, err error)
- func (r *BedrockService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *BedrockNewResponse, err error)
- func (r *BedrockService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *BedrockPatchResponse, err error)
- func (r *BedrockService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *BedrockUpdateResponse, err error)
- type BedrockUpdateResponse
- type BlockKeyRequestParam
- type BlockTeamRequestParam
- type BlockUsersParam
- type BudgetDeleteParams
- type BudgetDeleteResponse
- type BudgetInfoParams
- type BudgetInfoResponse
- type BudgetListResponse
- type BudgetNewModelMaxBudgetParam
- type BudgetNewParam
- type BudgetNewParams
- type BudgetNewResponse
- type BudgetService
- func (r *BudgetService) Delete(ctx context.Context, body BudgetDeleteParams, opts ...option.RequestOption) (res *BudgetDeleteResponse, err error)
- func (r *BudgetService) Info(ctx context.Context, body BudgetInfoParams, opts ...option.RequestOption) (res *BudgetInfoResponse, err error)
- func (r *BudgetService) List(ctx context.Context, opts ...option.RequestOption) (res *BudgetListResponse, err error)
- func (r *BudgetService) New(ctx context.Context, body BudgetNewParams, opts ...option.RequestOption) (res *BudgetNewResponse, err error)
- func (r *BudgetService) Settings(ctx context.Context, query BudgetSettingsParams, opts ...option.RequestOption) (res *BudgetSettingsResponse, err error)
- func (r *BudgetService) Update(ctx context.Context, body BudgetUpdateParams, opts ...option.RequestOption) (res *BudgetUpdateResponse, err error)
- type BudgetSettingsParams
- type BudgetSettingsResponse
- type BudgetTable
- type BudgetUpdateParams
- type BudgetUpdateResponse
- type CacheDeleteResponse
- type CacheFlushAllResponse
- type CachePingResponse
- type CacheRediGetInfoResponse
- type CacheRediService
- type CacheService
- func (r *CacheService) Delete(ctx context.Context, opts ...option.RequestOption) (res *CacheDeleteResponse, err error)
- func (r *CacheService) FlushAll(ctx context.Context, opts ...option.RequestOption) (res *CacheFlushAllResponse, err error)
- func (r *CacheService) Ping(ctx context.Context, opts ...option.RequestOption) (res *CachePingResponse, err error)
- type ChatCompletionNewParams
- type ChatCompletionNewParamsFunctionCallMap
- type ChatCompletionNewParamsFunctionCallUnion
- type ChatCompletionNewParamsMessage
- type ChatCompletionNewParamsMessageUnion
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessage
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageCacheControl
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageCacheControlType
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArray
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlMap
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlUnion
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayItem
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayItemUnion
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayType
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentUnion
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageFunctionCall
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageRole
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlock
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlockUnion
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMap
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnion
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMap
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnion
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksType
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCall
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsFunction
- type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsType
- type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessage
- type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageCacheControl
- type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageCacheControlType
- type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentArray
- type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentUnion
- type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageRole
- type ChatCompletionNewParamsMessagesChatCompletionFunctionMessage
- type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArray
- type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl
- type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType
- type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayItem
- type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayType
- type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentUnion
- type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageRole
- type ChatCompletionNewParamsMessagesChatCompletionSystemMessage
- type ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControl
- type ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControlType
- type ChatCompletionNewParamsMessagesChatCompletionSystemMessageContentArray
- type ChatCompletionNewParamsMessagesChatCompletionSystemMessageContentUnion
- type ChatCompletionNewParamsMessagesChatCompletionSystemMessageRole
- type ChatCompletionNewParamsMessagesChatCompletionToolMessage
- type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArray
- type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayCacheControl
- type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayCacheControlType
- type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayItem
- type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayType
- type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentUnion
- type ChatCompletionNewParamsMessagesChatCompletionToolMessageRole
- type ChatCompletionNewParamsMessagesChatCompletionUserMessage
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControl
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControlType
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArray
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject
- func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) ImplementsChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion()
- func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) MarshalJSON() (data []byte, err error)
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject
- func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) ImplementsChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion()
- func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) MarshalJSON() (data []byte, err error)
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayItem
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayItemUnion
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayType
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentUnion
- type ChatCompletionNewParamsMessagesChatCompletionUserMessageRole
- type ChatCompletionNewParamsMessagesRole
- type ChatCompletionNewParamsStopArray
- type ChatCompletionNewParamsStopUnion
- type ChatCompletionNewParamsToolChoiceMap
- type ChatCompletionNewParamsToolChoiceUnion
- type ChatCompletionNewResponse
- type ChatCompletionService
- type ChatService
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) GetHome(ctx context.Context, opts ...option.RequestOption) (res *GetHomeResponse, err error)
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type CohereDeleteResponse
- type CohereGetResponse
- type CohereModifyResponse
- type CohereNewResponse
- type CohereService
- func (r *CohereService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *CohereDeleteResponse, err error)
- func (r *CohereService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *CohereGetResponse, err error)
- func (r *CohereService) Modify(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *CohereModifyResponse, err error)
- func (r *CohereService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *CohereNewResponse, err error)
- func (r *CohereService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *CohereUpdateResponse, err error)
- type CohereUpdateResponse
- type CompletionNewParams
- type CompletionNewResponse
- type CompletionService
- type ConfigPassThroughEndpointDeleteParams
- type ConfigPassThroughEndpointListParams
- type ConfigPassThroughEndpointNewParams
- type ConfigPassThroughEndpointNewResponse
- type ConfigPassThroughEndpointService
- func (r *ConfigPassThroughEndpointService) Delete(ctx context.Context, body ConfigPassThroughEndpointDeleteParams, ...) (res *PassThroughEndpointResponse, err error)
- func (r *ConfigPassThroughEndpointService) List(ctx context.Context, query ConfigPassThroughEndpointListParams, ...) (res *PassThroughEndpointResponse, err error)
- func (r *ConfigPassThroughEndpointService) New(ctx context.Context, body ConfigPassThroughEndpointNewParams, ...) (res *ConfigPassThroughEndpointNewResponse, err error)
- func (r *ConfigPassThroughEndpointService) Update(ctx context.Context, endpointID string, ...) (res *ConfigPassThroughEndpointUpdateResponse, err error)
- type ConfigPassThroughEndpointUpdateParams
- type ConfigPassThroughEndpointUpdateResponse
- type ConfigService
- type CredentialDeleteResponse
- type CredentialListResponse
- type CredentialNewParams
- type CredentialNewResponse
- type CredentialService
- func (r *CredentialService) Delete(ctx context.Context, credentialName string, opts ...option.RequestOption) (res *CredentialDeleteResponse, err error)
- func (r *CredentialService) List(ctx context.Context, opts ...option.RequestOption) (res *CredentialListResponse, err error)
- func (r *CredentialService) New(ctx context.Context, body CredentialNewParams, opts ...option.RequestOption) (res *CredentialNewResponse, err error)
- type CustomerBlockParams
- type CustomerBlockResponse
- type CustomerDeleteParams
- type CustomerDeleteResponse
- type CustomerGetInfoParams
- type CustomerNewParams
- type CustomerNewParamsAllowedModelRegion
- type CustomerNewParamsModelMaxBudget
- type CustomerNewResponse
- type CustomerService
- func (r *CustomerService) Block(ctx context.Context, body CustomerBlockParams, opts ...option.RequestOption) (res *CustomerBlockResponse, err error)
- func (r *CustomerService) Delete(ctx context.Context, body CustomerDeleteParams, opts ...option.RequestOption) (res *CustomerDeleteResponse, err error)
- func (r *CustomerService) GetInfo(ctx context.Context, query CustomerGetInfoParams, opts ...option.RequestOption) (res *LiteLlmEndUserTable, err error)
- func (r *CustomerService) List(ctx context.Context, opts ...option.RequestOption) (res *[]LiteLlmEndUserTable, err error)
- func (r *CustomerService) New(ctx context.Context, body CustomerNewParams, opts ...option.RequestOption) (res *CustomerNewResponse, err error)
- func (r *CustomerService) Unblock(ctx context.Context, body CustomerUnblockParams, opts ...option.RequestOption) (res *CustomerUnblockResponse, err error)
- func (r *CustomerService) Update(ctx context.Context, body CustomerUpdateParams, opts ...option.RequestOption) (res *CustomerUpdateResponse, err error)
- type CustomerUnblockParams
- type CustomerUnblockResponse
- type CustomerUpdateParams
- type CustomerUpdateParamsAllowedModelRegion
- type CustomerUpdateResponse
- type DeleteNewAllowedIPParams
- type DeleteNewAllowedIPResponse
- type DeleteService
- type EmbeddingNewParams
- type EmbeddingNewParamsCustomLlmProviderMap
- type EmbeddingNewParamsCustomLlmProviderUnion
- type EmbeddingNewResponse
- type EmbeddingService
- type EngineChatCompleteParams
- type EngineChatCompleteParamsFunctionCallMap
- type EngineChatCompleteParamsFunctionCallUnion
- type EngineChatCompleteParamsMessage
- type EngineChatCompleteParamsMessageUnion
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessage
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControl
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControlType
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArray
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlMap
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlUnion
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItem
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItemUnion
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayType
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageFunctionCall
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageRole
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlock
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlockUnion
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMap
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnion
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMap
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnion
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksType
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCall
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsFunction
- type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsType
- type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessage
- type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControl
- type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControlType
- type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentArray
- type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion
- type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageRole
- type EngineChatCompleteParamsMessagesChatCompletionFunctionMessage
- type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArray
- type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl
- type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType
- type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayItem
- type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayType
- type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion
- type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageRole
- type EngineChatCompleteParamsMessagesChatCompletionSystemMessage
- type EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControl
- type EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlType
- type EngineChatCompleteParamsMessagesChatCompletionSystemMessageContentArray
- type EngineChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion
- type EngineChatCompleteParamsMessagesChatCompletionSystemMessageRole
- type EngineChatCompleteParamsMessagesChatCompletionToolMessage
- type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArray
- type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControl
- type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControlType
- type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayItem
- type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayType
- type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentUnion
- type EngineChatCompleteParamsMessagesChatCompletionToolMessageRole
- type EngineChatCompleteParamsMessagesChatCompletionUserMessage
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControl
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControlType
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArray
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject
- func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) ImplementsEngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion()
- func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) MarshalJSON() (data []byte, err error)
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject
- func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) ImplementsEngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion()
- func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) MarshalJSON() (data []byte, err error)
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItem
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItemUnion
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentUnion
- type EngineChatCompleteParamsMessagesChatCompletionUserMessageRole
- type EngineChatCompleteParamsMessagesRole
- type EngineChatCompleteParamsStopArray
- type EngineChatCompleteParamsStopUnion
- type EngineChatCompleteParamsToolChoiceMap
- type EngineChatCompleteParamsToolChoiceUnion
- type EngineChatCompleteResponse
- type EngineChatService
- type EngineCompleteResponse
- type EngineEmbedParams
- type EngineEmbedParamsCustomLlmProviderMap
- type EngineEmbedParamsCustomLlmProviderUnion
- type EngineEmbedResponse
- type EngineService
- type Error
- type EuAssemblyaiDeleteResponse
- type EuAssemblyaiGetResponse
- type EuAssemblyaiNewResponse
- type EuAssemblyaiPatchResponse
- type EuAssemblyaiService
- func (r *EuAssemblyaiService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *EuAssemblyaiDeleteResponse, err error)
- func (r *EuAssemblyaiService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *EuAssemblyaiGetResponse, err error)
- func (r *EuAssemblyaiService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *EuAssemblyaiNewResponse, err error)
- func (r *EuAssemblyaiService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *EuAssemblyaiPatchResponse, err error)
- func (r *EuAssemblyaiService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *EuAssemblyaiUpdateResponse, err error)
- type EuAssemblyaiUpdateResponse
- type FileContentGetResponse
- type FileContentService
- type FileDeleteResponse
- type FileGetResponse
- type FileListParams
- type FileListResponse
- type FileNewParams
- type FileNewResponse
- type FileService
- func (r *FileService) Delete(ctx context.Context, provider string, fileID string, ...) (res *FileDeleteResponse, err error)
- func (r *FileService) Get(ctx context.Context, provider string, fileID string, ...) (res *FileGetResponse, err error)
- func (r *FileService) List(ctx context.Context, provider string, query FileListParams, ...) (res *FileListResponse, err error)
- func (r *FileService) New(ctx context.Context, provider string, body FileNewParams, ...) (res *FileNewResponse, err error)
- type FineTuningJobCancelNewResponse
- type FineTuningJobCancelService
- type FineTuningJobGetParams
- type FineTuningJobGetParamsCustomLlmProvider
- type FineTuningJobGetResponse
- type FineTuningJobListParams
- type FineTuningJobListParamsCustomLlmProvider
- type FineTuningJobListResponse
- type FineTuningJobNewParams
- type FineTuningJobNewResponse
- type FineTuningJobService
- func (r *FineTuningJobService) Get(ctx context.Context, fineTuningJobID string, query FineTuningJobGetParams, ...) (res *FineTuningJobGetResponse, err error)
- func (r *FineTuningJobService) List(ctx context.Context, query FineTuningJobListParams, ...) (res *FineTuningJobListResponse, err error)
- func (r *FineTuningJobService) New(ctx context.Context, body FineTuningJobNewParams, opts ...option.RequestOption) (res *FineTuningJobNewResponse, err error)
- type FineTuningService
- type GeminiDeleteResponse
- type GeminiGetResponse
- type GeminiNewResponse
- type GeminiPatchResponse
- type GeminiService
- func (r *GeminiService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *GeminiDeleteResponse, err error)
- func (r *GeminiService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *GeminiGetResponse, err error)
- func (r *GeminiService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *GeminiNewResponse, err error)
- func (r *GeminiService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *GeminiPatchResponse, err error)
- func (r *GeminiService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *GeminiUpdateResponse, err error)
- type GeminiUpdateResponse
- type GenerateKeyResponse
- type GenerateKeyResponseAllowedVectorStoreIndex
- type GenerateKeyResponseAllowedVectorStoreIndexesIndexPermission
- type GenerateKeyResponseObjectPermission
- type GenerateKeyResponseRouterSettings
- type GenerateKeyResponseRouterSettingsModelGroupAliasMap
- type GenerateKeyResponseRouterSettingsModelGroupAliasUnion
- type GenerateKeyResponseRpmLimitType
- type GenerateKeyResponseTpmLimitType
- type GetHomeResponse
- type GlobalService
- type GlobalSpendGetReportParams
- type GlobalSpendGetReportParamsGroupBy
- type GlobalSpendGetReportResponse
- type GlobalSpendGetReportResponseEndTimeUnion
- type GlobalSpendGetReportResponseMessagesArray
- type GlobalSpendGetReportResponseMessagesMap
- type GlobalSpendGetReportResponseMessagesUnion
- type GlobalSpendGetReportResponseResponseArray
- type GlobalSpendGetReportResponseResponseMap
- type GlobalSpendGetReportResponseResponseUnion
- type GlobalSpendGetReportResponseStartTimeUnion
- type GlobalSpendListTagsParams
- type GlobalSpendListTagsResponse
- type GlobalSpendListTagsResponseEndTimeUnion
- type GlobalSpendListTagsResponseMessagesArray
- type GlobalSpendListTagsResponseMessagesMap
- type GlobalSpendListTagsResponseMessagesUnion
- type GlobalSpendListTagsResponseResponseArray
- type GlobalSpendListTagsResponseResponseMap
- type GlobalSpendListTagsResponseResponseUnion
- type GlobalSpendListTagsResponseStartTimeUnion
- type GlobalSpendResetResponse
- type GlobalSpendService
- func (r *GlobalSpendService) GetReport(ctx context.Context, query GlobalSpendGetReportParams, ...) (res *[]GlobalSpendGetReportResponse, err error)
- func (r *GlobalSpendService) ListTags(ctx context.Context, query GlobalSpendListTagsParams, ...) (res *[]GlobalSpendListTagsResponse, err error)
- func (r *GlobalSpendService) Reset(ctx context.Context, opts ...option.RequestOption) (res *GlobalSpendResetResponse, err error)
- type GuardrailListResponse
- type GuardrailListResponseGuardrail
- type GuardrailListResponseGuardrailsGuardrailDefinitionLocation
- type GuardrailListResponseGuardrailsLitellmParams
- type GuardrailListResponseGuardrailsLitellmParamsCategoryThresholds
- type GuardrailService
- type HealthCheckAllParams
- type HealthCheckAllResponse
- type HealthCheckLivelinessResponse
- type HealthCheckLivenessResponse
- type HealthCheckReadinessResponse
- type HealthCheckServicesParams
- type HealthCheckServicesParamsService
- type HealthCheckServicesResponse
- type HealthService
- func (r *HealthService) CheckAll(ctx context.Context, query HealthCheckAllParams, opts ...option.RequestOption) (res *HealthCheckAllResponse, err error)
- func (r *HealthService) CheckLiveliness(ctx context.Context, opts ...option.RequestOption) (res *HealthCheckLivelinessResponse, err error)
- func (r *HealthService) CheckLiveness(ctx context.Context, opts ...option.RequestOption) (res *HealthCheckLivenessResponse, err error)
- func (r *HealthService) CheckReadiness(ctx context.Context, opts ...option.RequestOption) (res *HealthCheckReadinessResponse, err error)
- func (r *HealthService) CheckServices(ctx context.Context, query HealthCheckServicesParams, ...) (res *HealthCheckServicesResponse, err error)
- type IPAddressParam
- type ImageGenerationNewParams
- type ImageGenerationNewResponse
- type ImageGenerationService
- type ImageService
- type KeyBlockParams
- type KeyBlockResponse
- type KeyBlockResponseExpiresUnion
- type KeyBlockResponseObjectPermission
- type KeyCheckHealthResponse
- type KeyCheckHealthResponseKey
- type KeyCheckHealthResponseLoggingCallbacks
- type KeyCheckHealthResponseLoggingCallbacksStatus
- type KeyDeleteParams
- type KeyDeleteResponse
- type KeyGenerateParams
- type KeyGenerateParamsAllowedVectorStoreIndex
- type KeyGenerateParamsAllowedVectorStoreIndexesIndexPermission
- type KeyGenerateParamsKeyType
- type KeyGenerateParamsObjectPermission
- type KeyGenerateParamsRouterSettings
- type KeyGenerateParamsRouterSettingsModelGroupAliasMap
- type KeyGenerateParamsRouterSettingsModelGroupAliasUnion
- type KeyGenerateParamsRpmLimitType
- type KeyGenerateParamsTpmLimitType
- type KeyGetInfoParams
- type KeyGetInfoResponse
- type KeyListParams
- type KeyListResponse
- type KeyListResponseKeysLiteLlmDeletedVerificationToken
- type KeyListResponseKeysLiteLlmDeletedVerificationTokenExpiresUnion
- type KeyListResponseKeysLiteLlmDeletedVerificationTokenObjectPermission
- type KeyListResponseKeysUnion
- type KeyListResponseKeysUserAPIKeyAuth
- type KeyListResponseKeysUserAPIKeyAuthAllowedModelRegion
- type KeyListResponseKeysUserAPIKeyAuthExpiresUnion
- type KeyListResponseKeysUserAPIKeyAuthObjectPermission
- type KeyRegenerateByKeyParams
- type KeyRegenerateService
- type KeyService
- func (r *KeyService) Block(ctx context.Context, params KeyBlockParams, opts ...option.RequestOption) (res *KeyBlockResponse, err error)
- func (r *KeyService) CheckHealth(ctx context.Context, opts ...option.RequestOption) (res *KeyCheckHealthResponse, err error)
- func (r *KeyService) Delete(ctx context.Context, params KeyDeleteParams, opts ...option.RequestOption) (res *KeyDeleteResponse, err error)
- func (r *KeyService) Generate(ctx context.Context, params KeyGenerateParams, opts ...option.RequestOption) (res *GenerateKeyResponse, err error)
- func (r *KeyService) GetInfo(ctx context.Context, query KeyGetInfoParams, opts ...option.RequestOption) (res *KeyGetInfoResponse, err error)
- func (r *KeyService) List(ctx context.Context, query KeyListParams, opts ...option.RequestOption) (res *KeyListResponse, err error)
- func (r *KeyService) RegenerateByKey(ctx context.Context, key string, params KeyRegenerateByKeyParams, ...) (res *GenerateKeyResponse, err error)
- func (r *KeyService) Unblock(ctx context.Context, params KeyUnblockParams, opts ...option.RequestOption) (res *KeyUnblockResponse, err error)
- func (r *KeyService) Update(ctx context.Context, params KeyUpdateParams, opts ...option.RequestOption) (res *KeyUpdateResponse, err error)
- type KeyUnblockParams
- type KeyUnblockResponse
- type KeyUpdateParams
- type KeyUpdateParamsAllowedVectorStoreIndex
- type KeyUpdateParamsAllowedVectorStoreIndexesIndexPermission
- type KeyUpdateParamsObjectPermission
- type KeyUpdateParamsRouterSettings
- type KeyUpdateParamsRouterSettingsModelGroupAliasMap
- type KeyUpdateParamsRouterSettingsModelGroupAliasUnion
- type KeyUpdateParamsRpmLimitType
- type KeyUpdateParamsTpmLimitType
- type KeyUpdateResponse
- type LangfuseDeleteResponse
- type LangfuseGetResponse
- type LangfuseNewResponse
- type LangfusePatchResponse
- type LangfuseService
- func (r *LangfuseService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *LangfuseDeleteResponse, err error)
- func (r *LangfuseService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *LangfuseGetResponse, err error)
- func (r *LangfuseService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *LangfuseNewResponse, err error)
- func (r *LangfuseService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *LangfusePatchResponse, err error)
- func (r *LangfuseService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *LangfuseUpdateResponse, err error)
- type LangfuseUpdateResponse
- type LiteLlmEndUserTable
- type LiteLlmEndUserTableAllowedModelRegion
- type LiteLlmFineTuningJobCreateCustomLlmProvider
- type LiteLlmFineTuningJobCreateHyperparametersBatchSizeUnionParam
- type LiteLlmFineTuningJobCreateHyperparametersLearningRateMultiplierUnionParam
- type LiteLlmFineTuningJobCreateHyperparametersNEpochsUnionParam
- type LiteLlmFineTuningJobCreateHyperparametersParam
- type LiteLlmFineTuningJobCreateParam
- type Member
- type MemberParam
- type MemberRole
- type ModelGroupGetInfoParams
- type ModelGroupGetInfoResponse
- type ModelGroupService
- type ModelInfoListParams
- type ModelInfoListResponse
- type ModelInfoParam
- type ModelInfoService
- type ModelInfoTier
- type ModelListParams
- type ModelListResponse
- type ModelService
- type ModelUpdateFullParams
- type ModelUpdateFullResponse
- type ModelUpdatePartialParams
- type ModelUpdatePartialResponse
- type ModelUpdateService
- func (r *ModelUpdateService) Full(ctx context.Context, body ModelUpdateFullParams, opts ...option.RequestOption) (res *ModelUpdateFullResponse, err error)
- func (r *ModelUpdateService) Partial(ctx context.Context, modelID string, body ModelUpdatePartialParams, ...) (res *ModelUpdatePartialResponse, err error)
- type ModerationNewResponse
- type ModerationService
- type OpenAIDeleteResponse
- type OpenAIDeploymentChatCompleteParams
- type OpenAIDeploymentChatCompleteParamsFunctionCallMap
- type OpenAIDeploymentChatCompleteParamsFunctionCallUnion
- type OpenAIDeploymentChatCompleteParamsMessage
- type OpenAIDeploymentChatCompleteParamsMessageUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessage
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControl
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControlType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArray
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlMap
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItem
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItemUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageFunctionCall
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageRole
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlock
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlockUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMap
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMap
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCall
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsFunction
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessage
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControl
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControlType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentArray
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageRole
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessage
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArray
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayItem
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageRole
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessage
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageCacheControl
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentArray
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageRole
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessage
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArray
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControl
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControlType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayItem
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageRole
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessage
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageCacheControl
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageCacheControlType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArray
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject
- func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion()
- func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) MarshalJSON() (data []byte, err error)
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject
- func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion()
- func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) MarshalJSON() (data []byte, err error)
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItem
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItemUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentUnion
- type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageRole
- type OpenAIDeploymentChatCompleteParamsMessagesRole
- type OpenAIDeploymentChatCompleteParamsStopArray
- type OpenAIDeploymentChatCompleteParamsStopUnion
- type OpenAIDeploymentChatCompleteParamsToolChoiceMap
- type OpenAIDeploymentChatCompleteParamsToolChoiceUnion
- type OpenAIDeploymentChatCompleteResponse
- type OpenAIDeploymentChatService
- type OpenAIDeploymentCompleteResponse
- type OpenAIDeploymentEmbedParams
- type OpenAIDeploymentEmbedParamsCustomLlmProviderMap
- type OpenAIDeploymentEmbedParamsCustomLlmProviderUnion
- type OpenAIDeploymentEmbedResponse
- type OpenAIDeploymentService
- func (r *OpenAIDeploymentService) Complete(ctx context.Context, model string, opts ...option.RequestOption) (res *OpenAIDeploymentCompleteResponse, err error)
- func (r *OpenAIDeploymentService) Embed(ctx context.Context, model string, body OpenAIDeploymentEmbedParams, ...) (res *OpenAIDeploymentEmbedResponse, err error)
- type OpenAIGetResponse
- type OpenAINewResponse
- type OpenAIPatchResponse
- type OpenAIService
- func (r *OpenAIService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *OpenAIDeleteResponse, err error)
- func (r *OpenAIService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *OpenAIGetResponse, err error)
- func (r *OpenAIService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *OpenAINewResponse, err error)
- func (r *OpenAIService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *OpenAIPatchResponse, err error)
- func (r *OpenAIService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *OpenAIUpdateResponse, err error)
- type OpenAIUpdateResponse
- type OrgMemberParam
- type OrgMemberRole
- type OrganizationAddMemberParams
- type OrganizationAddMemberParamsMemberArray
- type OrganizationAddMemberParamsMemberUnion
- type OrganizationAddMemberResponse
- type OrganizationAddMemberResponseUpdatedUser
- type OrganizationAddMemberResponseUpdatedUsersObjectPermission
- type OrganizationDeleteMemberParams
- type OrganizationDeleteMemberResponse
- type OrganizationDeleteParams
- type OrganizationInfoDeprecatedParams
- type OrganizationInfoDeprecatedResponse
- type OrganizationInfoGetParams
- type OrganizationInfoService
- func (r *OrganizationInfoService) Deprecated(ctx context.Context, body OrganizationInfoDeprecatedParams, ...) (res *OrganizationInfoDeprecatedResponse, err error)
- func (r *OrganizationInfoService) Get(ctx context.Context, query OrganizationInfoGetParams, ...) (res *OrganizationTableWithMembers, err error)
- type OrganizationListParams
- type OrganizationMembershipTable
- type OrganizationNewParams
- type OrganizationNewParamsObjectPermission
- type OrganizationNewResponse
- type OrganizationNewResponseObjectPermission
- type OrganizationNewResponseUser
- type OrganizationNewResponseUsersObjectPermission
- type OrganizationService
- func (r *OrganizationService) AddMember(ctx context.Context, body OrganizationAddMemberParams, ...) (res *OrganizationAddMemberResponse, err error)
- func (r *OrganizationService) Delete(ctx context.Context, body OrganizationDeleteParams, ...) (res *[]OrganizationTableWithMembers, err error)
- func (r *OrganizationService) DeleteMember(ctx context.Context, body OrganizationDeleteMemberParams, ...) (res *OrganizationDeleteMemberResponse, err error)
- func (r *OrganizationService) List(ctx context.Context, query OrganizationListParams, ...) (res *[]OrganizationTableWithMembers, err error)
- func (r *OrganizationService) New(ctx context.Context, body OrganizationNewParams, opts ...option.RequestOption) (res *OrganizationNewResponse, err error)
- func (r *OrganizationService) Update(ctx context.Context, opts ...option.RequestOption) (res *OrganizationTableWithMembers, err error)
- func (r *OrganizationService) UpdateMember(ctx context.Context, body OrganizationUpdateMemberParams, ...) (res *OrganizationMembershipTable, err error)
- type OrganizationTableWithMembers
- type OrganizationTableWithMembersObjectPermission
- type OrganizationTableWithMembersTeam
- type OrganizationTableWithMembersTeamsObjectPermission
- type OrganizationTableWithMembersUser
- type OrganizationTableWithMembersUsersObjectPermission
- type OrganizationUpdateMemberParams
- type PassThroughEndpointResponse
- type PassThroughGenericEndpoint
- type PassThroughGenericEndpointGuardrail
- type PassThroughGenericEndpointGuardrailParam
- type PassThroughGenericEndpointParam
- type ProviderListBudgetsResponse
- type ProviderListBudgetsResponseProvider
- type ProviderService
- type RegenerateKeyRequestAllowedVectorStoreIndexParam
- type RegenerateKeyRequestAllowedVectorStoreIndexesIndexPermission
- type RegenerateKeyRequestKeyType
- type RegenerateKeyRequestObjectPermissionParam
- type RegenerateKeyRequestParam
- type RegenerateKeyRequestRouterSettingsModelGroupAliasMapParam
- type RegenerateKeyRequestRouterSettingsModelGroupAliasUnionParam
- type RegenerateKeyRequestRouterSettingsParam
- type RegenerateKeyRequestRpmLimitType
- type RegenerateKeyRequestTpmLimitType
- type RerankNewResponse
- type RerankNewV1Response
- type RerankNewV2Response
- type RerankService
- func (r *RerankService) New(ctx context.Context, opts ...option.RequestOption) (res *RerankNewResponse, err error)
- func (r *RerankService) NewV1(ctx context.Context, opts ...option.RequestOption) (res *RerankNewV1Response, err error)
- func (r *RerankService) NewV2(ctx context.Context, opts ...option.RequestOption) (res *RerankNewV2Response, err error)
- type ResponseDeleteResponse
- type ResponseGetResponse
- type ResponseInputItemListResponse
- type ResponseInputItemService
- type ResponseNewResponse
- type ResponseService
- func (r *ResponseService) Delete(ctx context.Context, responseID string, opts ...option.RequestOption) (res *ResponseDeleteResponse, err error)
- func (r *ResponseService) Get(ctx context.Context, responseID string, opts ...option.RequestOption) (res *ResponseGetResponse, err error)
- func (r *ResponseService) New(ctx context.Context, opts ...option.RequestOption) (res *ResponseNewResponse, err error)
- type RouteListResponse
- type RouteService
- type SettingGetResponse
- type SettingService
- type SpendCalculateSpendParams
- type SpendCalculateSpendResponse
- type SpendListLogsParams
- type SpendListLogsResponse
- type SpendListLogsResponseEndTimeUnion
- type SpendListLogsResponseMessagesArray
- type SpendListLogsResponseMessagesMap
- type SpendListLogsResponseMessagesUnion
- type SpendListLogsResponseResponseArray
- type SpendListLogsResponseResponseMap
- type SpendListLogsResponseResponseUnion
- type SpendListLogsResponseStartTimeUnion
- type SpendListTagsParams
- type SpendListTagsResponse
- type SpendListTagsResponseEndTimeUnion
- type SpendListTagsResponseMessagesArray
- type SpendListTagsResponseMessagesMap
- type SpendListTagsResponseMessagesUnion
- type SpendListTagsResponseResponseArray
- type SpendListTagsResponseResponseMap
- type SpendListTagsResponseResponseUnion
- type SpendListTagsResponseStartTimeUnion
- type SpendService
- func (r *SpendService) CalculateSpend(ctx context.Context, body SpendCalculateSpendParams, ...) (res *SpendCalculateSpendResponse, err error)
- func (r *SpendService) ListLogs(ctx context.Context, query SpendListLogsParams, opts ...option.RequestOption) (res *[]SpendListLogsResponse, err error)
- func (r *SpendService) ListTags(ctx context.Context, query SpendListTagsParams, opts ...option.RequestOption) (res *[]SpendListTagsResponse, err error)
- type TeamAddMemberParams
- type TeamAddMemberParamsMemberArray
- type TeamAddMemberParamsMemberUnion
- type TeamAddMemberResponse
- type TeamAddMemberResponseLitellmModelTable
- type TeamAddMemberResponseLitellmModelTableModelAliasesMap
- type TeamAddMemberResponseLitellmModelTableModelAliasesUnion
- type TeamAddMemberResponseObjectPermission
- type TeamAddMemberResponseUpdatedTeamMembership
- type TeamAddMemberResponseUpdatedUser
- type TeamAddMemberResponseUpdatedUsersObjectPermission
- type TeamBlockParams
- type TeamBlockResponse
- type TeamCallbackAddParams
- type TeamCallbackAddParamsCallbackType
- type TeamCallbackAddResponse
- type TeamCallbackGetResponse
- type TeamCallbackService
- type TeamDeleteParams
- type TeamDeleteResponse
- type TeamDisableLoggingResponse
- type TeamGetInfoParams
- type TeamGetInfoResponse
- type TeamListAvailableParams
- type TeamListAvailableResponse
- type TeamListParams
- type TeamListResponse
- type TeamModelAddParams
- type TeamModelAddResponse
- type TeamModelRemoveParams
- type TeamModelRemoveResponse
- type TeamModelService
- func (r *TeamModelService) Add(ctx context.Context, body TeamModelAddParams, opts ...option.RequestOption) (res *TeamModelAddResponse, err error)
- func (r *TeamModelService) Remove(ctx context.Context, body TeamModelRemoveParams, opts ...option.RequestOption) (res *TeamModelRemoveResponse, err error)
- type TeamNewParams
- type TeamNewParamsAllowedVectorStoreIndex
- type TeamNewParamsAllowedVectorStoreIndexesIndexPermission
- type TeamNewParamsObjectPermission
- type TeamNewParamsRpmLimitType
- type TeamNewParamsTpmLimitType
- type TeamNewResponse
- type TeamNewResponseObjectPermission
- type TeamRemoveMemberParams
- type TeamRemoveMemberResponse
- type TeamService
- func (r *TeamService) AddMember(ctx context.Context, body TeamAddMemberParams, opts ...option.RequestOption) (res *TeamAddMemberResponse, err error)
- func (r *TeamService) Block(ctx context.Context, body TeamBlockParams, opts ...option.RequestOption) (res *TeamBlockResponse, err error)
- func (r *TeamService) Delete(ctx context.Context, params TeamDeleteParams, opts ...option.RequestOption) (res *TeamDeleteResponse, err error)
- func (r *TeamService) DisableLogging(ctx context.Context, teamID string, opts ...option.RequestOption) (res *TeamDisableLoggingResponse, err error)
- func (r *TeamService) GetInfo(ctx context.Context, query TeamGetInfoParams, opts ...option.RequestOption) (res *TeamGetInfoResponse, err error)
- func (r *TeamService) List(ctx context.Context, query TeamListParams, opts ...option.RequestOption) (res *TeamListResponse, err error)
- func (r *TeamService) ListAvailable(ctx context.Context, query TeamListAvailableParams, ...) (res *TeamListAvailableResponse, err error)
- func (r *TeamService) New(ctx context.Context, params TeamNewParams, opts ...option.RequestOption) (res *TeamNewResponse, err error)
- func (r *TeamService) RemoveMember(ctx context.Context, body TeamRemoveMemberParams, opts ...option.RequestOption) (res *TeamRemoveMemberResponse, err error)
- func (r *TeamService) Unblock(ctx context.Context, body TeamUnblockParams, opts ...option.RequestOption) (res *TeamUnblockResponse, err error)
- func (r *TeamService) Update(ctx context.Context, params TeamUpdateParams, opts ...option.RequestOption) (res *TeamUpdateResponse, err error)
- func (r *TeamService) UpdateMember(ctx context.Context, body TeamUpdateMemberParams, opts ...option.RequestOption) (res *TeamUpdateMemberResponse, err error)
- type TeamUnblockParams
- type TeamUnblockResponse
- type TeamUpdateMemberParams
- type TeamUpdateMemberParamsRole
- type TeamUpdateMemberResponse
- type TeamUpdateParams
- type TeamUpdateParamsAllowedVectorStoreIndex
- type TeamUpdateParamsAllowedVectorStoreIndexesIndexPermission
- type TeamUpdateParamsObjectPermission
- type TeamUpdateResponse
- type TestPingResponse
- type TestService
- type ThreadGetResponse
- type ThreadMessageListResponse
- type ThreadMessageNewResponse
- type ThreadMessageService
- type ThreadNewResponse
- type ThreadRunNewResponse
- type ThreadRunService
- type ThreadService
- type UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsConfigurableClientsideParamsCustomAuthInputParam
- func (r UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsConfigurableClientsideParamsCustomAuthInputParam) ImplementsUpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsUnionParam()
- func (r UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsConfigurableClientsideParamsCustomAuthInputParam) MarshalJSON() (data []byte, err error)
- type UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsUnionParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsContentParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsContentTopLogprobParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationsType
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationsURLCitationParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAudioParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageFunctionCallParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImageParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImagesImageURLParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImagesType
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRole
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlockParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMapParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnionParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockType
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMapParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnionParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockType
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksType
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksUnionParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesStreamingChoicesParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesUnionParam
- type UpdateDeploymentLitellmParamsMockResponseModelResponseParam
- type UpdateDeploymentLitellmParamsMockResponseUnionParam
- type UpdateDeploymentLitellmParamsParam
- type UpdateDeploymentLitellmParamsStreamTimeoutUnionParam
- type UpdateDeploymentLitellmParamsTimeoutUnionParam
- type UpdateDeploymentLitellmParamsVertexCredentialsMapParam
- type UpdateDeploymentLitellmParamsVertexCredentialsUnionParam
- type UpdateDeploymentParam
- type UserDeleteParams
- type UserDeleteResponse
- type UserGetInfoParams
- type UserGetInfoResponse
- type UserNewParams
- type UserNewParamsObjectPermission
- type UserNewParamsTeamsArray
- type UserNewParamsTeamsUnion
- type UserNewParamsUserRole
- type UserNewResponse
- type UserNewResponseAllowedVectorStoreIndex
- type UserNewResponseAllowedVectorStoreIndexesIndexPermission
- type UserNewResponseObjectPermission
- type UserNewResponseRouterSettings
- type UserNewResponseRouterSettingsModelGroupAliasMap
- type UserNewResponseRouterSettingsModelGroupAliasUnion
- type UserNewResponseRpmLimitType
- type UserNewResponseTpmLimitType
- type UserNewResponseUserRole
- type UserRoles
- type UserService
- func (r *UserService) Delete(ctx context.Context, params UserDeleteParams, opts ...option.RequestOption) (res *UserDeleteResponse, err error)
- func (r *UserService) GetInfo(ctx context.Context, query UserGetInfoParams, opts ...option.RequestOption) (res *UserGetInfoResponse, err error)
- func (r *UserService) New(ctx context.Context, body UserNewParams, opts ...option.RequestOption) (res *UserNewResponse, err error)
- func (r *UserService) Update(ctx context.Context, body UserUpdateParams, opts ...option.RequestOption) (res *UserUpdateResponse, err error)
- type UserUpdateParams
- type UserUpdateParamsObjectPermission
- type UserUpdateParamsUserRole
- type UserUpdateResponse
- type UtilGetSupportedOpenAIParamsParams
- type UtilGetSupportedOpenAIParamsResponse
- type UtilService
- func (r *UtilService) GetSupportedOpenAIParams(ctx context.Context, query UtilGetSupportedOpenAIParamsParams, ...) (res *UtilGetSupportedOpenAIParamsResponse, err error)
- func (r *UtilService) TokenCounter(ctx context.Context, params UtilTokenCounterParams, ...) (res *UtilTokenCounterResponse, err error)
- func (r *UtilService) TransformRequest(ctx context.Context, body UtilTransformRequestParams, ...) (res *UtilTransformRequestResponse, err error)
- type UtilTokenCounterParams
- type UtilTokenCounterResponse
- type UtilTransformRequestParams
- type UtilTransformRequestParamsCallType
- type UtilTransformRequestResponse
- type VertexAIDeleteResponse
- type VertexAIGetResponse
- type VertexAINewResponse
- type VertexAIPatchResponse
- type VertexAIService
- func (r *VertexAIService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *VertexAIDeleteResponse, err error)
- func (r *VertexAIService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *VertexAIGetResponse, err error)
- func (r *VertexAIService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *VertexAINewResponse, err error)
- func (r *VertexAIService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *VertexAIPatchResponse, err error)
- func (r *VertexAIService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *VertexAIUpdateResponse, err error)
- type VertexAIUpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (HANZO_API_KEY, HANZO_BASE_URL). This should be used to initialize new clients.
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type ActiveListCallbacksResponse ¶
type ActiveListCallbacksResponse = interface{}
type ActiveService ¶
type ActiveService struct {
Options []option.RequestOption
}
ActiveService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewActiveService method instead.
func NewActiveService ¶
func NewActiveService(opts ...option.RequestOption) (r *ActiveService)
NewActiveService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ActiveService) ListCallbacks ¶
func (r *ActiveService) ListCallbacks(ctx context.Context, opts ...option.RequestOption) (res *ActiveListCallbacksResponse, err error)
Returns a list of litellm level settings
This is useful for debugging and ensuring the proxy server is configured correctly.
Response schema:
```
{
"alerting": _alerting,
"litellm.callbacks": litellm_callbacks,
"litellm.input_callback": litellm_input_callbacks,
"litellm.failure_callback": litellm_failure_callbacks,
"litellm.success_callback": litellm_success_callbacks,
"litellm._async_success_callback": litellm_async_success_callbacks,
"litellm._async_failure_callback": litellm_async_failure_callbacks,
"litellm._async_input_callback": litellm_async_input_callbacks,
"all_litellm_callbacks": all_litellm_callbacks,
"num_callbacks": len(all_litellm_callbacks),
"num_alerting": _num_alerting,
"litellm.request_timeout": litellm.request_timeout,
}
```
type AddAddAllowedIPParams ¶
type AddAddAllowedIPParams struct {
IPAddress IPAddressParam `json:"ip_address,required"`
}
func (AddAddAllowedIPParams) MarshalJSON ¶
func (r AddAddAllowedIPParams) MarshalJSON() (data []byte, err error)
type AddAddAllowedIPResponse ¶
type AddAddAllowedIPResponse = interface{}
type AddService ¶
type AddService struct {
Options []option.RequestOption
}
AddService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAddService method instead.
func NewAddService ¶
func NewAddService(opts ...option.RequestOption) (r *AddService)
NewAddService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AddService) AddAllowedIP ¶
func (r *AddService) AddAllowedIP(ctx context.Context, body AddAddAllowedIPParams, opts ...option.RequestOption) (res *AddAddAllowedIPResponse, err error)
Add Allowed Ip
type AnthropicDeleteResponse ¶
type AnthropicDeleteResponse = interface{}
type AnthropicGetResponse ¶
type AnthropicGetResponse = interface{}
type AnthropicModifyResponse ¶
type AnthropicModifyResponse = interface{}
type AnthropicNewResponse ¶
type AnthropicNewResponse = interface{}
type AnthropicService ¶
type AnthropicService struct {
Options []option.RequestOption
}
AnthropicService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAnthropicService method instead.
func NewAnthropicService ¶
func NewAnthropicService(opts ...option.RequestOption) (r *AnthropicService)
NewAnthropicService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AnthropicService) Delete ¶
func (r *AnthropicService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AnthropicDeleteResponse, err error)
[Docs](https://docs.litellm.ai/docs/pass_through/anthropic_completion)
func (*AnthropicService) Get ¶
func (r *AnthropicService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AnthropicGetResponse, err error)
[Docs](https://docs.litellm.ai/docs/pass_through/anthropic_completion)
func (*AnthropicService) Modify ¶
func (r *AnthropicService) Modify(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AnthropicModifyResponse, err error)
[Docs](https://docs.litellm.ai/docs/pass_through/anthropic_completion)
func (*AnthropicService) New ¶
func (r *AnthropicService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AnthropicNewResponse, err error)
[Docs](https://docs.litellm.ai/docs/pass_through/anthropic_completion)
func (*AnthropicService) Update ¶
func (r *AnthropicService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AnthropicUpdateResponse, err error)
[Docs](https://docs.litellm.ai/docs/pass_through/anthropic_completion)
type AnthropicUpdateResponse ¶
type AnthropicUpdateResponse = interface{}
type AssemblyaiDeleteResponse ¶
type AssemblyaiDeleteResponse = interface{}
type AssemblyaiGetResponse ¶
type AssemblyaiGetResponse = interface{}
type AssemblyaiNewResponse ¶
type AssemblyaiNewResponse = interface{}
type AssemblyaiPatchResponse ¶
type AssemblyaiPatchResponse = interface{}
type AssemblyaiService ¶
type AssemblyaiService struct {
Options []option.RequestOption
}
AssemblyaiService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssemblyaiService method instead.
func NewAssemblyaiService ¶
func NewAssemblyaiService(opts ...option.RequestOption) (r *AssemblyaiService)
NewAssemblyaiService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AssemblyaiService) Delete ¶
func (r *AssemblyaiService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AssemblyaiDeleteResponse, err error)
Assemblyai Proxy Route
func (*AssemblyaiService) Get ¶
func (r *AssemblyaiService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AssemblyaiGetResponse, err error)
Assemblyai Proxy Route
func (*AssemblyaiService) New ¶
func (r *AssemblyaiService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AssemblyaiNewResponse, err error)
Assemblyai Proxy Route
func (*AssemblyaiService) Patch ¶
func (r *AssemblyaiService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AssemblyaiPatchResponse, err error)
Assemblyai Proxy Route
func (*AssemblyaiService) Update ¶
func (r *AssemblyaiService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AssemblyaiUpdateResponse, err error)
Assemblyai Proxy Route
type AssemblyaiUpdateResponse ¶
type AssemblyaiUpdateResponse = interface{}
type AssistantDeleteResponse ¶
type AssistantDeleteResponse = interface{}
type AssistantListResponse ¶
type AssistantListResponse = interface{}
type AssistantNewResponse ¶
type AssistantNewResponse = interface{}
type AssistantService ¶
type AssistantService struct {
Options []option.RequestOption
}
AssistantService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssistantService method instead.
func NewAssistantService ¶
func NewAssistantService(opts ...option.RequestOption) (r *AssistantService)
NewAssistantService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AssistantService) Delete ¶
func (r *AssistantService) Delete(ctx context.Context, assistantID string, opts ...option.RequestOption) (res *AssistantDeleteResponse, err error)
Delete assistant
API Reference docs - https://platform.openai.com/docs/api-reference/assistants/createAssistant
func (*AssistantService) List ¶
func (r *AssistantService) List(ctx context.Context, opts ...option.RequestOption) (res *AssistantListResponse, err error)
Returns a list of assistants.
API Reference docs - https://platform.openai.com/docs/api-reference/assistants/listAssistants
func (*AssistantService) New ¶
func (r *AssistantService) New(ctx context.Context, opts ...option.RequestOption) (res *AssistantNewResponse, err error)
Create assistant
API Reference docs - https://platform.openai.com/docs/api-reference/assistants/createAssistant
type AudioService ¶
type AudioService struct {
Options []option.RequestOption
Speech *AudioSpeechService
Transcriptions *AudioTranscriptionService
}
AudioService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAudioService method instead.
func NewAudioService ¶
func NewAudioService(opts ...option.RequestOption) (r *AudioService)
NewAudioService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type AudioSpeechNewResponse ¶
type AudioSpeechNewResponse = interface{}
type AudioSpeechService ¶
type AudioSpeechService struct {
Options []option.RequestOption
}
AudioSpeechService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAudioSpeechService method instead.
func NewAudioSpeechService ¶
func NewAudioSpeechService(opts ...option.RequestOption) (r *AudioSpeechService)
NewAudioSpeechService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AudioSpeechService) New ¶
func (r *AudioSpeechService) New(ctx context.Context, opts ...option.RequestOption) (res *AudioSpeechNewResponse, err error)
Same params as:
https://platform.openai.com/docs/api-reference/audio/createSpeech
type AudioTranscriptionNewParams ¶
type AudioTranscriptionNewParams struct {
File param.Field[io.Reader] `json:"file,required" format:"binary"`
}
func (AudioTranscriptionNewParams) MarshalMultipart ¶
func (r AudioTranscriptionNewParams) MarshalMultipart() (data []byte, contentType string, err error)
type AudioTranscriptionNewResponse ¶
type AudioTranscriptionNewResponse = interface{}
type AudioTranscriptionService ¶
type AudioTranscriptionService struct {
Options []option.RequestOption
}
AudioTranscriptionService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAudioTranscriptionService method instead.
func NewAudioTranscriptionService ¶
func NewAudioTranscriptionService(opts ...option.RequestOption) (r *AudioTranscriptionService)
NewAudioTranscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AudioTranscriptionService) New ¶
func (r *AudioTranscriptionService) New(ctx context.Context, body AudioTranscriptionNewParams, opts ...option.RequestOption) (res *AudioTranscriptionNewResponse, err error)
Same params as:
https://platform.openai.com/docs/api-reference/audio/createTranscription?lang=curl
type AzureCallResponse ¶
type AzureCallResponse = interface{}
type AzureDeleteResponse ¶
type AzureDeleteResponse = interface{}
type AzureNewResponse ¶
type AzureNewResponse = interface{}
type AzurePatchResponse ¶
type AzurePatchResponse = interface{}
type AzureService ¶
type AzureService struct {
Options []option.RequestOption
}
AzureService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAzureService method instead.
func NewAzureService ¶
func NewAzureService(opts ...option.RequestOption) (r *AzureService)
NewAzureService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AzureService) Call ¶
func (r *AzureService) Call(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AzureCallResponse, err error)
Call any azure endpoint using the proxy.
Just use `{PROXY_BASE_URL}/azure/{endpoint:path}`
Checks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.
func (*AzureService) Delete ¶
func (r *AzureService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AzureDeleteResponse, err error)
Call any azure endpoint using the proxy.
Just use `{PROXY_BASE_URL}/azure/{endpoint:path}`
Checks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.
func (*AzureService) New ¶
func (r *AzureService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AzureNewResponse, err error)
Call any azure endpoint using the proxy.
Just use `{PROXY_BASE_URL}/azure/{endpoint:path}`
Checks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.
func (*AzureService) Patch ¶
func (r *AzureService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AzurePatchResponse, err error)
Call any azure endpoint using the proxy.
Just use `{PROXY_BASE_URL}/azure/{endpoint:path}`
Checks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.
func (*AzureService) Update ¶
func (r *AzureService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *AzureUpdateResponse, err error)
Call any azure endpoint using the proxy.
Just use `{PROXY_BASE_URL}/azure/{endpoint:path}`
Checks if the deployment id in the url is a litellm model name. If so, it will route using the llm_router.allm_passthrough_route.
type AzureUpdateResponse ¶
type AzureUpdateResponse = interface{}
type BatchCancelCancelParams ¶
func (BatchCancelCancelParams) URLQuery ¶
func (r BatchCancelCancelParams) URLQuery() (v url.Values)
URLQuery serializes BatchCancelCancelParams's query parameters as `url.Values`.
type BatchCancelCancelResponse ¶
type BatchCancelCancelResponse = interface{}
type BatchCancelService ¶
type BatchCancelService struct {
Options []option.RequestOption
}
BatchCancelService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBatchCancelService method instead.
func NewBatchCancelService ¶
func NewBatchCancelService(opts ...option.RequestOption) (r *BatchCancelService)
NewBatchCancelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BatchCancelService) Cancel ¶
func (r *BatchCancelService) Cancel(ctx context.Context, batchID string, body BatchCancelCancelParams, opts ...option.RequestOption) (res *BatchCancelCancelResponse, err error)
Cancel a batch. This is the equivalent of POST https://api.openai.com/v1/batches/{batch_id}/cancel
Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/cancel
Example Curl ¶
``` curl http://localhost:4000/v1/batches/batch_abc123/cancel -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -X POST
```
type BatchCancelWithProviderResponse ¶
type BatchCancelWithProviderResponse = interface{}
type BatchGetParams ¶
func (BatchGetParams) URLQuery ¶
func (r BatchGetParams) URLQuery() (v url.Values)
URLQuery serializes BatchGetParams's query parameters as `url.Values`.
type BatchGetResponse ¶
type BatchGetResponse = interface{}
type BatchGetWithProviderResponse ¶
type BatchGetWithProviderResponse = interface{}
type BatchListParams ¶
type BatchListParams struct {
After param.Field[string] `query:"after"`
Limit param.Field[int64] `query:"limit"`
Provider param.Field[string] `query:"provider"`
TargetModelNames param.Field[string] `query:"target_model_names"`
}
func (BatchListParams) URLQuery ¶
func (r BatchListParams) URLQuery() (v url.Values)
URLQuery serializes BatchListParams's query parameters as `url.Values`.
type BatchListResponse ¶
type BatchListResponse = interface{}
type BatchListWithProviderParams ¶
type BatchListWithProviderParams struct {
After param.Field[string] `query:"after"`
Limit param.Field[int64] `query:"limit"`
TargetModelNames param.Field[string] `query:"target_model_names"`
}
func (BatchListWithProviderParams) URLQuery ¶
func (r BatchListWithProviderParams) URLQuery() (v url.Values)
URLQuery serializes BatchListWithProviderParams's query parameters as `url.Values`.
type BatchListWithProviderResponse ¶
type BatchListWithProviderResponse = interface{}
type BatchNewParams ¶
func (BatchNewParams) URLQuery ¶
func (r BatchNewParams) URLQuery() (v url.Values)
URLQuery serializes BatchNewParams's query parameters as `url.Values`.
type BatchNewResponse ¶
type BatchNewResponse = interface{}
type BatchNewWithProviderResponse ¶
type BatchNewWithProviderResponse = interface{}
type BatchService ¶
type BatchService struct {
Options []option.RequestOption
Cancel *BatchCancelService
}
BatchService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBatchService method instead.
func NewBatchService ¶
func NewBatchService(opts ...option.RequestOption) (r *BatchService)
NewBatchService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BatchService) CancelWithProvider ¶
func (r *BatchService) CancelWithProvider(ctx context.Context, provider string, batchID string, opts ...option.RequestOption) (res *BatchCancelWithProviderResponse, err error)
Cancel a batch. This is the equivalent of POST https://api.openai.com/v1/batches/{batch_id}/cancel
Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/cancel
Example Curl ¶
``` curl http://localhost:4000/v1/batches/batch_abc123/cancel -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -X POST
```
func (*BatchService) Get ¶
func (r *BatchService) Get(ctx context.Context, batchID string, query BatchGetParams, opts ...option.RequestOption) (res *BatchGetResponse, err error)
Retrieves a batch. This is the equivalent of GET https://api.openai.com/v1/batches/{batch_id} Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/retrieve
Example Curl ¶
``` curl http://localhost:4000/v1/batches/batch_abc123 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" ```
func (*BatchService) GetWithProvider ¶
func (r *BatchService) GetWithProvider(ctx context.Context, provider string, batchID string, opts ...option.RequestOption) (res *BatchGetWithProviderResponse, err error)
Retrieves a batch. This is the equivalent of GET https://api.openai.com/v1/batches/{batch_id} Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/retrieve
Example Curl ¶
``` curl http://localhost:4000/v1/batches/batch_abc123 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" ```
func (*BatchService) List ¶
func (r *BatchService) List(ctx context.Context, query BatchListParams, opts ...option.RequestOption) (res *BatchListResponse, err error)
Lists This is the equivalent of GET https://api.openai.com/v1/batches/ Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/list
Example Curl ¶
``` curl http://localhost:4000/v1/batches?limit=2 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" ```
func (*BatchService) ListWithProvider ¶
func (r *BatchService) ListWithProvider(ctx context.Context, provider string, query BatchListWithProviderParams, opts ...option.RequestOption) (res *BatchListWithProviderResponse, err error)
Lists This is the equivalent of GET https://api.openai.com/v1/batches/ Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch/list
Example Curl ¶
``` curl http://localhost:4000/v1/batches?limit=2 -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" ```
func (*BatchService) New ¶
func (r *BatchService) New(ctx context.Context, body BatchNewParams, opts ...option.RequestOption) (res *BatchNewResponse, err error)
Create large batches of API requests for asynchronous processing. This is the equivalent of POST https://api.openai.com/v1/batch Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch
Example Curl ¶
```
curl http://localhost:4000/v1/batches -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{
"input_file_id": "file-abc123",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}'
```
func (*BatchService) NewWithProvider ¶
func (r *BatchService) NewWithProvider(ctx context.Context, provider string, opts ...option.RequestOption) (res *BatchNewWithProviderResponse, err error)
Create large batches of API requests for asynchronous processing. This is the equivalent of POST https://api.openai.com/v1/batch Supports Identical Params as: https://platform.openai.com/docs/api-reference/batch
Example Curl ¶
```
curl http://localhost:4000/v1/batches -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{
"input_file_id": "file-abc123",
"endpoint": "/v1/chat/completions",
"completion_window": "24h"
}'
```
type BedrockDeleteResponse ¶
type BedrockDeleteResponse = interface{}
type BedrockGetResponse ¶
type BedrockGetResponse = interface{}
type BedrockNewResponse ¶
type BedrockNewResponse = interface{}
type BedrockPatchResponse ¶
type BedrockPatchResponse = interface{}
type BedrockService ¶
type BedrockService struct {
Options []option.RequestOption
}
BedrockService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBedrockService method instead.
func NewBedrockService ¶
func NewBedrockService(opts ...option.RequestOption) (r *BedrockService)
NewBedrockService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BedrockService) Delete ¶
func (r *BedrockService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *BedrockDeleteResponse, err error)
This is the v1 passthrough for Bedrock. V2 is handled by the `/bedrock/v2` endpoint. [Docs](https://docs.litellm.ai/docs/pass_through/bedrock)
func (*BedrockService) Get ¶
func (r *BedrockService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *BedrockGetResponse, err error)
This is the v1 passthrough for Bedrock. V2 is handled by the `/bedrock/v2` endpoint. [Docs](https://docs.litellm.ai/docs/pass_through/bedrock)
func (*BedrockService) New ¶
func (r *BedrockService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *BedrockNewResponse, err error)
This is the v1 passthrough for Bedrock. V2 is handled by the `/bedrock/v2` endpoint. [Docs](https://docs.litellm.ai/docs/pass_through/bedrock)
func (*BedrockService) Patch ¶
func (r *BedrockService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *BedrockPatchResponse, err error)
This is the v1 passthrough for Bedrock. V2 is handled by the `/bedrock/v2` endpoint. [Docs](https://docs.litellm.ai/docs/pass_through/bedrock)
func (*BedrockService) Update ¶
func (r *BedrockService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *BedrockUpdateResponse, err error)
This is the v1 passthrough for Bedrock. V2 is handled by the `/bedrock/v2` endpoint. [Docs](https://docs.litellm.ai/docs/pass_through/bedrock)
type BedrockUpdateResponse ¶
type BedrockUpdateResponse = interface{}
type BlockKeyRequestParam ¶
func (BlockKeyRequestParam) MarshalJSON ¶
func (r BlockKeyRequestParam) MarshalJSON() (data []byte, err error)
type BlockTeamRequestParam ¶
func (BlockTeamRequestParam) MarshalJSON ¶
func (r BlockTeamRequestParam) MarshalJSON() (data []byte, err error)
type BlockUsersParam ¶
func (BlockUsersParam) MarshalJSON ¶
func (r BlockUsersParam) MarshalJSON() (data []byte, err error)
type BudgetDeleteParams ¶
func (BudgetDeleteParams) MarshalJSON ¶
func (r BudgetDeleteParams) MarshalJSON() (data []byte, err error)
type BudgetDeleteResponse ¶
type BudgetDeleteResponse = interface{}
type BudgetInfoParams ¶
func (BudgetInfoParams) MarshalJSON ¶
func (r BudgetInfoParams) MarshalJSON() (data []byte, err error)
type BudgetInfoResponse ¶
type BudgetInfoResponse = interface{}
type BudgetListResponse ¶
type BudgetListResponse = interface{}
type BudgetNewModelMaxBudgetParam ¶
type BudgetNewModelMaxBudgetParam struct {
BudgetDuration param.Field[string] `json:"budget_duration"`
MaxBudget param.Field[float64] `json:"max_budget"`
RpmLimit param.Field[int64] `json:"rpm_limit"`
TpmLimit param.Field[int64] `json:"tpm_limit"`
}
func (BudgetNewModelMaxBudgetParam) MarshalJSON ¶
func (r BudgetNewModelMaxBudgetParam) MarshalJSON() (data []byte, err error)
type BudgetNewParam ¶
type BudgetNewParam struct {
// Max duration budget should be set for (e.g. '1hr', '1d', '28d')
BudgetDuration param.Field[string] `json:"budget_duration"`
// The unique budget id.
BudgetID param.Field[string] `json:"budget_id"`
// Datetime when the budget is reset
BudgetResetAt param.Field[time.Time] `json:"budget_reset_at" format:"date-time"`
// Requests will fail if this budget (in USD) is exceeded.
MaxBudget param.Field[float64] `json:"max_budget"`
// Max concurrent requests allowed for this budget id.
MaxParallelRequests param.Field[int64] `json:"max_parallel_requests"`
// Max budget for each model (e.g. {'gpt-4o': {'max_budget': '0.0000001',
// 'budget_duration': '1d', 'tpm_limit': 1000, 'rpm_limit': 1000}})
ModelMaxBudget param.Field[map[string]BudgetNewModelMaxBudgetParam] `json:"model_max_budget"`
// Max requests per minute, allowed for this budget id.
RpmLimit param.Field[int64] `json:"rpm_limit"`
// Requests will NOT fail if this is exceeded. Will fire alerting though.
SoftBudget param.Field[float64] `json:"soft_budget"`
// Max tokens per minute, allowed for this budget id.
TpmLimit param.Field[int64] `json:"tpm_limit"`
}
func (BudgetNewParam) MarshalJSON ¶
func (r BudgetNewParam) MarshalJSON() (data []byte, err error)
type BudgetNewParams ¶
type BudgetNewParams struct {
BudgetNew BudgetNewParam `json:"budget_new,required"`
}
func (BudgetNewParams) MarshalJSON ¶
func (r BudgetNewParams) MarshalJSON() (data []byte, err error)
type BudgetNewResponse ¶
type BudgetNewResponse = interface{}
type BudgetService ¶
type BudgetService struct {
Options []option.RequestOption
}
BudgetService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBudgetService method instead.
func NewBudgetService ¶
func NewBudgetService(opts ...option.RequestOption) (r *BudgetService)
NewBudgetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*BudgetService) Delete ¶
func (r *BudgetService) Delete(ctx context.Context, body BudgetDeleteParams, opts ...option.RequestOption) (res *BudgetDeleteResponse, err error)
Delete budget
Parameters:
- id: str - The budget id to delete
func (*BudgetService) Info ¶
func (r *BudgetService) Info(ctx context.Context, body BudgetInfoParams, opts ...option.RequestOption) (res *BudgetInfoResponse, err error)
Get the budget id specific information
Parameters:
- budgets: List[str] - The list of budget ids to get information for
func (*BudgetService) List ¶
func (r *BudgetService) List(ctx context.Context, opts ...option.RequestOption) (res *BudgetListResponse, err error)
List all the created budgets in proxy db. Used on Admin UI.
func (*BudgetService) New ¶
func (r *BudgetService) New(ctx context.Context, body BudgetNewParams, opts ...option.RequestOption) (res *BudgetNewResponse, err error)
Create a new budget object. Can apply this to teams, orgs, end-users, keys.
Parameters:
- budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.)
- budget_id: Optional[str] - The id of the budget. If not provided, a new id will be generated.
- max_budget: Optional[float] - The max budget for the budget.
- soft_budget: Optional[float] - The soft budget for the budget.
- max_parallel_requests: Optional[int] - The max number of parallel requests for the budget.
- tpm_limit: Optional[int] - The tokens per minute limit for the budget.
- rpm_limit: Optional[int] - The requests per minute limit for the budget.
- model_max_budget: Optional[dict] - Specify max budget for a given model. Example: {"openai/gpt-4o-mini": {"max_budget": 100.0, "budget_duration": "1d", "tpm_limit": 100000, "rpm_limit": 100000}}
- budget_reset_at: Optional[datetime] - Datetime when the initial budget is reset. Default is now.
func (*BudgetService) Settings ¶
func (r *BudgetService) Settings(ctx context.Context, query BudgetSettingsParams, opts ...option.RequestOption) (res *BudgetSettingsResponse, err error)
Get list of configurable params + current value for a budget item + description of each field
Used on Admin UI.
Query Parameters:
- budget_id: str - The budget id to get information for
func (*BudgetService) Update ¶
func (r *BudgetService) Update(ctx context.Context, body BudgetUpdateParams, opts ...option.RequestOption) (res *BudgetUpdateResponse, err error)
Update an existing budget object.
Parameters:
- budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.)
- budget_id: Optional[str] - The id of the budget. If not provided, a new id will be generated.
- max_budget: Optional[float] - The max budget for the budget.
- soft_budget: Optional[float] - The soft budget for the budget.
- max_parallel_requests: Optional[int] - The max number of parallel requests for the budget.
- tpm_limit: Optional[int] - The tokens per minute limit for the budget.
- rpm_limit: Optional[int] - The requests per minute limit for the budget.
- model_max_budget: Optional[dict] - Specify max budget for a given model. Example: {"openai/gpt-4o-mini": {"max_budget": 100.0, "budget_duration": "1d", "tpm_limit": 100000, "rpm_limit": 100000}}
- budget_reset_at: Optional[datetime] - Update the Datetime when the budget was last reset.
type BudgetSettingsParams ¶
func (BudgetSettingsParams) URLQuery ¶
func (r BudgetSettingsParams) URLQuery() (v url.Values)
URLQuery serializes BudgetSettingsParams's query parameters as `url.Values`.
type BudgetSettingsResponse ¶
type BudgetSettingsResponse = interface{}
type BudgetTable ¶
type BudgetTable struct {
BudgetDuration string `json:"budget_duration,nullable"`
BudgetID string `json:"budget_id,nullable"`
MaxBudget float64 `json:"max_budget,nullable"`
MaxParallelRequests int64 `json:"max_parallel_requests,nullable"`
ModelMaxBudget map[string]interface{} `json:"model_max_budget,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
SoftBudget float64 `json:"soft_budget,nullable"`
TpmLimit int64 `json:"tpm_limit,nullable"`
JSON budgetTableJSON `json:"-"`
}
Represents user-controllable params for a LiteLLM_BudgetTable record
func (*BudgetTable) UnmarshalJSON ¶
func (r *BudgetTable) UnmarshalJSON(data []byte) (err error)
type BudgetUpdateParams ¶
type BudgetUpdateParams struct {
BudgetNew BudgetNewParam `json:"budget_new,required"`
}
func (BudgetUpdateParams) MarshalJSON ¶
func (r BudgetUpdateParams) MarshalJSON() (data []byte, err error)
type BudgetUpdateResponse ¶
type BudgetUpdateResponse = interface{}
type CacheDeleteResponse ¶
type CacheDeleteResponse = interface{}
type CacheFlushAllResponse ¶
type CacheFlushAllResponse = interface{}
type CachePingResponse ¶
type CachePingResponse struct {
CacheType string `json:"cache_type,required"`
Status string `json:"status,required"`
HealthCheckCacheParams map[string]interface{} `json:"health_check_cache_params,nullable"`
LitellmCacheParams string `json:"litellm_cache_params,nullable"`
PingResponse bool `json:"ping_response,nullable"`
SetCacheResponse string `json:"set_cache_response,nullable"`
JSON cachePingResponseJSON `json:"-"`
}
func (*CachePingResponse) UnmarshalJSON ¶
func (r *CachePingResponse) UnmarshalJSON(data []byte) (err error)
type CacheRediGetInfoResponse ¶
type CacheRediGetInfoResponse = interface{}
type CacheRediService ¶
type CacheRediService struct {
Options []option.RequestOption
}
CacheRediService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCacheRediService method instead.
func NewCacheRediService ¶
func NewCacheRediService(opts ...option.RequestOption) (r *CacheRediService)
NewCacheRediService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CacheRediService) GetInfo ¶
func (r *CacheRediService) GetInfo(ctx context.Context, opts ...option.RequestOption) (res *CacheRediGetInfoResponse, err error)
Endpoint for getting /redis/info
type CacheService ¶
type CacheService struct {
Options []option.RequestOption
Redis *CacheRediService
}
CacheService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCacheService method instead.
func NewCacheService ¶
func NewCacheService(opts ...option.RequestOption) (r *CacheService)
NewCacheService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CacheService) Delete ¶
func (r *CacheService) Delete(ctx context.Context, opts ...option.RequestOption) (res *CacheDeleteResponse, err error)
Endpoint for deleting a key from the cache. All responses from litellm proxy have `x-litellm-cache-key` in the headers
Parameters:
- **keys**: _Optional[List[str]]_ - A list of keys to delete from the cache. Example {"keys": ["key1", "key2"]}
```shell curl -X POST "http://0.0.0.0:4000/cache/delete" -H "Authorization: Bearer sk-1234" -d '{"keys": ["key1", "key2"]}' ```
func (*CacheService) FlushAll ¶
func (r *CacheService) FlushAll(ctx context.Context, opts ...option.RequestOption) (res *CacheFlushAllResponse, err error)
A function to flush all items from the cache. (All items will be deleted from the cache with this) Raises HTTPException if the cache is not initialized or if the cache type does not support flushing. Returns a dictionary with the status of the operation.
Usage:
``` curl -X POST http://0.0.0.0:4000/cache/flushall -H "Authorization: Bearer sk-1234" ```
func (*CacheService) Ping ¶
func (r *CacheService) Ping(ctx context.Context, opts ...option.RequestOption) (res *CachePingResponse, err error)
Endpoint for checking if cache can be pinged
type ChatCompletionNewParams ¶
type ChatCompletionNewParams struct {
Messages param.Field[[]ChatCompletionNewParamsMessageUnion] `json:"messages,required"`
Model param.Field[string] `json:"model,required"`
Caching param.Field[bool] `json:"caching"`
ContextWindowFallbackDict param.Field[map[string]string] `json:"context_window_fallback_dict"`
Fallbacks param.Field[[]string] `json:"fallbacks"`
FrequencyPenalty param.Field[float64] `json:"frequency_penalty"`
FunctionCall param.Field[ChatCompletionNewParamsFunctionCallUnion] `json:"function_call"`
Functions param.Field[[]map[string]interface{}] `json:"functions"`
Guardrails param.Field[[]string] `json:"guardrails"`
LogitBias param.Field[map[string]float64] `json:"logit_bias"`
Logprobs param.Field[bool] `json:"logprobs"`
MaxTokens param.Field[int64] `json:"max_tokens"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
N param.Field[int64] `json:"n"`
NumRetries param.Field[int64] `json:"num_retries"`
ParallelToolCalls param.Field[bool] `json:"parallel_tool_calls"`
PresencePenalty param.Field[float64] `json:"presence_penalty"`
ResponseFormat param.Field[map[string]interface{}] `json:"response_format"`
Seed param.Field[int64] `json:"seed"`
ServiceTier param.Field[string] `json:"service_tier"`
Stop param.Field[ChatCompletionNewParamsStopUnion] `json:"stop"`
Stream param.Field[bool] `json:"stream"`
StreamOptions param.Field[map[string]interface{}] `json:"stream_options"`
Temperature param.Field[float64] `json:"temperature"`
ToolChoice param.Field[ChatCompletionNewParamsToolChoiceUnion] `json:"tool_choice"`
Tools param.Field[[]map[string]interface{}] `json:"tools"`
TopLogprobs param.Field[int64] `json:"top_logprobs"`
TopP param.Field[float64] `json:"top_p"`
User param.Field[string] `json:"user"`
}
func (ChatCompletionNewParams) MarshalJSON ¶
func (r ChatCompletionNewParams) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsFunctionCallMap ¶
type ChatCompletionNewParamsFunctionCallMap map[string]interface{}
func (ChatCompletionNewParamsFunctionCallMap) ImplementsChatCompletionNewParamsFunctionCallUnion ¶
func (r ChatCompletionNewParamsFunctionCallMap) ImplementsChatCompletionNewParamsFunctionCallUnion()
type ChatCompletionNewParamsFunctionCallUnion ¶
type ChatCompletionNewParamsFunctionCallUnion interface {
ImplementsChatCompletionNewParamsFunctionCallUnion()
}
Satisfied by shared.UnionString, ChatCompletionNewParamsFunctionCallMap.
type ChatCompletionNewParamsMessage ¶
type ChatCompletionNewParamsMessage struct {
Role param.Field[ChatCompletionNewParamsMessagesRole] `json:"role,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Content param.Field[interface{}] `json:"content"`
FunctionCall param.Field[interface{}] `json:"function_call"`
Name param.Field[string] `json:"name"`
ReasoningContent param.Field[string] `json:"reasoning_content"`
ThinkingBlocks param.Field[interface{}] `json:"thinking_blocks"`
ToolCallID param.Field[string] `json:"tool_call_id"`
ToolCalls param.Field[interface{}] `json:"tool_calls"`
}
func (ChatCompletionNewParamsMessage) MarshalJSON ¶
func (r ChatCompletionNewParamsMessage) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessageUnion ¶
type ChatCompletionNewParamsMessageUnion interface {
// contains filtered or unexported methods
}
Satisfied by ChatCompletionNewParamsMessagesChatCompletionUserMessage, ChatCompletionNewParamsMessagesChatCompletionAssistantMessage, ChatCompletionNewParamsMessagesChatCompletionToolMessage, ChatCompletionNewParamsMessagesChatCompletionSystemMessage, ChatCompletionNewParamsMessagesChatCompletionFunctionMessage, ChatCompletionNewParamsMessagesChatCompletionDeveloperMessage, ChatCompletionNewParamsMessage.
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessage ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessage struct {
Role param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageRole] `json:"role,required"`
CacheControl param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageCacheControl] `json:"cache_control"`
Content param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentUnion] `json:"content"`
FunctionCall param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageFunctionCall] `json:"function_call"`
Name param.Field[string] `json:"name"`
ReasoningContent param.Field[string] `json:"reasoning_content"`
ThinkingBlocks param.Field[[]ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlockUnion] `json:"thinking_blocks"`
ToolCalls param.Field[[]ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCall] `json:"tool_calls"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessage) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessage) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageCacheControl ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageCacheControl struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageCacheControlType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageCacheControl) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageCacheControl) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageCacheControlType ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageCacheControlType string
const (
ChatCompletionNewParamsMessagesChatCompletionAssistantMessageCacheControlTypeEphemeral ChatCompletionNewParamsMessagesChatCompletionAssistantMessageCacheControlType = "ephemeral"
)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArray ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArray []ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayItemUnion
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArray) ImplementsChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentUnion ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArray) ImplementsChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentUnion()
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType] `json:"type,required"`
CacheControl param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl] `json:"cache_control"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType string
const (
ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlTypeEphemeral ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType = "ephemeral"
)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType string
const (
ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectTypeText ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType = "text"
)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType] `json:"type,required"`
CacheControl param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlUnion] `json:"cache_control"`
Signature param.Field[string] `json:"signature"`
Thinking param.Field[string] `json:"thinking"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType string
const (
ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentTypeEphemeral ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType = "ephemeral"
)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlMap ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlMap map[string]interface{}
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlUnion interface {
// contains filtered or unexported methods
}
Satisfied by ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlMap, ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent.
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType string
const (
ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockTypeThinking ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType = "thinking"
)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayItem ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayItem struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayType] `json:"type,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Signature param.Field[string] `json:"signature"`
Text param.Field[string] `json:"text"`
Thinking param.Field[string] `json:"thinking"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayItem) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayItem) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayItemUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayItemUnion interface {
// contains filtered or unexported methods
}
Satisfied by ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject, ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock, ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayItem.
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayType ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayType string
const ( ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayTypeText ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayType = "text" ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayTypeThinking ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArrayType = "thinking" )
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentUnion interface {
ImplementsChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentUnion()
}
Satisfied by shared.UnionString, ChatCompletionNewParamsMessagesChatCompletionAssistantMessageContentArray.
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageFunctionCall ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageFunctionCall struct {
Arguments param.Field[string] `json:"arguments"`
Name param.Field[string] `json:"name"`
ProviderSpecificFields param.Field[map[string]interface{}] `json:"provider_specific_fields"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageFunctionCall) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageFunctionCall) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageRole ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageRole string
const (
ChatCompletionNewParamsMessagesChatCompletionAssistantMessageRoleAssistant ChatCompletionNewParamsMessagesChatCompletionAssistantMessageRole = "assistant"
)
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageRole) IsKnown ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageRole) IsKnown() bool
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlock ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlock struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksType] `json:"type,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Data param.Field[string] `json:"data"`
Signature param.Field[string] `json:"signature"`
Thinking param.Field[string] `json:"thinking"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlock) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlock) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlockUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlockUnion interface {
// contains filtered or unexported methods
}
Satisfied by ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock, ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock, ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlock.
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType] `json:"type,required"`
CacheControl param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnion] `json:"cache_control"`
Data param.Field[string] `json:"data"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType string
const (
ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentTypeEphemeral ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType = "ephemeral"
)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMap ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMap map[string]interface{}
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnion interface {
// contains filtered or unexported methods
}
Satisfied by ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMap, ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent.
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType string
const (
ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockTypeRedactedThinking ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType = "redacted_thinking"
)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType] `json:"type,required"`
CacheControl param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnion] `json:"cache_control"`
Signature param.Field[string] `json:"signature"`
Thinking param.Field[string] `json:"thinking"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType string
const (
ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentTypeEphemeral ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType = "ephemeral"
)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMap ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMap map[string]interface{}
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnion interface {
// contains filtered or unexported methods
}
Satisfied by ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMap, ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent.
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType string
const (
ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockTypeThinking ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType = "thinking"
)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksType ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksType string
const ( ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksTypeThinking ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksType = "thinking" ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksTypeRedactedThinking ChatCompletionNewParamsMessagesChatCompletionAssistantMessageThinkingBlocksType = "redacted_thinking" )
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCall ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCall struct {
ID param.Field[string] `json:"id,required"`
Function param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsFunction] `json:"function,required"`
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCall) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCall) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsFunction ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsFunction struct {
Arguments param.Field[string] `json:"arguments"`
Name param.Field[string] `json:"name"`
ProviderSpecificFields param.Field[map[string]interface{}] `json:"provider_specific_fields"`
}
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsFunction) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsFunction) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsType ¶
type ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsType string
const (
ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsTypeFunction ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsType = "function"
)
func (ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsType) IsKnown ¶
func (r ChatCompletionNewParamsMessagesChatCompletionAssistantMessageToolCallsType) IsKnown() bool
type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessage ¶
type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessage struct {
Content param.Field[ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentUnion] `json:"content,required"`
Role param.Field[ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageRole] `json:"role,required"`
CacheControl param.Field[ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageCacheControl] `json:"cache_control"`
Name param.Field[string] `json:"name"`
}
func (ChatCompletionNewParamsMessagesChatCompletionDeveloperMessage) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionDeveloperMessage) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageCacheControl ¶
type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageCacheControl struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageCacheControlType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageCacheControl) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageCacheControl) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageCacheControlType ¶
type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageCacheControlType string
const (
ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageCacheControlTypeEphemeral ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageCacheControlType = "ephemeral"
)
type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentArray ¶
type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentArray []interface{}
func (ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentArray) ImplementsChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentUnion ¶
func (r ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentArray) ImplementsChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentUnion()
type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentUnion interface {
ImplementsChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentUnion()
}
Satisfied by shared.UnionString, ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageContentArray.
type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageRole ¶
type ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageRole string
const (
ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageRoleDeveloper ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageRole = "developer"
)
func (ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageRole) IsKnown ¶
func (r ChatCompletionNewParamsMessagesChatCompletionDeveloperMessageRole) IsKnown() bool
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessage ¶
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessage struct {
Content param.Field[ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentUnion] `json:"content,required"`
Name param.Field[string] `json:"name,required"`
Role param.Field[ChatCompletionNewParamsMessagesChatCompletionFunctionMessageRole] `json:"role,required"`
ToolCallID param.Field[string] `json:"tool_call_id,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionFunctionMessage) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionFunctionMessage) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArray ¶
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArray []ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayItem
func (ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArray) ImplementsChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentUnion ¶
func (r ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArray) ImplementsChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentUnion()
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl ¶
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType ¶
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType string
const (
ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlTypeEphemeral ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType = "ephemeral"
)
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayItem ¶
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayItem struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayType] `json:"type,required"`
CacheControl param.Field[ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl] `json:"cache_control"`
}
func (ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayItem) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayItem) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayType ¶
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayType string
const (
ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayTypeText ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayType = "text"
)
func (ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayType) IsKnown ¶
func (r ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArrayType) IsKnown() bool
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentUnion interface {
ImplementsChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentUnion()
}
Satisfied by shared.UnionString, ChatCompletionNewParamsMessagesChatCompletionFunctionMessageContentArray.
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageRole ¶
type ChatCompletionNewParamsMessagesChatCompletionFunctionMessageRole string
const (
ChatCompletionNewParamsMessagesChatCompletionFunctionMessageRoleFunction ChatCompletionNewParamsMessagesChatCompletionFunctionMessageRole = "function"
)
func (ChatCompletionNewParamsMessagesChatCompletionFunctionMessageRole) IsKnown ¶
func (r ChatCompletionNewParamsMessagesChatCompletionFunctionMessageRole) IsKnown() bool
type ChatCompletionNewParamsMessagesChatCompletionSystemMessage ¶
type ChatCompletionNewParamsMessagesChatCompletionSystemMessage struct {
Content param.Field[ChatCompletionNewParamsMessagesChatCompletionSystemMessageContentUnion] `json:"content,required"`
Role param.Field[ChatCompletionNewParamsMessagesChatCompletionSystemMessageRole] `json:"role,required"`
CacheControl param.Field[ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControl] `json:"cache_control"`
Name param.Field[string] `json:"name"`
}
func (ChatCompletionNewParamsMessagesChatCompletionSystemMessage) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionSystemMessage) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControl ¶
type ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControl struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControlType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControl) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControl) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControlType ¶
type ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControlType string
const (
ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControlTypeEphemeral ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControlType = "ephemeral"
)
func (ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControlType) IsKnown ¶
func (r ChatCompletionNewParamsMessagesChatCompletionSystemMessageCacheControlType) IsKnown() bool
type ChatCompletionNewParamsMessagesChatCompletionSystemMessageContentArray ¶
type ChatCompletionNewParamsMessagesChatCompletionSystemMessageContentArray []interface{}
func (ChatCompletionNewParamsMessagesChatCompletionSystemMessageContentArray) ImplementsChatCompletionNewParamsMessagesChatCompletionSystemMessageContentUnion ¶
func (r ChatCompletionNewParamsMessagesChatCompletionSystemMessageContentArray) ImplementsChatCompletionNewParamsMessagesChatCompletionSystemMessageContentUnion()
type ChatCompletionNewParamsMessagesChatCompletionSystemMessageContentUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionSystemMessageContentUnion interface {
ImplementsChatCompletionNewParamsMessagesChatCompletionSystemMessageContentUnion()
}
Satisfied by shared.UnionString, ChatCompletionNewParamsMessagesChatCompletionSystemMessageContentArray.
type ChatCompletionNewParamsMessagesChatCompletionSystemMessageRole ¶
type ChatCompletionNewParamsMessagesChatCompletionSystemMessageRole string
const (
ChatCompletionNewParamsMessagesChatCompletionSystemMessageRoleSystem ChatCompletionNewParamsMessagesChatCompletionSystemMessageRole = "system"
)
func (ChatCompletionNewParamsMessagesChatCompletionSystemMessageRole) IsKnown ¶
func (r ChatCompletionNewParamsMessagesChatCompletionSystemMessageRole) IsKnown() bool
type ChatCompletionNewParamsMessagesChatCompletionToolMessage ¶
type ChatCompletionNewParamsMessagesChatCompletionToolMessage struct {
Content param.Field[ChatCompletionNewParamsMessagesChatCompletionToolMessageContentUnion] `json:"content,required"`
Role param.Field[ChatCompletionNewParamsMessagesChatCompletionToolMessageRole] `json:"role,required"`
ToolCallID param.Field[string] `json:"tool_call_id,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionToolMessage) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionToolMessage) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArray ¶
type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArray []ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayItem
func (ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArray) ImplementsChatCompletionNewParamsMessagesChatCompletionToolMessageContentUnion ¶
func (r ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArray) ImplementsChatCompletionNewParamsMessagesChatCompletionToolMessageContentUnion()
type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayCacheControl ¶
type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayCacheControl struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayCacheControlType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayCacheControl) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayCacheControl) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayCacheControlType ¶
type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayCacheControlType string
const (
ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayCacheControlTypeEphemeral ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayCacheControlType = "ephemeral"
)
type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayItem ¶
type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayItem struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayType] `json:"type,required"`
CacheControl param.Field[ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayCacheControl] `json:"cache_control"`
}
func (ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayItem) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayItem) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayType ¶
type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayType string
const (
ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayTypeText ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayType = "text"
)
func (ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayType) IsKnown ¶
func (r ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArrayType) IsKnown() bool
type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionToolMessageContentUnion interface {
ImplementsChatCompletionNewParamsMessagesChatCompletionToolMessageContentUnion()
}
Satisfied by shared.UnionString, ChatCompletionNewParamsMessagesChatCompletionToolMessageContentArray.
type ChatCompletionNewParamsMessagesChatCompletionToolMessageRole ¶
type ChatCompletionNewParamsMessagesChatCompletionToolMessageRole string
const (
ChatCompletionNewParamsMessagesChatCompletionToolMessageRoleTool ChatCompletionNewParamsMessagesChatCompletionToolMessageRole = "tool"
)
func (ChatCompletionNewParamsMessagesChatCompletionToolMessageRole) IsKnown ¶
func (r ChatCompletionNewParamsMessagesChatCompletionToolMessageRole) IsKnown() bool
type ChatCompletionNewParamsMessagesChatCompletionUserMessage ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessage struct {
Content param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentUnion] `json:"content,required"`
Role param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageRole] `json:"role,required"`
CacheControl param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControl] `json:"cache_control"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessage) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessage) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControl ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControl struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControlType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControl) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControl) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControlType ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControlType string
const (
ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControlTypeEphemeral ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControlType = "ephemeral"
)
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControlType) IsKnown ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageCacheControlType) IsKnown() bool
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArray ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArray []ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayItemUnion
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArray) ImplementsChatCompletionNewParamsMessagesChatCompletionUserMessageContentUnion ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArray) ImplementsChatCompletionNewParamsMessagesChatCompletionUserMessageContentUnion()
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject struct {
InputAudio param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio] `json:"input_audio,required"`
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio struct {
Data param.Field[string] `json:"data,required"`
Format param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat] `json:"format,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat string
const ( ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormatWav ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat = "wav" ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormatMP3 ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat = "mp3" )
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType string
const (
ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectTypeInputAudio ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType = "input_audio"
)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject struct {
Citations param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations] `json:"citations,required"`
Context param.Field[string] `json:"context,required"`
Source param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource] `json:"source,required"`
Title param.Field[string] `json:"title,required"`
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations struct {
Enabled param.Field[bool] `json:"enabled,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource struct {
Data param.Field[string] `json:"data,required"`
MediaType param.Field[string] `json:"media_type,required"`
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType string
const (
ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceTypeText ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType = "text"
)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType string
const (
ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectTypeDocument ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType = "document"
)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject struct {
File param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile] `json:"file,required"`
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile struct {
FileData param.Field[string] `json:"file_data"`
FileID param.Field[string] `json:"file_id"`
Filename param.Field[string] `json:"filename"`
Format param.Field[string] `json:"format"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType string
const (
ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectTypeFile ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType = "file"
)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject struct {
ImageURL param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion] `json:"image_url,required"`
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject struct {
URL param.Field[string] `json:"url,required"`
Detail param.Field[string] `json:"detail"`
Format param.Field[string] `json:"format"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) ImplementsChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) ImplementsChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion()
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion interface {
ImplementsChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion()
}
Satisfied by shared.UnionString, ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject.
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType string
const (
ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectTypeImageURL ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType = "image_url"
)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType] `json:"type,required"`
CacheControl param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl] `json:"cache_control"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType] `json:"type,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType string
const (
ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlTypeEphemeral ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType = "ephemeral"
)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType string
const (
ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectTypeText ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType = "text"
)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType] `json:"type,required"`
VideoURL param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion] `json:"video_url,required"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType string
const (
ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectTypeVideoURL ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType = "video_url"
)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject struct {
URL param.Field[string] `json:"url,required"`
Detail param.Field[string] `json:"detail"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) ImplementsChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) ImplementsChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion()
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion interface {
ImplementsChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion()
}
Satisfied by shared.UnionString, ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject.
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayItem ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayItem struct {
Type param.Field[ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayType] `json:"type,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Citations param.Field[interface{}] `json:"citations"`
Context param.Field[string] `json:"context"`
File param.Field[interface{}] `json:"file"`
ImageURL param.Field[interface{}] `json:"image_url"`
InputAudio param.Field[interface{}] `json:"input_audio"`
Source param.Field[interface{}] `json:"source"`
Text param.Field[string] `json:"text"`
Title param.Field[string] `json:"title"`
VideoURL param.Field[interface{}] `json:"video_url"`
}
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayItem) MarshalJSON ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayItem) MarshalJSON() (data []byte, err error)
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayItemUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayItemUnion interface {
// contains filtered or unexported methods
}
Satisfied by ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject, ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject, ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject, ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject, ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject, ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject, ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayItem.
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayType ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayType string
const ( ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayTypeText ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayType = "text" ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayTypeImageURL ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayType = "image_url" ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayTypeInputAudio ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayType = "input_audio" ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayTypeDocument ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayType = "document" ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayTypeVideoURL ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayType = "video_url" ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayTypeFile ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayType = "file" )
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayType) IsKnown ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArrayType) IsKnown() bool
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentUnion ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageContentUnion interface {
ImplementsChatCompletionNewParamsMessagesChatCompletionUserMessageContentUnion()
}
Satisfied by shared.UnionString, ChatCompletionNewParamsMessagesChatCompletionUserMessageContentArray.
type ChatCompletionNewParamsMessagesChatCompletionUserMessageRole ¶
type ChatCompletionNewParamsMessagesChatCompletionUserMessageRole string
const (
ChatCompletionNewParamsMessagesChatCompletionUserMessageRoleUser ChatCompletionNewParamsMessagesChatCompletionUserMessageRole = "user"
)
func (ChatCompletionNewParamsMessagesChatCompletionUserMessageRole) IsKnown ¶
func (r ChatCompletionNewParamsMessagesChatCompletionUserMessageRole) IsKnown() bool
type ChatCompletionNewParamsMessagesRole ¶
type ChatCompletionNewParamsMessagesRole string
const ( ChatCompletionNewParamsMessagesRoleUser ChatCompletionNewParamsMessagesRole = "user" ChatCompletionNewParamsMessagesRoleAssistant ChatCompletionNewParamsMessagesRole = "assistant" ChatCompletionNewParamsMessagesRoleTool ChatCompletionNewParamsMessagesRole = "tool" ChatCompletionNewParamsMessagesRoleSystem ChatCompletionNewParamsMessagesRole = "system" ChatCompletionNewParamsMessagesRoleFunction ChatCompletionNewParamsMessagesRole = "function" ChatCompletionNewParamsMessagesRoleDeveloper ChatCompletionNewParamsMessagesRole = "developer" )
func (ChatCompletionNewParamsMessagesRole) IsKnown ¶
func (r ChatCompletionNewParamsMessagesRole) IsKnown() bool
type ChatCompletionNewParamsStopArray ¶
type ChatCompletionNewParamsStopArray []string
func (ChatCompletionNewParamsStopArray) ImplementsChatCompletionNewParamsStopUnion ¶
func (r ChatCompletionNewParamsStopArray) ImplementsChatCompletionNewParamsStopUnion()
type ChatCompletionNewParamsStopUnion ¶
type ChatCompletionNewParamsStopUnion interface {
ImplementsChatCompletionNewParamsStopUnion()
}
Satisfied by shared.UnionString, ChatCompletionNewParamsStopArray.
type ChatCompletionNewParamsToolChoiceMap ¶
type ChatCompletionNewParamsToolChoiceMap map[string]interface{}
func (ChatCompletionNewParamsToolChoiceMap) ImplementsChatCompletionNewParamsToolChoiceUnion ¶
func (r ChatCompletionNewParamsToolChoiceMap) ImplementsChatCompletionNewParamsToolChoiceUnion()
type ChatCompletionNewParamsToolChoiceUnion ¶
type ChatCompletionNewParamsToolChoiceUnion interface {
ImplementsChatCompletionNewParamsToolChoiceUnion()
}
Satisfied by shared.UnionString, ChatCompletionNewParamsToolChoiceMap.
type ChatCompletionNewResponse ¶
type ChatCompletionNewResponse = interface{}
type ChatCompletionService ¶
type ChatCompletionService struct {
Options []option.RequestOption
}
ChatCompletionService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewChatCompletionService method instead.
func NewChatCompletionService ¶
func NewChatCompletionService(opts ...option.RequestOption) (r *ChatCompletionService)
NewChatCompletionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ChatCompletionService) New ¶
func (r *ChatCompletionService) New(ctx context.Context, body ChatCompletionNewParams, opts ...option.RequestOption) (res *ChatCompletionNewResponse, err error)
Follows the exact same API spec as `OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat`
```bash curl -X POST http://localhost:4000/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234"
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}'
```
type ChatService ¶
type ChatService struct {
Options []option.RequestOption
Completions *ChatCompletionService
}
ChatService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewChatService method instead.
func NewChatService ¶
func NewChatService(opts ...option.RequestOption) (r *ChatService)
NewChatService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type Client ¶
type Client struct {
Options []option.RequestOption
Models *ModelService
OpenAI *OpenAIService
Engines *EngineService
Chat *ChatService
Completions *CompletionService
Embeddings *EmbeddingService
Images *ImageService
Audio *AudioService
Assistants *AssistantService
Threads *ThreadService
Moderations *ModerationService
Utils *UtilService
Model *ModelService
ModelGroup *ModelGroupService
Routes *RouteService
Responses *ResponseService
Batches *BatchService
Rerank *RerankService
FineTuning *FineTuningService
Credentials *CredentialService
VertexAI *VertexAIService
Gemini *GeminiService
Cohere *CohereService
Anthropic *AnthropicService
Bedrock *BedrockService
EuAssemblyai *EuAssemblyaiService
Assemblyai *AssemblyaiService
Azure *AzureService
Langfuse *LangfuseService
Config *ConfigService
Test *TestService
Health *HealthService
Active *ActiveService
Settings *SettingService
Key *KeyService
User *UserService
Team *TeamService
Organization *OrganizationService
Customer *CustomerService
Spend *SpendService
Global *GlobalService
Provider *ProviderService
Cache *CacheService
Guardrails *GuardrailService
Add *AddService
Deletes *DeleteService
Files *FileService
Budget *BudgetService
}
Client creates a struct with services and top level methods that help with interacting with the Hanzo API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (HANZO_API_KEY, HANZO_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) GetHome ¶
func (r *Client) GetHome(ctx context.Context, opts ...option.RequestOption) (res *GetHomeResponse, err error)
Home
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type CohereDeleteResponse ¶
type CohereDeleteResponse = interface{}
type CohereGetResponse ¶
type CohereGetResponse = interface{}
type CohereModifyResponse ¶
type CohereModifyResponse = interface{}
type CohereNewResponse ¶
type CohereNewResponse = interface{}
type CohereService ¶
type CohereService struct {
Options []option.RequestOption
}
CohereService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCohereService method instead.
func NewCohereService ¶
func NewCohereService(opts ...option.RequestOption) (r *CohereService)
NewCohereService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CohereService) Delete ¶
func (r *CohereService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *CohereDeleteResponse, err error)
func (*CohereService) Get ¶
func (r *CohereService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *CohereGetResponse, err error)
func (*CohereService) Modify ¶
func (r *CohereService) Modify(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *CohereModifyResponse, err error)
func (*CohereService) New ¶
func (r *CohereService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *CohereNewResponse, err error)
func (*CohereService) Update ¶
func (r *CohereService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *CohereUpdateResponse, err error)
type CohereUpdateResponse ¶
type CohereUpdateResponse = interface{}
type CompletionNewParams ¶
func (CompletionNewParams) URLQuery ¶
func (r CompletionNewParams) URLQuery() (v url.Values)
URLQuery serializes CompletionNewParams's query parameters as `url.Values`.
type CompletionNewResponse ¶
type CompletionNewResponse = interface{}
type CompletionService ¶
type CompletionService struct {
Options []option.RequestOption
}
CompletionService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCompletionService method instead.
func NewCompletionService ¶
func NewCompletionService(opts ...option.RequestOption) (r *CompletionService)
NewCompletionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CompletionService) New ¶
func (r *CompletionService) New(ctx context.Context, body CompletionNewParams, opts ...option.RequestOption) (res *CompletionNewResponse, err error)
Follows the exact same API spec as `OpenAI's Completions API https://platform.openai.com/docs/api-reference/completions`
```bash curl -X POST http://localhost:4000/v1/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234"
-d '{
"model": "gpt-3.5-turbo-instruct",
"prompt": "Once upon a time",
"max_tokens": 50,
"temperature": 0.7
}'
```
type ConfigPassThroughEndpointDeleteParams ¶
type ConfigPassThroughEndpointDeleteParams struct {
EndpointID param.Field[string] `query:"endpoint_id,required"`
}
func (ConfigPassThroughEndpointDeleteParams) URLQuery ¶
func (r ConfigPassThroughEndpointDeleteParams) URLQuery() (v url.Values)
URLQuery serializes ConfigPassThroughEndpointDeleteParams's query parameters as `url.Values`.
type ConfigPassThroughEndpointListParams ¶
type ConfigPassThroughEndpointListParams struct {
EndpointID param.Field[string] `query:"endpoint_id"`
TeamID param.Field[string] `query:"team_id"`
}
func (ConfigPassThroughEndpointListParams) URLQuery ¶
func (r ConfigPassThroughEndpointListParams) URLQuery() (v url.Values)
URLQuery serializes ConfigPassThroughEndpointListParams's query parameters as `url.Values`.
type ConfigPassThroughEndpointNewParams ¶
type ConfigPassThroughEndpointNewParams struct {
PassThroughGenericEndpoint PassThroughGenericEndpointParam `json:"pass_through_generic_endpoint,required"`
}
func (ConfigPassThroughEndpointNewParams) MarshalJSON ¶
func (r ConfigPassThroughEndpointNewParams) MarshalJSON() (data []byte, err error)
type ConfigPassThroughEndpointNewResponse ¶
type ConfigPassThroughEndpointNewResponse = interface{}
type ConfigPassThroughEndpointService ¶
type ConfigPassThroughEndpointService struct {
Options []option.RequestOption
}
ConfigPassThroughEndpointService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConfigPassThroughEndpointService method instead.
func NewConfigPassThroughEndpointService ¶
func NewConfigPassThroughEndpointService(opts ...option.RequestOption) (r *ConfigPassThroughEndpointService)
NewConfigPassThroughEndpointService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ConfigPassThroughEndpointService) Delete ¶
func (r *ConfigPassThroughEndpointService) Delete(ctx context.Context, body ConfigPassThroughEndpointDeleteParams, opts ...option.RequestOption) (res *PassThroughEndpointResponse, err error)
Delete a pass-through endpoint by ID.
Returns - the deleted endpoint
func (*ConfigPassThroughEndpointService) List ¶
func (r *ConfigPassThroughEndpointService) List(ctx context.Context, query ConfigPassThroughEndpointListParams, opts ...option.RequestOption) (res *PassThroughEndpointResponse, err error)
GET configured pass through endpoint.
If no endpoint_id given, return all configured endpoints.
func (*ConfigPassThroughEndpointService) New ¶
func (r *ConfigPassThroughEndpointService) New(ctx context.Context, body ConfigPassThroughEndpointNewParams, opts ...option.RequestOption) (res *ConfigPassThroughEndpointNewResponse, err error)
Create new pass-through endpoint
func (*ConfigPassThroughEndpointService) Update ¶
func (r *ConfigPassThroughEndpointService) Update(ctx context.Context, endpointID string, body ConfigPassThroughEndpointUpdateParams, opts ...option.RequestOption) (res *ConfigPassThroughEndpointUpdateResponse, err error)
Update a pass-through endpoint by ID.
type ConfigPassThroughEndpointUpdateParams ¶
type ConfigPassThroughEndpointUpdateParams struct {
PassThroughGenericEndpoint PassThroughGenericEndpointParam `json:"pass_through_generic_endpoint,required"`
}
func (ConfigPassThroughEndpointUpdateParams) MarshalJSON ¶
func (r ConfigPassThroughEndpointUpdateParams) MarshalJSON() (data []byte, err error)
type ConfigPassThroughEndpointUpdateResponse ¶
type ConfigPassThroughEndpointUpdateResponse = interface{}
type ConfigService ¶
type ConfigService struct {
Options []option.RequestOption
PassThroughEndpoint *ConfigPassThroughEndpointService
}
ConfigService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewConfigService method instead.
func NewConfigService ¶
func NewConfigService(opts ...option.RequestOption) (r *ConfigService)
NewConfigService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type CredentialDeleteResponse ¶
type CredentialDeleteResponse = interface{}
type CredentialListResponse ¶
type CredentialListResponse = interface{}
type CredentialNewParams ¶
type CredentialNewParams struct {
CredentialInfo param.Field[map[string]interface{}] `json:"credential_info,required"`
CredentialName param.Field[string] `json:"credential_name,required"`
CredentialValues param.Field[map[string]interface{}] `json:"credential_values"`
ModelID param.Field[string] `json:"model_id"`
}
func (CredentialNewParams) MarshalJSON ¶
func (r CredentialNewParams) MarshalJSON() (data []byte, err error)
type CredentialNewResponse ¶
type CredentialNewResponse = interface{}
type CredentialService ¶
type CredentialService struct {
Options []option.RequestOption
}
CredentialService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCredentialService method instead.
func NewCredentialService ¶
func NewCredentialService(opts ...option.RequestOption) (r *CredentialService)
NewCredentialService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CredentialService) Delete ¶
func (r *CredentialService) Delete(ctx context.Context, credentialName string, opts ...option.RequestOption) (res *CredentialDeleteResponse, err error)
[BETA] endpoint. This might change unexpectedly.
func (*CredentialService) List ¶
func (r *CredentialService) List(ctx context.Context, opts ...option.RequestOption) (res *CredentialListResponse, err error)
[BETA] endpoint. This might change unexpectedly.
func (*CredentialService) New ¶
func (r *CredentialService) New(ctx context.Context, body CredentialNewParams, opts ...option.RequestOption) (res *CredentialNewResponse, err error)
[BETA] endpoint. This might change unexpectedly. Stores credential in DB. Reloads credentials in memory.
type CustomerBlockParams ¶
type CustomerBlockParams struct {
BlockUsers BlockUsersParam `json:"block_users,required"`
}
func (CustomerBlockParams) MarshalJSON ¶
func (r CustomerBlockParams) MarshalJSON() (data []byte, err error)
type CustomerBlockResponse ¶
type CustomerBlockResponse = interface{}
type CustomerDeleteParams ¶
func (CustomerDeleteParams) MarshalJSON ¶
func (r CustomerDeleteParams) MarshalJSON() (data []byte, err error)
type CustomerDeleteResponse ¶
type CustomerDeleteResponse = interface{}
type CustomerGetInfoParams ¶
type CustomerGetInfoParams struct {
// End User ID in the request parameters
EndUserID param.Field[string] `query:"end_user_id,required"`
}
func (CustomerGetInfoParams) URLQuery ¶
func (r CustomerGetInfoParams) URLQuery() (v url.Values)
URLQuery serializes CustomerGetInfoParams's query parameters as `url.Values`.
type CustomerNewParams ¶
type CustomerNewParams struct {
UserID param.Field[string] `json:"user_id,required"`
Alias param.Field[string] `json:"alias"`
AllowedModelRegion param.Field[CustomerNewParamsAllowedModelRegion] `json:"allowed_model_region"`
Blocked param.Field[bool] `json:"blocked"`
// Max duration budget should be set for (e.g. '1hr', '1d', '28d')
BudgetDuration param.Field[string] `json:"budget_duration"`
BudgetID param.Field[string] `json:"budget_id"`
// Datetime when the budget is reset
BudgetResetAt param.Field[time.Time] `json:"budget_reset_at" format:"date-time"`
DefaultModel param.Field[string] `json:"default_model"`
// Requests will fail if this budget (in USD) is exceeded.
MaxBudget param.Field[float64] `json:"max_budget"`
// Max concurrent requests allowed for this budget id.
MaxParallelRequests param.Field[int64] `json:"max_parallel_requests"`
// Max budget for each model (e.g. {'gpt-4o': {'max_budget': '0.0000001',
// 'budget_duration': '1d', 'tpm_limit': 1000, 'rpm_limit': 1000}})
ModelMaxBudget param.Field[map[string]CustomerNewParamsModelMaxBudget] `json:"model_max_budget"`
// Max requests per minute, allowed for this budget id.
RpmLimit param.Field[int64] `json:"rpm_limit"`
// Requests will NOT fail if this is exceeded. Will fire alerting though.
SoftBudget param.Field[float64] `json:"soft_budget"`
Spend param.Field[float64] `json:"spend"`
// Max tokens per minute, allowed for this budget id.
TpmLimit param.Field[int64] `json:"tpm_limit"`
}
func (CustomerNewParams) MarshalJSON ¶
func (r CustomerNewParams) MarshalJSON() (data []byte, err error)
type CustomerNewParamsAllowedModelRegion ¶
type CustomerNewParamsAllowedModelRegion string
const ( CustomerNewParamsAllowedModelRegionEu CustomerNewParamsAllowedModelRegion = "eu" CustomerNewParamsAllowedModelRegionUs CustomerNewParamsAllowedModelRegion = "us" )
func (CustomerNewParamsAllowedModelRegion) IsKnown ¶
func (r CustomerNewParamsAllowedModelRegion) IsKnown() bool
type CustomerNewParamsModelMaxBudget ¶
type CustomerNewParamsModelMaxBudget struct {
BudgetDuration param.Field[string] `json:"budget_duration"`
MaxBudget param.Field[float64] `json:"max_budget"`
RpmLimit param.Field[int64] `json:"rpm_limit"`
TpmLimit param.Field[int64] `json:"tpm_limit"`
}
func (CustomerNewParamsModelMaxBudget) MarshalJSON ¶
func (r CustomerNewParamsModelMaxBudget) MarshalJSON() (data []byte, err error)
type CustomerNewResponse ¶
type CustomerNewResponse = interface{}
type CustomerService ¶
type CustomerService struct {
Options []option.RequestOption
}
CustomerService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerService method instead.
func NewCustomerService ¶
func NewCustomerService(opts ...option.RequestOption) (r *CustomerService)
NewCustomerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CustomerService) Block ¶
func (r *CustomerService) Block(ctx context.Context, body CustomerBlockParams, opts ...option.RequestOption) (res *CustomerBlockResponse, err error)
[BETA] Reject calls with this end-user id
Parameters:
- user_ids (List[str], required): The unique `user_id`s for the users to block
(any /chat/completion call with this user={end-user-id} param, will be
rejected.)
```
curl -X POST "http://0.0.0.0:8000/user/block"
-H "Authorization: Bearer sk-1234"
-d '{
"user_ids": [<user_id>, ...]
}'
```
func (*CustomerService) Delete ¶
func (r *CustomerService) Delete(ctx context.Context, body CustomerDeleteParams, opts ...option.RequestOption) (res *CustomerDeleteResponse, err error)
Delete multiple end-users.
Parameters:
- user_ids (List[str], required): The unique `user_id`s for the users to delete
Example curl:
```
curl --location 'http://0.0.0.0:4000/customer/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"user_ids" :["ishaan-jaff-5"]
}'
See below for all params ```
func (*CustomerService) GetInfo ¶
func (r *CustomerService) GetInfo(ctx context.Context, query CustomerGetInfoParams, opts ...option.RequestOption) (res *LiteLlmEndUserTable, err error)
Get information about an end-user. An `end_user` is a customer (external user) of the proxy.
Parameters:
- end_user_id (str, required): The unique identifier for the end-user
Example curl:
``` curl -X GET 'http://localhost:4000/customer/info?end_user_id=test-litellm-user-4' -H 'Authorization: Bearer sk-1234' ```
func (*CustomerService) List ¶
func (r *CustomerService) List(ctx context.Context, opts ...option.RequestOption) (res *[]LiteLlmEndUserTable, err error)
[Admin-only] List all available customers
Example curl:
``` curl --location --request GET 'http://0.0.0.0:4000/customer/list' --header 'Authorization: Bearer sk-1234' ```
func (*CustomerService) New ¶
func (r *CustomerService) New(ctx context.Context, body CustomerNewParams, opts ...option.RequestOption) (res *CustomerNewResponse, err error)
Allow creating a new Customer
Parameters:
- user_id: str - The unique identifier for the user.
- alias: Optional[str] - A human-friendly alias for the user.
- blocked: bool - Flag to allow or disallow requests for this end-user. Default is False.
- max_budget: Optional[float] - The maximum budget allocated to the user. Either 'max_budget' or 'budget_id' should be provided, not both.
- budget_id: Optional[str] - The identifier for an existing budget allocated to the user. Either 'max_budget' or 'budget_id' should be provided, not both.
- allowed_model_region: Optional[Union[Literal["eu"], Literal["us"]]] - Require all user requests to use models in this specific region.
- default_model: Optional[str] - If no equivalent model in the allowed region, default all requests to this model.
- metadata: Optional[dict] = Metadata for customer, store information for customer. Example metadata = {"data_training_opt_out": True}
- budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d").
- tpm_limit: Optional[int] - [Not Implemented Yet] Specify tpm limit for a given customer (Tokens per minute)
- rpm_limit: Optional[int] - [Not Implemented Yet] Specify rpm limit for a given customer (Requests per minute)
- model_max_budget: Optional[dict] - [Not Implemented Yet] Specify max budget for a given model. Example: {"openai/gpt-4o-mini": {"max_budget": 100.0, "budget_duration": "1d"}}
- max_parallel_requests: Optional[int] - [Not Implemented Yet] Specify max parallel requests for a given customer.
- soft_budget: Optional[float] - [Not Implemented Yet] Get alerts when customer crosses given budget, doesn't block requests.
- spend: Optional[float] - Specify initial spend for a given customer.
- budget_reset_at: Optional[str] - Specify the date and time when the budget should be reset.
- Allow specifying allowed regions - Allow specifying default model
Example curl:
```
curl --location 'http://0.0.0.0:4000/customer/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"user_id" : "ishaan-jaff-3",
"allowed_region": "eu",
"budget_id": "free_tier",
"default_model": "azure/gpt-3.5-turbo-eu" <- all calls from this user, use this model?
}'
# return end-user object
```
NOTE: This used to be called `/end_user/new`, we will still be maintaining compatibility for /end_user/XXX for these endpoints
func (*CustomerService) Unblock ¶
func (r *CustomerService) Unblock(ctx context.Context, body CustomerUnblockParams, opts ...option.RequestOption) (res *CustomerUnblockResponse, err error)
[BETA] Unblock calls with this user id
Example ¶
``` curl -X POST "http://0.0.0.0:8000/user/unblock" -H "Authorization: Bearer sk-1234" -d '{ "user_ids": [<user_id>, ...] }' ```
func (*CustomerService) Update ¶
func (r *CustomerService) Update(ctx context.Context, body CustomerUpdateParams, opts ...option.RequestOption) (res *CustomerUpdateResponse, err error)
Example curl
Parameters:
- user_id: str
- alias: Optional[str] = None # human-friendly alias
- blocked: bool = False # allow/disallow requests for this end-user
- max_budget: Optional[float] = None
- budget_id: Optional[str] = None # give either a budget_id or max_budget
- allowed_model_region: Optional[AllowedModelRegion] = ( None # require all user requests to use models in this specific region )
- default_model: Optional[str] = ( None # if no equivalent model in allowed region - default all requests to this model )
Example curl:
```
curl --location 'http://0.0.0.0:4000/customer/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"user_id": "test-litellm-user-4",
"budget_id": "paid_tier"
}'
See below for all params ```
type CustomerUnblockParams ¶
type CustomerUnblockParams struct {
BlockUsers BlockUsersParam `json:"block_users,required"`
}
func (CustomerUnblockParams) MarshalJSON ¶
func (r CustomerUnblockParams) MarshalJSON() (data []byte, err error)
type CustomerUnblockResponse ¶
type CustomerUnblockResponse = interface{}
type CustomerUpdateParams ¶
type CustomerUpdateParams struct {
UserID param.Field[string] `json:"user_id,required"`
Alias param.Field[string] `json:"alias"`
AllowedModelRegion param.Field[CustomerUpdateParamsAllowedModelRegion] `json:"allowed_model_region"`
Blocked param.Field[bool] `json:"blocked"`
BudgetID param.Field[string] `json:"budget_id"`
DefaultModel param.Field[string] `json:"default_model"`
MaxBudget param.Field[float64] `json:"max_budget"`
}
func (CustomerUpdateParams) MarshalJSON ¶
func (r CustomerUpdateParams) MarshalJSON() (data []byte, err error)
type CustomerUpdateParamsAllowedModelRegion ¶
type CustomerUpdateParamsAllowedModelRegion string
const ( CustomerUpdateParamsAllowedModelRegionEu CustomerUpdateParamsAllowedModelRegion = "eu" CustomerUpdateParamsAllowedModelRegionUs CustomerUpdateParamsAllowedModelRegion = "us" )
func (CustomerUpdateParamsAllowedModelRegion) IsKnown ¶
func (r CustomerUpdateParamsAllowedModelRegion) IsKnown() bool
type CustomerUpdateResponse ¶
type CustomerUpdateResponse = interface{}
type DeleteNewAllowedIPParams ¶
type DeleteNewAllowedIPParams struct {
IPAddress IPAddressParam `json:"ip_address,required"`
}
func (DeleteNewAllowedIPParams) MarshalJSON ¶
func (r DeleteNewAllowedIPParams) MarshalJSON() (data []byte, err error)
type DeleteNewAllowedIPResponse ¶
type DeleteNewAllowedIPResponse = interface{}
type DeleteService ¶
type DeleteService struct {
Options []option.RequestOption
}
DeleteService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDeleteService method instead.
func NewDeleteService ¶
func NewDeleteService(opts ...option.RequestOption) (r *DeleteService)
NewDeleteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DeleteService) NewAllowedIP ¶
func (r *DeleteService) NewAllowedIP(ctx context.Context, body DeleteNewAllowedIPParams, opts ...option.RequestOption) (res *DeleteNewAllowedIPResponse, err error)
Delete Allowed Ip
type EmbeddingNewParams ¶
type EmbeddingNewParams struct {
Model param.Field[string] `json:"model,required"`
APIBase param.Field[string] `json:"api_base"`
APIKey param.Field[string] `json:"api_key"`
APIType param.Field[string] `json:"api_type"`
APIVersion param.Field[string] `json:"api_version"`
Caching param.Field[bool] `json:"caching"`
CustomLlmProvider param.Field[EmbeddingNewParamsCustomLlmProviderUnion] `json:"custom_llm_provider"`
Input param.Field[[]string] `json:"input"`
LitellmCallID param.Field[string] `json:"litellm_call_id"`
LitellmLoggingObj param.Field[map[string]interface{}] `json:"litellm_logging_obj"`
LoggerFn param.Field[string] `json:"logger_fn"`
Timeout param.Field[int64] `json:"timeout"`
User param.Field[string] `json:"user"`
}
func (EmbeddingNewParams) MarshalJSON ¶
func (r EmbeddingNewParams) MarshalJSON() (data []byte, err error)
type EmbeddingNewParamsCustomLlmProviderMap ¶
type EmbeddingNewParamsCustomLlmProviderMap map[string]interface{}
func (EmbeddingNewParamsCustomLlmProviderMap) ImplementsEmbeddingNewParamsCustomLlmProviderUnion ¶
func (r EmbeddingNewParamsCustomLlmProviderMap) ImplementsEmbeddingNewParamsCustomLlmProviderUnion()
type EmbeddingNewParamsCustomLlmProviderUnion ¶
type EmbeddingNewParamsCustomLlmProviderUnion interface {
ImplementsEmbeddingNewParamsCustomLlmProviderUnion()
}
Satisfied by shared.UnionString, EmbeddingNewParamsCustomLlmProviderMap.
type EmbeddingNewResponse ¶
type EmbeddingNewResponse = interface{}
type EmbeddingService ¶
type EmbeddingService struct {
Options []option.RequestOption
}
EmbeddingService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEmbeddingService method instead.
func NewEmbeddingService ¶
func NewEmbeddingService(opts ...option.RequestOption) (r *EmbeddingService)
NewEmbeddingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EmbeddingService) New ¶
func (r *EmbeddingService) New(ctx context.Context, body EmbeddingNewParams, opts ...option.RequestOption) (res *EmbeddingNewResponse, err error)
Follows the exact same API spec as `OpenAI's Embeddings API https://platform.openai.com/docs/api-reference/embeddings`
```bash curl -X POST http://localhost:4000/v1/embeddings -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234"
-d '{
"model": "text-embedding-ada-002",
"input": "The quick brown fox jumps over the lazy dog"
}'
```
type EngineChatCompleteParams ¶
type EngineChatCompleteParams struct {
Messages param.Field[[]EngineChatCompleteParamsMessageUnion] `json:"messages,required"`
Model param.Field[string] `json:"model,required"`
Caching param.Field[bool] `json:"caching"`
ContextWindowFallbackDict param.Field[map[string]string] `json:"context_window_fallback_dict"`
Fallbacks param.Field[[]string] `json:"fallbacks"`
FrequencyPenalty param.Field[float64] `json:"frequency_penalty"`
FunctionCall param.Field[EngineChatCompleteParamsFunctionCallUnion] `json:"function_call"`
Functions param.Field[[]map[string]interface{}] `json:"functions"`
Guardrails param.Field[[]string] `json:"guardrails"`
LogitBias param.Field[map[string]float64] `json:"logit_bias"`
Logprobs param.Field[bool] `json:"logprobs"`
MaxTokens param.Field[int64] `json:"max_tokens"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
N param.Field[int64] `json:"n"`
NumRetries param.Field[int64] `json:"num_retries"`
ParallelToolCalls param.Field[bool] `json:"parallel_tool_calls"`
PresencePenalty param.Field[float64] `json:"presence_penalty"`
ResponseFormat param.Field[map[string]interface{}] `json:"response_format"`
Seed param.Field[int64] `json:"seed"`
ServiceTier param.Field[string] `json:"service_tier"`
Stop param.Field[EngineChatCompleteParamsStopUnion] `json:"stop"`
Stream param.Field[bool] `json:"stream"`
StreamOptions param.Field[map[string]interface{}] `json:"stream_options"`
Temperature param.Field[float64] `json:"temperature"`
ToolChoice param.Field[EngineChatCompleteParamsToolChoiceUnion] `json:"tool_choice"`
Tools param.Field[[]map[string]interface{}] `json:"tools"`
TopLogprobs param.Field[int64] `json:"top_logprobs"`
TopP param.Field[float64] `json:"top_p"`
User param.Field[string] `json:"user"`
}
func (EngineChatCompleteParams) MarshalJSON ¶
func (r EngineChatCompleteParams) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsFunctionCallMap ¶
type EngineChatCompleteParamsFunctionCallMap map[string]interface{}
func (EngineChatCompleteParamsFunctionCallMap) ImplementsEngineChatCompleteParamsFunctionCallUnion ¶
func (r EngineChatCompleteParamsFunctionCallMap) ImplementsEngineChatCompleteParamsFunctionCallUnion()
type EngineChatCompleteParamsFunctionCallUnion ¶
type EngineChatCompleteParamsFunctionCallUnion interface {
ImplementsEngineChatCompleteParamsFunctionCallUnion()
}
Satisfied by shared.UnionString, EngineChatCompleteParamsFunctionCallMap.
type EngineChatCompleteParamsMessage ¶
type EngineChatCompleteParamsMessage struct {
Role param.Field[EngineChatCompleteParamsMessagesRole] `json:"role,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Content param.Field[interface{}] `json:"content"`
FunctionCall param.Field[interface{}] `json:"function_call"`
Name param.Field[string] `json:"name"`
ReasoningContent param.Field[string] `json:"reasoning_content"`
ThinkingBlocks param.Field[interface{}] `json:"thinking_blocks"`
ToolCallID param.Field[string] `json:"tool_call_id"`
ToolCalls param.Field[interface{}] `json:"tool_calls"`
}
func (EngineChatCompleteParamsMessage) MarshalJSON ¶
func (r EngineChatCompleteParamsMessage) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessageUnion ¶
type EngineChatCompleteParamsMessageUnion interface {
// contains filtered or unexported methods
}
Satisfied by EngineChatCompleteParamsMessagesChatCompletionUserMessage, EngineChatCompleteParamsMessagesChatCompletionAssistantMessage, EngineChatCompleteParamsMessagesChatCompletionToolMessage, EngineChatCompleteParamsMessagesChatCompletionSystemMessage, EngineChatCompleteParamsMessagesChatCompletionFunctionMessage, EngineChatCompleteParamsMessagesChatCompletionDeveloperMessage, EngineChatCompleteParamsMessage.
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessage ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessage struct {
Role param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageRole] `json:"role,required"`
CacheControl param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControl] `json:"cache_control"`
Content param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion] `json:"content"`
FunctionCall param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageFunctionCall] `json:"function_call"`
Name param.Field[string] `json:"name"`
ReasoningContent param.Field[string] `json:"reasoning_content"`
ThinkingBlocks param.Field[[]EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlockUnion] `json:"thinking_blocks"`
ToolCalls param.Field[[]EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCall] `json:"tool_calls"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessage) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessage) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControl ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControl struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControlType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControl) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControl) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControlType ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControlType string
const (
EngineChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControlTypeEphemeral EngineChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControlType = "ephemeral"
)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArray ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArray []EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItemUnion
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArray) ImplementsEngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArray) ImplementsEngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion()
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType] `json:"type,required"`
CacheControl param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl] `json:"cache_control"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType string
const (
EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlTypeEphemeral EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType = "ephemeral"
)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType string
const (
EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectTypeText EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType = "text"
)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType] `json:"type,required"`
CacheControl param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlUnion] `json:"cache_control"`
Signature param.Field[string] `json:"signature"`
Thinking param.Field[string] `json:"thinking"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType string
const (
EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentTypeEphemeral EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType = "ephemeral"
)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlMap ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlMap map[string]interface{}
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlUnion interface {
// contains filtered or unexported methods
}
Satisfied by EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlMap, EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent.
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType string
const (
EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockTypeThinking EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType = "thinking"
)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItem ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItem struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayType] `json:"type,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Signature param.Field[string] `json:"signature"`
Text param.Field[string] `json:"text"`
Thinking param.Field[string] `json:"thinking"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItem) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItem) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItemUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItemUnion interface {
// contains filtered or unexported methods
}
Satisfied by EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject, EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock, EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItem.
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayType ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayType string
const ( EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayTypeText EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayType = "text" EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayTypeThinking EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayType = "thinking" )
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion interface {
ImplementsEngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion()
}
Satisfied by shared.UnionString, EngineChatCompleteParamsMessagesChatCompletionAssistantMessageContentArray.
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageFunctionCall ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageFunctionCall struct {
Arguments param.Field[string] `json:"arguments"`
Name param.Field[string] `json:"name"`
ProviderSpecificFields param.Field[map[string]interface{}] `json:"provider_specific_fields"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageFunctionCall) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageFunctionCall) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageRole ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageRole string
const (
EngineChatCompleteParamsMessagesChatCompletionAssistantMessageRoleAssistant EngineChatCompleteParamsMessagesChatCompletionAssistantMessageRole = "assistant"
)
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageRole) IsKnown ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageRole) IsKnown() bool
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlock ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlock struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksType] `json:"type,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Data param.Field[string] `json:"data"`
Signature param.Field[string] `json:"signature"`
Thinking param.Field[string] `json:"thinking"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlock) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlock) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlockUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlockUnion interface {
// contains filtered or unexported methods
}
Satisfied by EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock, EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock, EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlock.
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType] `json:"type,required"`
CacheControl param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnion] `json:"cache_control"`
Data param.Field[string] `json:"data"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType string
const (
EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentTypeEphemeral EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType = "ephemeral"
)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMap ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMap map[string]interface{}
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnion interface {
// contains filtered or unexported methods
}
Satisfied by EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMap, EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent.
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType string
const (
EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockTypeRedactedThinking EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType = "redacted_thinking"
)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType] `json:"type,required"`
CacheControl param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnion] `json:"cache_control"`
Signature param.Field[string] `json:"signature"`
Thinking param.Field[string] `json:"thinking"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType string
const (
EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentTypeEphemeral EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType = "ephemeral"
)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMap ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMap map[string]interface{}
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnion interface {
// contains filtered or unexported methods
}
Satisfied by EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMap, EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent.
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType string
const (
EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockTypeThinking EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType = "thinking"
)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksType ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksType string
const ( EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksTypeThinking EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksType = "thinking" EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksTypeRedactedThinking EngineChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksType = "redacted_thinking" )
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCall ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCall struct {
ID param.Field[string] `json:"id,required"`
Function param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsFunction] `json:"function,required"`
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCall) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCall) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsFunction ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsFunction struct {
Arguments param.Field[string] `json:"arguments"`
Name param.Field[string] `json:"name"`
ProviderSpecificFields param.Field[map[string]interface{}] `json:"provider_specific_fields"`
}
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsFunction) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsFunction) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsType ¶
type EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsType string
const (
EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsTypeFunction EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsType = "function"
)
func (EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsType) IsKnown ¶
func (r EngineChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsType) IsKnown() bool
type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessage ¶
type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessage struct {
Content param.Field[EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion] `json:"content,required"`
Role param.Field[EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageRole] `json:"role,required"`
CacheControl param.Field[EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControl] `json:"cache_control"`
Name param.Field[string] `json:"name"`
}
func (EngineChatCompleteParamsMessagesChatCompletionDeveloperMessage) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionDeveloperMessage) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControl ¶
type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControl struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControlType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControl) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControl) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControlType ¶
type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControlType string
const (
EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControlTypeEphemeral EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControlType = "ephemeral"
)
type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentArray ¶
type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentArray []interface{}
func (EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentArray) ImplementsEngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion ¶
func (r EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentArray) ImplementsEngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion()
type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion interface {
ImplementsEngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion()
}
Satisfied by shared.UnionString, EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageContentArray.
type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageRole ¶
type EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageRole string
const (
EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageRoleDeveloper EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageRole = "developer"
)
func (EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageRole) IsKnown ¶
func (r EngineChatCompleteParamsMessagesChatCompletionDeveloperMessageRole) IsKnown() bool
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessage ¶
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessage struct {
Content param.Field[EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion] `json:"content,required"`
Name param.Field[string] `json:"name,required"`
Role param.Field[EngineChatCompleteParamsMessagesChatCompletionFunctionMessageRole] `json:"role,required"`
ToolCallID param.Field[string] `json:"tool_call_id,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionFunctionMessage) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionFunctionMessage) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArray ¶
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArray []EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayItem
func (EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArray) ImplementsEngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion ¶
func (r EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArray) ImplementsEngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion()
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl ¶
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType ¶
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType string
const (
EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlTypeEphemeral EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType = "ephemeral"
)
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayItem ¶
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayItem struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayType] `json:"type,required"`
CacheControl param.Field[EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl] `json:"cache_control"`
}
func (EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayItem) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayItem) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayType ¶
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayType string
const (
EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayTypeText EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayType = "text"
)
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion interface {
ImplementsEngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion()
}
Satisfied by shared.UnionString, EngineChatCompleteParamsMessagesChatCompletionFunctionMessageContentArray.
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageRole ¶
type EngineChatCompleteParamsMessagesChatCompletionFunctionMessageRole string
const (
EngineChatCompleteParamsMessagesChatCompletionFunctionMessageRoleFunction EngineChatCompleteParamsMessagesChatCompletionFunctionMessageRole = "function"
)
func (EngineChatCompleteParamsMessagesChatCompletionFunctionMessageRole) IsKnown ¶
func (r EngineChatCompleteParamsMessagesChatCompletionFunctionMessageRole) IsKnown() bool
type EngineChatCompleteParamsMessagesChatCompletionSystemMessage ¶
type EngineChatCompleteParamsMessagesChatCompletionSystemMessage struct {
Content param.Field[EngineChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion] `json:"content,required"`
Role param.Field[EngineChatCompleteParamsMessagesChatCompletionSystemMessageRole] `json:"role,required"`
CacheControl param.Field[EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControl] `json:"cache_control"`
Name param.Field[string] `json:"name"`
}
func (EngineChatCompleteParamsMessagesChatCompletionSystemMessage) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionSystemMessage) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControl ¶
type EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControl struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControl) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControl) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlType ¶
type EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlType string
const (
EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlTypeEphemeral EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlType = "ephemeral"
)
func (EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlType) IsKnown ¶
func (r EngineChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlType) IsKnown() bool
type EngineChatCompleteParamsMessagesChatCompletionSystemMessageContentArray ¶
type EngineChatCompleteParamsMessagesChatCompletionSystemMessageContentArray []interface{}
func (EngineChatCompleteParamsMessagesChatCompletionSystemMessageContentArray) ImplementsEngineChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion ¶
func (r EngineChatCompleteParamsMessagesChatCompletionSystemMessageContentArray) ImplementsEngineChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion()
type EngineChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion interface {
ImplementsEngineChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion()
}
Satisfied by shared.UnionString, EngineChatCompleteParamsMessagesChatCompletionSystemMessageContentArray.
type EngineChatCompleteParamsMessagesChatCompletionSystemMessageRole ¶
type EngineChatCompleteParamsMessagesChatCompletionSystemMessageRole string
const (
EngineChatCompleteParamsMessagesChatCompletionSystemMessageRoleSystem EngineChatCompleteParamsMessagesChatCompletionSystemMessageRole = "system"
)
func (EngineChatCompleteParamsMessagesChatCompletionSystemMessageRole) IsKnown ¶
func (r EngineChatCompleteParamsMessagesChatCompletionSystemMessageRole) IsKnown() bool
type EngineChatCompleteParamsMessagesChatCompletionToolMessage ¶
type EngineChatCompleteParamsMessagesChatCompletionToolMessage struct {
Content param.Field[EngineChatCompleteParamsMessagesChatCompletionToolMessageContentUnion] `json:"content,required"`
Role param.Field[EngineChatCompleteParamsMessagesChatCompletionToolMessageRole] `json:"role,required"`
ToolCallID param.Field[string] `json:"tool_call_id,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionToolMessage) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionToolMessage) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArray ¶
type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArray []EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayItem
func (EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArray) ImplementsEngineChatCompleteParamsMessagesChatCompletionToolMessageContentUnion ¶
func (r EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArray) ImplementsEngineChatCompleteParamsMessagesChatCompletionToolMessageContentUnion()
type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControl ¶
type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControl struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControlType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControl) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControl) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControlType ¶
type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControlType string
const (
EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControlTypeEphemeral EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControlType = "ephemeral"
)
type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayItem ¶
type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayItem struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayType] `json:"type,required"`
CacheControl param.Field[EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControl] `json:"cache_control"`
}
func (EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayItem) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayItem) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayType ¶
type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayType string
const (
EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayTypeText EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayType = "text"
)
func (EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayType) IsKnown ¶
func (r EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArrayType) IsKnown() bool
type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionToolMessageContentUnion interface {
ImplementsEngineChatCompleteParamsMessagesChatCompletionToolMessageContentUnion()
}
Satisfied by shared.UnionString, EngineChatCompleteParamsMessagesChatCompletionToolMessageContentArray.
type EngineChatCompleteParamsMessagesChatCompletionToolMessageRole ¶
type EngineChatCompleteParamsMessagesChatCompletionToolMessageRole string
const (
EngineChatCompleteParamsMessagesChatCompletionToolMessageRoleTool EngineChatCompleteParamsMessagesChatCompletionToolMessageRole = "tool"
)
func (EngineChatCompleteParamsMessagesChatCompletionToolMessageRole) IsKnown ¶
func (r EngineChatCompleteParamsMessagesChatCompletionToolMessageRole) IsKnown() bool
type EngineChatCompleteParamsMessagesChatCompletionUserMessage ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessage struct {
Content param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentUnion] `json:"content,required"`
Role param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageRole] `json:"role,required"`
CacheControl param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControl] `json:"cache_control"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessage) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessage) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControl ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControl struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControlType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControl) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControl) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControlType ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControlType string
const (
EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControlTypeEphemeral EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControlType = "ephemeral"
)
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControlType) IsKnown ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageCacheControlType) IsKnown() bool
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArray ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArray []EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItemUnion
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArray) ImplementsEngineChatCompleteParamsMessagesChatCompletionUserMessageContentUnion ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArray) ImplementsEngineChatCompleteParamsMessagesChatCompletionUserMessageContentUnion()
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject struct {
InputAudio param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio] `json:"input_audio,required"`
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio struct {
Data param.Field[string] `json:"data,required"`
Format param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat] `json:"format,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat string
const ( EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormatWav EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat = "wav" EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormatMP3 EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat = "mp3" )
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType string
const (
EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectTypeInputAudio EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType = "input_audio"
)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject struct {
Citations param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations] `json:"citations,required"`
Context param.Field[string] `json:"context,required"`
Source param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource] `json:"source,required"`
Title param.Field[string] `json:"title,required"`
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations struct {
Enabled param.Field[bool] `json:"enabled,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource struct {
Data param.Field[string] `json:"data,required"`
MediaType param.Field[string] `json:"media_type,required"`
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType string
const (
EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceTypeText EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType = "text"
)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType string
const (
EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectTypeDocument EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType = "document"
)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject struct {
File param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile] `json:"file,required"`
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile struct {
FileData param.Field[string] `json:"file_data"`
FileID param.Field[string] `json:"file_id"`
Filename param.Field[string] `json:"filename"`
Format param.Field[string] `json:"format"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType string
const (
EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectTypeFile EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType = "file"
)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject struct {
ImageURL param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion] `json:"image_url,required"`
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject struct {
URL param.Field[string] `json:"url,required"`
Detail param.Field[string] `json:"detail"`
Format param.Field[string] `json:"format"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) ImplementsEngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) ImplementsEngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion()
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion interface {
ImplementsEngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion()
}
Satisfied by shared.UnionString, EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject.
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType string
const (
EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectTypeImageURL EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType = "image_url"
)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType] `json:"type,required"`
CacheControl param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl] `json:"cache_control"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType] `json:"type,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType string
const (
EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlTypeEphemeral EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType = "ephemeral"
)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType string
const (
EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectTypeText EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType = "text"
)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType] `json:"type,required"`
VideoURL param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion] `json:"video_url,required"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType string
const (
EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectTypeVideoURL EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType = "video_url"
)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject struct {
URL param.Field[string] `json:"url,required"`
Detail param.Field[string] `json:"detail"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) ImplementsEngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) ImplementsEngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion()
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion interface {
ImplementsEngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion()
}
Satisfied by shared.UnionString, EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject.
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItem ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItem struct {
Type param.Field[EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType] `json:"type,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Citations param.Field[interface{}] `json:"citations"`
Context param.Field[string] `json:"context"`
File param.Field[interface{}] `json:"file"`
ImageURL param.Field[interface{}] `json:"image_url"`
InputAudio param.Field[interface{}] `json:"input_audio"`
Source param.Field[interface{}] `json:"source"`
Text param.Field[string] `json:"text"`
Title param.Field[string] `json:"title"`
VideoURL param.Field[interface{}] `json:"video_url"`
}
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItem) MarshalJSON ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItem) MarshalJSON() (data []byte, err error)
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItemUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItemUnion interface {
// contains filtered or unexported methods
}
Satisfied by EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject, EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject, EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject, EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject, EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject, EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject, EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItem.
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType string
const ( EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayTypeText EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType = "text" EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayTypeImageURL EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType = "image_url" EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayTypeInputAudio EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType = "input_audio" EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayTypeDocument EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType = "document" EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayTypeVideoURL EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType = "video_url" EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayTypeFile EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType = "file" )
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType) IsKnown ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType) IsKnown() bool
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentUnion ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageContentUnion interface {
ImplementsEngineChatCompleteParamsMessagesChatCompletionUserMessageContentUnion()
}
Satisfied by shared.UnionString, EngineChatCompleteParamsMessagesChatCompletionUserMessageContentArray.
type EngineChatCompleteParamsMessagesChatCompletionUserMessageRole ¶
type EngineChatCompleteParamsMessagesChatCompletionUserMessageRole string
const (
EngineChatCompleteParamsMessagesChatCompletionUserMessageRoleUser EngineChatCompleteParamsMessagesChatCompletionUserMessageRole = "user"
)
func (EngineChatCompleteParamsMessagesChatCompletionUserMessageRole) IsKnown ¶
func (r EngineChatCompleteParamsMessagesChatCompletionUserMessageRole) IsKnown() bool
type EngineChatCompleteParamsMessagesRole ¶
type EngineChatCompleteParamsMessagesRole string
const ( EngineChatCompleteParamsMessagesRoleUser EngineChatCompleteParamsMessagesRole = "user" EngineChatCompleteParamsMessagesRoleAssistant EngineChatCompleteParamsMessagesRole = "assistant" EngineChatCompleteParamsMessagesRoleTool EngineChatCompleteParamsMessagesRole = "tool" EngineChatCompleteParamsMessagesRoleSystem EngineChatCompleteParamsMessagesRole = "system" EngineChatCompleteParamsMessagesRoleFunction EngineChatCompleteParamsMessagesRole = "function" EngineChatCompleteParamsMessagesRoleDeveloper EngineChatCompleteParamsMessagesRole = "developer" )
func (EngineChatCompleteParamsMessagesRole) IsKnown ¶
func (r EngineChatCompleteParamsMessagesRole) IsKnown() bool
type EngineChatCompleteParamsStopArray ¶
type EngineChatCompleteParamsStopArray []string
func (EngineChatCompleteParamsStopArray) ImplementsEngineChatCompleteParamsStopUnion ¶
func (r EngineChatCompleteParamsStopArray) ImplementsEngineChatCompleteParamsStopUnion()
type EngineChatCompleteParamsStopUnion ¶
type EngineChatCompleteParamsStopUnion interface {
ImplementsEngineChatCompleteParamsStopUnion()
}
Satisfied by shared.UnionString, EngineChatCompleteParamsStopArray.
type EngineChatCompleteParamsToolChoiceMap ¶
type EngineChatCompleteParamsToolChoiceMap map[string]interface{}
func (EngineChatCompleteParamsToolChoiceMap) ImplementsEngineChatCompleteParamsToolChoiceUnion ¶
func (r EngineChatCompleteParamsToolChoiceMap) ImplementsEngineChatCompleteParamsToolChoiceUnion()
type EngineChatCompleteParamsToolChoiceUnion ¶
type EngineChatCompleteParamsToolChoiceUnion interface {
ImplementsEngineChatCompleteParamsToolChoiceUnion()
}
Satisfied by shared.UnionString, EngineChatCompleteParamsToolChoiceMap.
type EngineChatCompleteResponse ¶
type EngineChatCompleteResponse = interface{}
type EngineChatService ¶
type EngineChatService struct {
Options []option.RequestOption
}
EngineChatService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEngineChatService method instead.
func NewEngineChatService ¶
func NewEngineChatService(opts ...option.RequestOption) (r *EngineChatService)
NewEngineChatService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EngineChatService) Complete ¶
func (r *EngineChatService) Complete(ctx context.Context, model string, body EngineChatCompleteParams, opts ...option.RequestOption) (res *EngineChatCompleteResponse, err error)
Follows the exact same API spec as `OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat`
```bash curl -X POST http://localhost:4000/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234"
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}'
```
type EngineCompleteResponse ¶
type EngineCompleteResponse = interface{}
type EngineEmbedParams ¶
type EngineEmbedParams struct {
Model param.Field[string] `json:"model,required"`
APIBase param.Field[string] `json:"api_base"`
APIKey param.Field[string] `json:"api_key"`
APIType param.Field[string] `json:"api_type"`
APIVersion param.Field[string] `json:"api_version"`
Caching param.Field[bool] `json:"caching"`
CustomLlmProvider param.Field[EngineEmbedParamsCustomLlmProviderUnion] `json:"custom_llm_provider"`
Input param.Field[[]string] `json:"input"`
LitellmCallID param.Field[string] `json:"litellm_call_id"`
LitellmLoggingObj param.Field[map[string]interface{}] `json:"litellm_logging_obj"`
LoggerFn param.Field[string] `json:"logger_fn"`
Timeout param.Field[int64] `json:"timeout"`
User param.Field[string] `json:"user"`
}
func (EngineEmbedParams) MarshalJSON ¶
func (r EngineEmbedParams) MarshalJSON() (data []byte, err error)
type EngineEmbedParamsCustomLlmProviderMap ¶
type EngineEmbedParamsCustomLlmProviderMap map[string]interface{}
func (EngineEmbedParamsCustomLlmProviderMap) ImplementsEngineEmbedParamsCustomLlmProviderUnion ¶
func (r EngineEmbedParamsCustomLlmProviderMap) ImplementsEngineEmbedParamsCustomLlmProviderUnion()
type EngineEmbedParamsCustomLlmProviderUnion ¶
type EngineEmbedParamsCustomLlmProviderUnion interface {
ImplementsEngineEmbedParamsCustomLlmProviderUnion()
}
Satisfied by shared.UnionString, EngineEmbedParamsCustomLlmProviderMap.
type EngineEmbedResponse ¶
type EngineEmbedResponse = interface{}
type EngineService ¶
type EngineService struct {
Options []option.RequestOption
Chat *EngineChatService
}
EngineService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEngineService method instead.
func NewEngineService ¶
func NewEngineService(opts ...option.RequestOption) (r *EngineService)
NewEngineService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EngineService) Complete ¶
func (r *EngineService) Complete(ctx context.Context, model string, opts ...option.RequestOption) (res *EngineCompleteResponse, err error)
Follows the exact same API spec as `OpenAI's Completions API https://platform.openai.com/docs/api-reference/completions`
```bash curl -X POST http://localhost:4000/v1/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234"
-d '{
"model": "gpt-3.5-turbo-instruct",
"prompt": "Once upon a time",
"max_tokens": 50,
"temperature": 0.7
}'
```
func (*EngineService) Embed ¶
func (r *EngineService) Embed(ctx context.Context, model string, body EngineEmbedParams, opts ...option.RequestOption) (res *EngineEmbedResponse, err error)
Follows the exact same API spec as `OpenAI's Embeddings API https://platform.openai.com/docs/api-reference/embeddings`
```bash curl -X POST http://localhost:4000/v1/embeddings -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234"
-d '{
"model": "text-embedding-ada-002",
"input": "The quick brown fox jumps over the lazy dog"
}'
```
type EuAssemblyaiDeleteResponse ¶
type EuAssemblyaiDeleteResponse = interface{}
type EuAssemblyaiGetResponse ¶
type EuAssemblyaiGetResponse = interface{}
type EuAssemblyaiNewResponse ¶
type EuAssemblyaiNewResponse = interface{}
type EuAssemblyaiPatchResponse ¶
type EuAssemblyaiPatchResponse = interface{}
type EuAssemblyaiService ¶
type EuAssemblyaiService struct {
Options []option.RequestOption
}
EuAssemblyaiService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEuAssemblyaiService method instead.
func NewEuAssemblyaiService ¶
func NewEuAssemblyaiService(opts ...option.RequestOption) (r *EuAssemblyaiService)
NewEuAssemblyaiService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EuAssemblyaiService) Delete ¶
func (r *EuAssemblyaiService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *EuAssemblyaiDeleteResponse, err error)
Assemblyai Proxy Route
func (*EuAssemblyaiService) Get ¶
func (r *EuAssemblyaiService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *EuAssemblyaiGetResponse, err error)
Assemblyai Proxy Route
func (*EuAssemblyaiService) New ¶
func (r *EuAssemblyaiService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *EuAssemblyaiNewResponse, err error)
Assemblyai Proxy Route
func (*EuAssemblyaiService) Patch ¶
func (r *EuAssemblyaiService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *EuAssemblyaiPatchResponse, err error)
Assemblyai Proxy Route
func (*EuAssemblyaiService) Update ¶
func (r *EuAssemblyaiService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *EuAssemblyaiUpdateResponse, err error)
Assemblyai Proxy Route
type EuAssemblyaiUpdateResponse ¶
type EuAssemblyaiUpdateResponse = interface{}
type FileContentGetResponse ¶
type FileContentGetResponse = interface{}
type FileContentService ¶
type FileContentService struct {
Options []option.RequestOption
}
FileContentService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFileContentService method instead.
func NewFileContentService ¶
func NewFileContentService(opts ...option.RequestOption) (r *FileContentService)
NewFileContentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FileContentService) Get ¶
func (r *FileContentService) Get(ctx context.Context, provider string, fileID string, opts ...option.RequestOption) (res *FileContentGetResponse, err error)
Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET https://api.openai.com/v1/files/{file_id}/content
Supports Identical Params as: https://platform.openai.com/docs/api-reference/files/retrieve-contents
Example Curl ¶
``` curl http://localhost:4000/v1/files/file-abc123/content -H "Authorization: Bearer sk-1234"
```
type FileDeleteResponse ¶
type FileDeleteResponse = interface{}
type FileGetResponse ¶
type FileGetResponse = interface{}
type FileListParams ¶
type FileListParams struct {
Purpose param.Field[string] `query:"purpose"`
TargetModelNames param.Field[string] `query:"target_model_names"`
}
func (FileListParams) URLQuery ¶
func (r FileListParams) URLQuery() (v url.Values)
URLQuery serializes FileListParams's query parameters as `url.Values`.
type FileListResponse ¶
type FileListResponse = interface{}
type FileNewParams ¶
type FileNewParams struct {
File param.Field[io.Reader] `json:"file,required" format:"binary"`
Purpose param.Field[string] `json:"purpose,required"`
CustomLlmProvider param.Field[string] `json:"custom_llm_provider"`
LitellmMetadata param.Field[string] `json:"litellm_metadata"`
TargetModelNames param.Field[string] `json:"target_model_names"`
TargetStorage param.Field[string] `json:"target_storage"`
}
func (FileNewParams) MarshalMultipart ¶
func (r FileNewParams) MarshalMultipart() (data []byte, contentType string, err error)
type FileNewResponse ¶
type FileNewResponse = interface{}
type FileService ¶
type FileService struct {
Options []option.RequestOption
Content *FileContentService
}
FileService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFileService method instead.
func NewFileService ¶
func NewFileService(opts ...option.RequestOption) (r *FileService)
NewFileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FileService) Delete ¶
func (r *FileService) Delete(ctx context.Context, provider string, fileID string, opts ...option.RequestOption) (res *FileDeleteResponse, err error)
Deletes a specified file. that can be used across - Assistants API, Batch API This is the equivalent of DELETE https://api.openai.com/v1/files/{file_id}
Supports Identical Params as: https://platform.openai.com/docs/api-reference/files/delete
Example Curl ¶
``` curl http://localhost:4000/v1/files/file-abc123 -X DELETE -H "Authorization: Bearer $OPENAI_API_KEY"
```
func (*FileService) Get ¶
func (r *FileService) Get(ctx context.Context, provider string, fileID string, opts ...option.RequestOption) (res *FileGetResponse, err error)
Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET https://api.openai.com/v1/files/{file_id}
Supports Identical Params as: https://platform.openai.com/docs/api-reference/files/retrieve
Example Curl ¶
``` curl http://localhost:4000/v1/files/file-abc123 -H "Authorization: Bearer sk-1234"
```
func (*FileService) List ¶
func (r *FileService) List(ctx context.Context, provider string, query FileListParams, opts ...option.RequestOption) (res *FileListResponse, err error)
Returns information about a specific file. that can be used across - Assistants API, Batch API This is the equivalent of GET https://api.openai.com/v1/files/
Supports Identical Params as: https://platform.openai.com/docs/api-reference/files/list
Example Curl ¶
``` curl http://localhost:4000/v1/files -H "Authorization: Bearer sk-1234"
```
func (*FileService) New ¶
func (r *FileService) New(ctx context.Context, provider string, body FileNewParams, opts ...option.RequestOption) (res *FileNewResponse, err error)
Upload a file that can be used across - Assistants API, Batch API This is the equivalent of POST https://api.openai.com/v1/files
Supports Identical Params as: https://platform.openai.com/docs/api-reference/files/create
Example Curl ¶
``` curl http://localhost:4000/v1/files -H "Authorization: Bearer sk-1234" -F purpose="batch" -F file="@mydata.jsonl"
-F expires_after[anchor]="created_at" -F expires_after[seconds]=2592000
```
type FineTuningJobCancelNewResponse ¶
type FineTuningJobCancelNewResponse = interface{}
type FineTuningJobCancelService ¶
type FineTuningJobCancelService struct {
Options []option.RequestOption
}
FineTuningJobCancelService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFineTuningJobCancelService method instead.
func NewFineTuningJobCancelService ¶
func NewFineTuningJobCancelService(opts ...option.RequestOption) (r *FineTuningJobCancelService)
NewFineTuningJobCancelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FineTuningJobCancelService) New ¶
func (r *FineTuningJobCancelService) New(ctx context.Context, fineTuningJobID string, opts ...option.RequestOption) (res *FineTuningJobCancelNewResponse, err error)
Cancel a fine-tuning job.
This is the equivalent of POST https://api.openai.com/v1/fine_tuning/jobs/{fine_tuning_job_id}/cancel
Supported Query Params:
- `custom_llm_provider`: Name of the LiteLLM provider - `fine_tuning_job_id`: The ID of the fine-tuning job to cancel.
type FineTuningJobGetParams ¶
type FineTuningJobGetParams struct {
CustomLlmProvider param.Field[FineTuningJobGetParamsCustomLlmProvider] `query:"custom_llm_provider"`
}
func (FineTuningJobGetParams) URLQuery ¶
func (r FineTuningJobGetParams) URLQuery() (v url.Values)
URLQuery serializes FineTuningJobGetParams's query parameters as `url.Values`.
type FineTuningJobGetParamsCustomLlmProvider ¶
type FineTuningJobGetParamsCustomLlmProvider string
const ( FineTuningJobGetParamsCustomLlmProviderOpenAI FineTuningJobGetParamsCustomLlmProvider = "openai" FineTuningJobGetParamsCustomLlmProviderAzure FineTuningJobGetParamsCustomLlmProvider = "azure" )
func (FineTuningJobGetParamsCustomLlmProvider) IsKnown ¶
func (r FineTuningJobGetParamsCustomLlmProvider) IsKnown() bool
type FineTuningJobGetResponse ¶
type FineTuningJobGetResponse = interface{}
type FineTuningJobListParams ¶
type FineTuningJobListParams struct {
After param.Field[string] `query:"after"`
CustomLlmProvider param.Field[FineTuningJobListParamsCustomLlmProvider] `query:"custom_llm_provider"`
Limit param.Field[int64] `query:"limit"`
// Comma separated list of model names to filter by. Example: 'gpt-4o,gpt-4o-mini'
TargetModelNames param.Field[string] `query:"target_model_names"`
}
func (FineTuningJobListParams) URLQuery ¶
func (r FineTuningJobListParams) URLQuery() (v url.Values)
URLQuery serializes FineTuningJobListParams's query parameters as `url.Values`.
type FineTuningJobListParamsCustomLlmProvider ¶
type FineTuningJobListParamsCustomLlmProvider string
const ( FineTuningJobListParamsCustomLlmProviderOpenAI FineTuningJobListParamsCustomLlmProvider = "openai" FineTuningJobListParamsCustomLlmProviderAzure FineTuningJobListParamsCustomLlmProvider = "azure" )
func (FineTuningJobListParamsCustomLlmProvider) IsKnown ¶
func (r FineTuningJobListParamsCustomLlmProvider) IsKnown() bool
type FineTuningJobListResponse ¶
type FineTuningJobListResponse = interface{}
type FineTuningJobNewParams ¶
type FineTuningJobNewParams struct {
LiteLlmFineTuningJobCreate LiteLlmFineTuningJobCreateParam `json:"lite_llm_fine_tuning_job_create,required"`
}
func (FineTuningJobNewParams) MarshalJSON ¶
func (r FineTuningJobNewParams) MarshalJSON() (data []byte, err error)
type FineTuningJobNewResponse ¶
type FineTuningJobNewResponse = interface{}
type FineTuningJobService ¶
type FineTuningJobService struct {
Options []option.RequestOption
Cancel *FineTuningJobCancelService
}
FineTuningJobService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFineTuningJobService method instead.
func NewFineTuningJobService ¶
func NewFineTuningJobService(opts ...option.RequestOption) (r *FineTuningJobService)
NewFineTuningJobService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FineTuningJobService) Get ¶
func (r *FineTuningJobService) Get(ctx context.Context, fineTuningJobID string, query FineTuningJobGetParams, opts ...option.RequestOption) (res *FineTuningJobGetResponse, err error)
Retrieves a fine-tuning job. This is the equivalent of GET https://api.openai.com/v1/fine_tuning/jobs/{fine_tuning_job_id}
Supported Query Params:
- `custom_llm_provider`: Name of the LiteLLM provider - `fine_tuning_job_id`: The ID of the fine-tuning job to retrieve.
func (*FineTuningJobService) List ¶
func (r *FineTuningJobService) List(ctx context.Context, query FineTuningJobListParams, opts ...option.RequestOption) (res *FineTuningJobListResponse, err error)
Lists fine-tuning jobs for the organization. This is the equivalent of GET https://api.openai.com/v1/fine_tuning/jobs
Supported Query Params:
- `custom_llm_provider`: Name of the LiteLLM provider - `after`: Identifier for the last job from the previous pagination request. - `limit`: Number of fine-tuning jobs to retrieve (default is 20).
func (*FineTuningJobService) New ¶
func (r *FineTuningJobService) New(ctx context.Context, body FineTuningJobNewParams, opts ...option.RequestOption) (res *FineTuningJobNewResponse, err error)
Creates a fine-tuning job which begins the process of creating a new model from a given dataset. This is the equivalent of POST https://api.openai.com/v1/fine_tuning/jobs
Supports Identical Params as: https://platform.openai.com/docs/api-reference/fine-tuning/create
Example Curl:
```
curl http://localhost:4000/v1/fine_tuning/jobs -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{
"model": "gpt-3.5-turbo",
"training_file": "file-abc123",
"hyperparameters": {
"n_epochs": 4
}
}'
```
type FineTuningService ¶
type FineTuningService struct {
Options []option.RequestOption
Jobs *FineTuningJobService
}
FineTuningService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFineTuningService method instead.
func NewFineTuningService ¶
func NewFineTuningService(opts ...option.RequestOption) (r *FineTuningService)
NewFineTuningService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type GeminiDeleteResponse ¶
type GeminiDeleteResponse = interface{}
type GeminiGetResponse ¶
type GeminiGetResponse = interface{}
type GeminiNewResponse ¶
type GeminiNewResponse = interface{}
type GeminiPatchResponse ¶
type GeminiPatchResponse = interface{}
type GeminiService ¶
type GeminiService struct {
Options []option.RequestOption
}
GeminiService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGeminiService method instead.
func NewGeminiService ¶
func NewGeminiService(opts ...option.RequestOption) (r *GeminiService)
NewGeminiService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GeminiService) Delete ¶
func (r *GeminiService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *GeminiDeleteResponse, err error)
[Docs](https://docs.litellm.ai/docs/pass_through/google_ai_studio)
func (*GeminiService) Get ¶
func (r *GeminiService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *GeminiGetResponse, err error)
[Docs](https://docs.litellm.ai/docs/pass_through/google_ai_studio)
func (*GeminiService) New ¶
func (r *GeminiService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *GeminiNewResponse, err error)
[Docs](https://docs.litellm.ai/docs/pass_through/google_ai_studio)
func (*GeminiService) Patch ¶
func (r *GeminiService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *GeminiPatchResponse, err error)
[Docs](https://docs.litellm.ai/docs/pass_through/google_ai_studio)
func (*GeminiService) Update ¶
func (r *GeminiService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *GeminiUpdateResponse, err error)
[Docs](https://docs.litellm.ai/docs/pass_through/google_ai_studio)
type GeminiUpdateResponse ¶
type GeminiUpdateResponse = interface{}
type GenerateKeyResponse ¶
type GenerateKeyResponse struct {
Key string `json:"key,required"`
Token string `json:"token,nullable"`
Aliases map[string]interface{} `json:"aliases,nullable"`
AllowedCacheControls []interface{} `json:"allowed_cache_controls,nullable"`
AllowedPassthroughRoutes []interface{} `json:"allowed_passthrough_routes,nullable"`
AllowedRoutes []interface{} `json:"allowed_routes,nullable"`
AllowedVectorStoreIndexes []GenerateKeyResponseAllowedVectorStoreIndex `json:"allowed_vector_store_indexes,nullable"`
Blocked bool `json:"blocked,nullable"`
BudgetDuration string `json:"budget_duration,nullable"`
BudgetID string `json:"budget_id,nullable"`
Config map[string]interface{} `json:"config,nullable"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
CreatedBy string `json:"created_by,nullable"`
Duration string `json:"duration,nullable"`
EnforcedParams []string `json:"enforced_params,nullable"`
Expires time.Time `json:"expires,nullable" format:"date-time"`
Guardrails []string `json:"guardrails,nullable"`
KeyAlias string `json:"key_alias,nullable"`
KeyName string `json:"key_name,nullable"`
LitellmBudgetTable interface{} `json:"litellm_budget_table"`
MaxBudget float64 `json:"max_budget,nullable"`
MaxParallelRequests int64 `json:"max_parallel_requests,nullable"`
Metadata map[string]interface{} `json:"metadata,nullable"`
ModelMaxBudget map[string]interface{} `json:"model_max_budget,nullable"`
ModelRpmLimit map[string]interface{} `json:"model_rpm_limit,nullable"`
ModelTpmLimit map[string]interface{} `json:"model_tpm_limit,nullable"`
Models []interface{} `json:"models,nullable"`
ObjectPermission GenerateKeyResponseObjectPermission `json:"object_permission,nullable"`
OrganizationID string `json:"organization_id,nullable"`
Permissions map[string]interface{} `json:"permissions,nullable"`
Prompts []string `json:"prompts,nullable"`
// Set of params that you can modify via `router.update_settings()`.
RouterSettings GenerateKeyResponseRouterSettings `json:"router_settings,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
RpmLimitType GenerateKeyResponseRpmLimitType `json:"rpm_limit_type,nullable"`
Spend float64 `json:"spend,nullable"`
Tags []string `json:"tags,nullable"`
TeamID string `json:"team_id,nullable"`
TokenID string `json:"token_id,nullable"`
TpmLimit int64 `json:"tpm_limit,nullable"`
TpmLimitType GenerateKeyResponseTpmLimitType `json:"tpm_limit_type,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
UpdatedBy string `json:"updated_by,nullable"`
UserID string `json:"user_id,nullable"`
JSON generateKeyResponseJSON `json:"-"`
}
func (*GenerateKeyResponse) UnmarshalJSON ¶
func (r *GenerateKeyResponse) UnmarshalJSON(data []byte) (err error)
type GenerateKeyResponseAllowedVectorStoreIndex ¶
type GenerateKeyResponseAllowedVectorStoreIndex struct {
IndexName string `json:"index_name,required"`
IndexPermissions []GenerateKeyResponseAllowedVectorStoreIndexesIndexPermission `json:"index_permissions,required"`
JSON generateKeyResponseAllowedVectorStoreIndexJSON `json:"-"`
}
func (*GenerateKeyResponseAllowedVectorStoreIndex) UnmarshalJSON ¶
func (r *GenerateKeyResponseAllowedVectorStoreIndex) UnmarshalJSON(data []byte) (err error)
type GenerateKeyResponseAllowedVectorStoreIndexesIndexPermission ¶
type GenerateKeyResponseAllowedVectorStoreIndexesIndexPermission string
const ( GenerateKeyResponseAllowedVectorStoreIndexesIndexPermissionRead GenerateKeyResponseAllowedVectorStoreIndexesIndexPermission = "read" GenerateKeyResponseAllowedVectorStoreIndexesIndexPermissionWrite GenerateKeyResponseAllowedVectorStoreIndexesIndexPermission = "write" )
func (GenerateKeyResponseAllowedVectorStoreIndexesIndexPermission) IsKnown ¶
func (r GenerateKeyResponseAllowedVectorStoreIndexesIndexPermission) IsKnown() bool
type GenerateKeyResponseObjectPermission ¶
type GenerateKeyResponseObjectPermission struct {
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON generateKeyResponseObjectPermissionJSON `json:"-"`
}
func (*GenerateKeyResponseObjectPermission) UnmarshalJSON ¶
func (r *GenerateKeyResponseObjectPermission) UnmarshalJSON(data []byte) (err error)
type GenerateKeyResponseRouterSettings ¶
type GenerateKeyResponseRouterSettings struct {
AllowedFails int64 `json:"allowed_fails,nullable"`
ContextWindowFallbacks []map[string]interface{} `json:"context_window_fallbacks,nullable"`
CooldownTime float64 `json:"cooldown_time,nullable"`
Fallbacks []map[string]interface{} `json:"fallbacks,nullable"`
MaxRetries int64 `json:"max_retries,nullable"`
ModelGroupAlias map[string]GenerateKeyResponseRouterSettingsModelGroupAliasUnion `json:"model_group_alias,nullable"`
ModelGroupRetryPolicy map[string]interface{} `json:"model_group_retry_policy,nullable"`
NumRetries int64 `json:"num_retries,nullable"`
RetryAfter float64 `json:"retry_after,nullable"`
RoutingStrategy string `json:"routing_strategy,nullable"`
RoutingStrategyArgs map[string]interface{} `json:"routing_strategy_args,nullable"`
Timeout float64 `json:"timeout,nullable"`
JSON generateKeyResponseRouterSettingsJSON `json:"-"`
}
Set of params that you can modify via `router.update_settings()`.
func (*GenerateKeyResponseRouterSettings) UnmarshalJSON ¶
func (r *GenerateKeyResponseRouterSettings) UnmarshalJSON(data []byte) (err error)
type GenerateKeyResponseRouterSettingsModelGroupAliasMap ¶
type GenerateKeyResponseRouterSettingsModelGroupAliasMap map[string]interface{}
func (GenerateKeyResponseRouterSettingsModelGroupAliasMap) ImplementsGenerateKeyResponseRouterSettingsModelGroupAliasUnion ¶
func (r GenerateKeyResponseRouterSettingsModelGroupAliasMap) ImplementsGenerateKeyResponseRouterSettingsModelGroupAliasUnion()
type GenerateKeyResponseRouterSettingsModelGroupAliasUnion ¶
type GenerateKeyResponseRouterSettingsModelGroupAliasUnion interface {
ImplementsGenerateKeyResponseRouterSettingsModelGroupAliasUnion()
}
Union satisfied by shared.UnionString or GenerateKeyResponseRouterSettingsModelGroupAliasMap.
type GenerateKeyResponseRpmLimitType ¶
type GenerateKeyResponseRpmLimitType string
const ( GenerateKeyResponseRpmLimitTypeGuaranteedThroughput GenerateKeyResponseRpmLimitType = "guaranteed_throughput" GenerateKeyResponseRpmLimitTypeBestEffortThroughput GenerateKeyResponseRpmLimitType = "best_effort_throughput" GenerateKeyResponseRpmLimitTypeDynamic GenerateKeyResponseRpmLimitType = "dynamic" )
func (GenerateKeyResponseRpmLimitType) IsKnown ¶
func (r GenerateKeyResponseRpmLimitType) IsKnown() bool
type GenerateKeyResponseTpmLimitType ¶
type GenerateKeyResponseTpmLimitType string
const ( GenerateKeyResponseTpmLimitTypeGuaranteedThroughput GenerateKeyResponseTpmLimitType = "guaranteed_throughput" GenerateKeyResponseTpmLimitTypeBestEffortThroughput GenerateKeyResponseTpmLimitType = "best_effort_throughput" GenerateKeyResponseTpmLimitTypeDynamic GenerateKeyResponseTpmLimitType = "dynamic" )
func (GenerateKeyResponseTpmLimitType) IsKnown ¶
func (r GenerateKeyResponseTpmLimitType) IsKnown() bool
type GetHomeResponse ¶
type GetHomeResponse = interface{}
type GlobalService ¶
type GlobalService struct {
Options []option.RequestOption
Spend *GlobalSpendService
}
GlobalService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGlobalService method instead.
func NewGlobalService ¶
func NewGlobalService(opts ...option.RequestOption) (r *GlobalService)
NewGlobalService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type GlobalSpendGetReportParams ¶
type GlobalSpendGetReportParams struct {
// View spend for a specific api_key. Example api_key='sk-1234
APIKey param.Field[string] `query:"api_key"`
// View spend for a specific customer_id. Example customer_id='1234. Can be used in
// conjunction with team_id as well.
CustomerID param.Field[string] `query:"customer_id"`
// Time till which to view spend
EndDate param.Field[string] `query:"end_date"`
// Group spend by internal team or customer or api_key
GroupBy param.Field[GlobalSpendGetReportParamsGroupBy] `query:"group_by"`
// View spend for a specific internal_user_id. Example internal_user_id='1234
InternalUserID param.Field[string] `query:"internal_user_id"`
// Time from which to start viewing spend
StartDate param.Field[string] `query:"start_date"`
// View spend for a specific team_id. Example team_id='1234
TeamID param.Field[string] `query:"team_id"`
}
func (GlobalSpendGetReportParams) URLQuery ¶
func (r GlobalSpendGetReportParams) URLQuery() (v url.Values)
URLQuery serializes GlobalSpendGetReportParams's query parameters as `url.Values`.
type GlobalSpendGetReportParamsGroupBy ¶
type GlobalSpendGetReportParamsGroupBy string
Group spend by internal team or customer or api_key
const ( GlobalSpendGetReportParamsGroupByTeam GlobalSpendGetReportParamsGroupBy = "team" GlobalSpendGetReportParamsGroupByCustomer GlobalSpendGetReportParamsGroupBy = "customer" GlobalSpendGetReportParamsGroupByAPIKey GlobalSpendGetReportParamsGroupBy = "api_key" )
func (GlobalSpendGetReportParamsGroupBy) IsKnown ¶
func (r GlobalSpendGetReportParamsGroupBy) IsKnown() bool
type GlobalSpendGetReportResponse ¶
type GlobalSpendGetReportResponse struct {
APIKey string `json:"api_key,required"`
CallType string `json:"call_type,required"`
EndTime GlobalSpendGetReportResponseEndTimeUnion `json:"endTime,required,nullable" format:"date-time"`
Messages GlobalSpendGetReportResponseMessagesUnion `json:"messages,required,nullable"`
RequestID string `json:"request_id,required"`
Response GlobalSpendGetReportResponseResponseUnion `json:"response,required,nullable"`
StartTime GlobalSpendGetReportResponseStartTimeUnion `json:"startTime,required,nullable" format:"date-time"`
APIBase string `json:"api_base,nullable"`
CacheHit string `json:"cache_hit,nullable"`
CacheKey string `json:"cache_key,nullable"`
CompletionTokens int64 `json:"completion_tokens,nullable"`
Metadata interface{} `json:"metadata"`
Model string `json:"model,nullable"`
PromptTokens int64 `json:"prompt_tokens,nullable"`
RequestTags interface{} `json:"request_tags"`
RequesterIPAddress string `json:"requester_ip_address,nullable"`
Spend float64 `json:"spend,nullable"`
TotalTokens int64 `json:"total_tokens,nullable"`
User string `json:"user,nullable"`
JSON globalSpendGetReportResponseJSON `json:"-"`
}
func (*GlobalSpendGetReportResponse) UnmarshalJSON ¶
func (r *GlobalSpendGetReportResponse) UnmarshalJSON(data []byte) (err error)
type GlobalSpendGetReportResponseEndTimeUnion ¶
type GlobalSpendGetReportResponseEndTimeUnion interface {
ImplementsGlobalSpendGetReportResponseEndTimeUnion()
}
Union satisfied by shared.UnionString or shared.UnionTime.
type GlobalSpendGetReportResponseMessagesArray ¶
type GlobalSpendGetReportResponseMessagesArray []interface{}
func (GlobalSpendGetReportResponseMessagesArray) ImplementsGlobalSpendGetReportResponseMessagesUnion ¶
func (r GlobalSpendGetReportResponseMessagesArray) ImplementsGlobalSpendGetReportResponseMessagesUnion()
type GlobalSpendGetReportResponseMessagesMap ¶
type GlobalSpendGetReportResponseMessagesMap map[string]interface{}
func (GlobalSpendGetReportResponseMessagesMap) ImplementsGlobalSpendGetReportResponseMessagesUnion ¶
func (r GlobalSpendGetReportResponseMessagesMap) ImplementsGlobalSpendGetReportResponseMessagesUnion()
type GlobalSpendGetReportResponseMessagesUnion ¶
type GlobalSpendGetReportResponseMessagesUnion interface {
ImplementsGlobalSpendGetReportResponseMessagesUnion()
}
Union satisfied by shared.UnionString, GlobalSpendGetReportResponseMessagesArray or GlobalSpendGetReportResponseMessagesMap.
type GlobalSpendGetReportResponseResponseArray ¶
type GlobalSpendGetReportResponseResponseArray []interface{}
func (GlobalSpendGetReportResponseResponseArray) ImplementsGlobalSpendGetReportResponseResponseUnion ¶
func (r GlobalSpendGetReportResponseResponseArray) ImplementsGlobalSpendGetReportResponseResponseUnion()
type GlobalSpendGetReportResponseResponseMap ¶
type GlobalSpendGetReportResponseResponseMap map[string]interface{}
func (GlobalSpendGetReportResponseResponseMap) ImplementsGlobalSpendGetReportResponseResponseUnion ¶
func (r GlobalSpendGetReportResponseResponseMap) ImplementsGlobalSpendGetReportResponseResponseUnion()
type GlobalSpendGetReportResponseResponseUnion ¶
type GlobalSpendGetReportResponseResponseUnion interface {
ImplementsGlobalSpendGetReportResponseResponseUnion()
}
Union satisfied by shared.UnionString, GlobalSpendGetReportResponseResponseArray or GlobalSpendGetReportResponseResponseMap.
type GlobalSpendGetReportResponseStartTimeUnion ¶
type GlobalSpendGetReportResponseStartTimeUnion interface {
ImplementsGlobalSpendGetReportResponseStartTimeUnion()
}
Union satisfied by shared.UnionString or shared.UnionTime.
type GlobalSpendListTagsParams ¶
type GlobalSpendListTagsParams struct {
// Time till which to view key spend
EndDate param.Field[string] `query:"end_date"`
// Time from which to start viewing key spend
StartDate param.Field[string] `query:"start_date"`
// comman separated tags to filter on
Tags param.Field[string] `query:"tags"`
}
func (GlobalSpendListTagsParams) URLQuery ¶
func (r GlobalSpendListTagsParams) URLQuery() (v url.Values)
URLQuery serializes GlobalSpendListTagsParams's query parameters as `url.Values`.
type GlobalSpendListTagsResponse ¶
type GlobalSpendListTagsResponse struct {
APIKey string `json:"api_key,required"`
CallType string `json:"call_type,required"`
EndTime GlobalSpendListTagsResponseEndTimeUnion `json:"endTime,required,nullable" format:"date-time"`
Messages GlobalSpendListTagsResponseMessagesUnion `json:"messages,required,nullable"`
RequestID string `json:"request_id,required"`
Response GlobalSpendListTagsResponseResponseUnion `json:"response,required,nullable"`
StartTime GlobalSpendListTagsResponseStartTimeUnion `json:"startTime,required,nullable" format:"date-time"`
APIBase string `json:"api_base,nullable"`
CacheHit string `json:"cache_hit,nullable"`
CacheKey string `json:"cache_key,nullable"`
CompletionTokens int64 `json:"completion_tokens,nullable"`
Metadata interface{} `json:"metadata"`
Model string `json:"model,nullable"`
PromptTokens int64 `json:"prompt_tokens,nullable"`
RequestTags interface{} `json:"request_tags"`
RequesterIPAddress string `json:"requester_ip_address,nullable"`
Spend float64 `json:"spend,nullable"`
TotalTokens int64 `json:"total_tokens,nullable"`
User string `json:"user,nullable"`
JSON globalSpendListTagsResponseJSON `json:"-"`
}
func (*GlobalSpendListTagsResponse) UnmarshalJSON ¶
func (r *GlobalSpendListTagsResponse) UnmarshalJSON(data []byte) (err error)
type GlobalSpendListTagsResponseEndTimeUnion ¶
type GlobalSpendListTagsResponseEndTimeUnion interface {
ImplementsGlobalSpendListTagsResponseEndTimeUnion()
}
Union satisfied by shared.UnionString or shared.UnionTime.
type GlobalSpendListTagsResponseMessagesArray ¶
type GlobalSpendListTagsResponseMessagesArray []interface{}
func (GlobalSpendListTagsResponseMessagesArray) ImplementsGlobalSpendListTagsResponseMessagesUnion ¶
func (r GlobalSpendListTagsResponseMessagesArray) ImplementsGlobalSpendListTagsResponseMessagesUnion()
type GlobalSpendListTagsResponseMessagesMap ¶
type GlobalSpendListTagsResponseMessagesMap map[string]interface{}
func (GlobalSpendListTagsResponseMessagesMap) ImplementsGlobalSpendListTagsResponseMessagesUnion ¶
func (r GlobalSpendListTagsResponseMessagesMap) ImplementsGlobalSpendListTagsResponseMessagesUnion()
type GlobalSpendListTagsResponseMessagesUnion ¶
type GlobalSpendListTagsResponseMessagesUnion interface {
ImplementsGlobalSpendListTagsResponseMessagesUnion()
}
Union satisfied by shared.UnionString, GlobalSpendListTagsResponseMessagesArray or GlobalSpendListTagsResponseMessagesMap.
type GlobalSpendListTagsResponseResponseArray ¶
type GlobalSpendListTagsResponseResponseArray []interface{}
func (GlobalSpendListTagsResponseResponseArray) ImplementsGlobalSpendListTagsResponseResponseUnion ¶
func (r GlobalSpendListTagsResponseResponseArray) ImplementsGlobalSpendListTagsResponseResponseUnion()
type GlobalSpendListTagsResponseResponseMap ¶
type GlobalSpendListTagsResponseResponseMap map[string]interface{}
func (GlobalSpendListTagsResponseResponseMap) ImplementsGlobalSpendListTagsResponseResponseUnion ¶
func (r GlobalSpendListTagsResponseResponseMap) ImplementsGlobalSpendListTagsResponseResponseUnion()
type GlobalSpendListTagsResponseResponseUnion ¶
type GlobalSpendListTagsResponseResponseUnion interface {
ImplementsGlobalSpendListTagsResponseResponseUnion()
}
Union satisfied by shared.UnionString, GlobalSpendListTagsResponseResponseArray or GlobalSpendListTagsResponseResponseMap.
type GlobalSpendListTagsResponseStartTimeUnion ¶
type GlobalSpendListTagsResponseStartTimeUnion interface {
ImplementsGlobalSpendListTagsResponseStartTimeUnion()
}
Union satisfied by shared.UnionString or shared.UnionTime.
type GlobalSpendResetResponse ¶
type GlobalSpendResetResponse = interface{}
type GlobalSpendService ¶
type GlobalSpendService struct {
Options []option.RequestOption
}
GlobalSpendService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGlobalSpendService method instead.
func NewGlobalSpendService ¶
func NewGlobalSpendService(opts ...option.RequestOption) (r *GlobalSpendService)
NewGlobalSpendService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GlobalSpendService) GetReport ¶
func (r *GlobalSpendService) GetReport(ctx context.Context, query GlobalSpendGetReportParams, opts ...option.RequestOption) (res *[]GlobalSpendGetReportResponse, err error)
Get Daily Spend per Team, based on specific startTime and endTime. Per team, view usage by each key, model [ { "group-by-day": "2024-05-10", "teams": [ { "team_name": "team-1" "spend": 10, "keys": [ "key": "1213", "usage": { "model-1": { "cost": 12.50, "input_tokens": 1000, "output_tokens": 5000, "requests": 100 }, "audio-modelname1": { "cost": 25.50, "seconds": 25, "requests": 50 }, } } ] ] }
func (*GlobalSpendService) ListTags ¶
func (r *GlobalSpendService) ListTags(ctx context.Context, query GlobalSpendListTagsParams, opts ...option.RequestOption) (res *[]GlobalSpendListTagsResponse, err error)
LiteLLM Enterprise - View Spend Per Request Tag. Used by LiteLLM UI
Example Request:
``` curl -X GET "http://0.0.0.0:4000/spend/tags" -H "Authorization: Bearer sk-1234" ```
Spend with Start Date and End Date ¶
``` curl -X GET "http://0.0.0.0:4000/spend/tags?start_date=2022-01-01&end_date=2022-02-01" -H "Authorization: Bearer sk-1234" ```
func (*GlobalSpendService) Reset ¶
func (r *GlobalSpendService) Reset(ctx context.Context, opts ...option.RequestOption) (res *GlobalSpendResetResponse, err error)
ADMIN ONLY / MASTER KEY Only Endpoint
Globally reset spend for All API Keys and Teams, maintain LiteLLM_SpendLogs
- LiteLLM_SpendLogs will maintain the logs on spend, no data gets deleted from there
- LiteLLM_VerificationTokens spend will be set = 0
- LiteLLM_TeamTable spend will be set = 0
type GuardrailListResponse ¶
type GuardrailListResponse struct {
Guardrails []GuardrailListResponseGuardrail `json:"guardrails,required"`
JSON guardrailListResponseJSON `json:"-"`
}
func (*GuardrailListResponse) UnmarshalJSON ¶
func (r *GuardrailListResponse) UnmarshalJSON(data []byte) (err error)
type GuardrailListResponseGuardrail ¶
type GuardrailListResponseGuardrail struct {
GuardrailName string `json:"guardrail_name,required"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
GuardrailDefinitionLocation GuardrailListResponseGuardrailsGuardrailDefinitionLocation `json:"guardrail_definition_location"`
GuardrailID string `json:"guardrail_id,nullable"`
GuardrailInfo map[string]interface{} `json:"guardrail_info,nullable"`
LitellmParams GuardrailListResponseGuardrailsLitellmParams `json:"litellm_params,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
JSON guardrailListResponseGuardrailJSON `json:"-"`
}
func (*GuardrailListResponseGuardrail) UnmarshalJSON ¶
func (r *GuardrailListResponseGuardrail) UnmarshalJSON(data []byte) (err error)
type GuardrailListResponseGuardrailsGuardrailDefinitionLocation ¶
type GuardrailListResponseGuardrailsGuardrailDefinitionLocation string
const ( GuardrailListResponseGuardrailsGuardrailDefinitionLocationDB GuardrailListResponseGuardrailsGuardrailDefinitionLocation = "db" GuardrailListResponseGuardrailsGuardrailDefinitionLocationConfig GuardrailListResponseGuardrailsGuardrailDefinitionLocation = "config" )
func (GuardrailListResponseGuardrailsGuardrailDefinitionLocation) IsKnown ¶
func (r GuardrailListResponseGuardrailsGuardrailDefinitionLocation) IsKnown() bool
type GuardrailListResponseGuardrailsLitellmParams ¶
type GuardrailListResponseGuardrailsLitellmParams struct {
// Additional provider-specific parameters for generic guardrail APIs
AdditionalProviderSpecificParams map[string]interface{} `json:"additional_provider_specific_params,nullable"`
// Base URL for the guardrail service API
APIBase string `json:"api_base,nullable"`
// Optional custom API endpoint for Model Armor
APIEndpoint string `json:"api_endpoint,nullable"`
// API key for the guardrail service
APIKey string `json:"api_key,nullable"`
// Threshold configuration for Lakera guardrail categories
CategoryThresholds GuardrailListResponseGuardrailsLitellmParamsCategoryThresholds `json:"category_thresholds,nullable"`
// Path to Google Cloud credentials JSON file or JSON string
Credentials string `json:"credentials,nullable"`
// Whether the guardrail is enabled by default
DefaultOn bool `json:"default_on,nullable"`
// Configuration for detect-secrets guardrail
DetectSecretsConfig map[string]interface{} `json:"detect_secrets_config,nullable"`
// When True, guardrails only receive the latest message for the relevant role
// (e.g., newest user input pre-call, newest assistant output post-call)
ExperimentalUseLatestRoleMessageOnly bool `json:"experimental_use_latest_role_message_only,nullable"`
// Whether to fail the request if Model Armor encounters an error
FailOnError bool `json:"fail_on_error,nullable"`
// Name of the guardrail in guardrails.ai
GuardName string `json:"guard_name,nullable"`
// Google Cloud location/region (e.g., us-central1)
Location string `json:"location,nullable"`
// Will mask request content if guardrail makes any changes
MaskRequestContent bool `json:"mask_request_content,nullable"`
// Will mask response content if guardrail makes any changes
MaskResponseContent bool `json:"mask_response_content,nullable"`
// Optional field if guardrail requires a 'model' parameter
Model string `json:"model,nullable"`
// Recipe for input (LLM request)
PangeaInputRecipe string `json:"pangea_input_recipe,nullable"`
// Recipe for output (LLM response)
PangeaOutputRecipe string `json:"pangea_output_recipe,nullable"`
// The ID of your Model Armor template
TemplateID string `json:"template_id,nullable"`
// Custom message when a guardrail blocks an action. Supports placeholders like
// {tool_name}, {rule_id}, and {default_message}.
ViolationMessageTemplate string `json:"violation_message_template,nullable"`
ExtraFields map[string]interface{} `json:"-,extras"`
JSON guardrailListResponseGuardrailsLitellmParamsJSON `json:"-"`
}
func (*GuardrailListResponseGuardrailsLitellmParams) UnmarshalJSON ¶
func (r *GuardrailListResponseGuardrailsLitellmParams) UnmarshalJSON(data []byte) (err error)
type GuardrailListResponseGuardrailsLitellmParamsCategoryThresholds ¶
type GuardrailListResponseGuardrailsLitellmParamsCategoryThresholds struct {
Jailbreak float64 `json:"jailbreak"`
PromptInjection float64 `json:"prompt_injection"`
ExtraFields map[string]interface{} `json:"-,extras"`
JSON guardrailListResponseGuardrailsLitellmParamsCategoryThresholdsJSON `json:"-"`
}
Threshold configuration for Lakera guardrail categories
func (*GuardrailListResponseGuardrailsLitellmParamsCategoryThresholds) UnmarshalJSON ¶
func (r *GuardrailListResponseGuardrailsLitellmParamsCategoryThresholds) UnmarshalJSON(data []byte) (err error)
type GuardrailService ¶
type GuardrailService struct {
Options []option.RequestOption
}
GuardrailService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewGuardrailService method instead.
func NewGuardrailService ¶
func NewGuardrailService(opts ...option.RequestOption) (r *GuardrailService)
NewGuardrailService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*GuardrailService) List ¶
func (r *GuardrailService) List(ctx context.Context, opts ...option.RequestOption) (res *GuardrailListResponse, err error)
List the guardrails that are available on the proxy server
👉 [Guardrail docs](https://docs.litellm.ai/docs/proxy/guardrails/quick_start)
Example Request:
```bash curl -X GET "http://localhost:4000/guardrails/list" -H "Authorization: Bearer <your_api_key>" ```
Example Response:
```json
{
"guardrails": [
{
"guardrail_name": "bedrock-pre-guard",
"guardrail_info": {
"params": [
{
"name": "toxicity_score",
"type": "float",
"description": "Score between 0-1 indicating content toxicity level"
},
{
"name": "pii_detection",
"type": "boolean"
}
]
}
}
]
}
```
type HealthCheckAllParams ¶
type HealthCheckAllParams struct {
// Specify the model name (optional)
Model param.Field[string] `query:"model"`
// Specify the model ID (optional)
ModelID param.Field[string] `query:"model_id"`
}
func (HealthCheckAllParams) URLQuery ¶
func (r HealthCheckAllParams) URLQuery() (v url.Values)
URLQuery serializes HealthCheckAllParams's query parameters as `url.Values`.
type HealthCheckAllResponse ¶
type HealthCheckAllResponse = interface{}
type HealthCheckLivelinessResponse ¶
type HealthCheckLivelinessResponse = interface{}
type HealthCheckLivenessResponse ¶
type HealthCheckLivenessResponse = interface{}
type HealthCheckReadinessResponse ¶
type HealthCheckReadinessResponse = interface{}
type HealthCheckServicesParams ¶
type HealthCheckServicesParams struct {
// Specify the service being hit.
Service param.Field[HealthCheckServicesParamsService] `query:"service,required"`
}
func (HealthCheckServicesParams) URLQuery ¶
func (r HealthCheckServicesParams) URLQuery() (v url.Values)
URLQuery serializes HealthCheckServicesParams's query parameters as `url.Values`.
type HealthCheckServicesParamsService ¶
type HealthCheckServicesParamsService string
Specify the service being hit.
const ( HealthCheckServicesParamsServiceSlackBudgetAlerts HealthCheckServicesParamsService = "slack_budget_alerts" HealthCheckServicesParamsServiceLangfuse HealthCheckServicesParamsService = "langfuse" HealthCheckServicesParamsServiceLangfuseOtel HealthCheckServicesParamsService = "langfuse_otel" HealthCheckServicesParamsServiceSlack HealthCheckServicesParamsService = "slack" HealthCheckServicesParamsServiceOpenmeter HealthCheckServicesParamsService = "openmeter" HealthCheckServicesParamsServiceWebhook HealthCheckServicesParamsService = "webhook" HealthCheckServicesParamsServiceEmail HealthCheckServicesParamsService = "email" HealthCheckServicesParamsServiceBraintrust HealthCheckServicesParamsService = "braintrust" HealthCheckServicesParamsServiceDatadog HealthCheckServicesParamsService = "datadog" HealthCheckServicesParamsServiceGenericAPI HealthCheckServicesParamsService = "generic_api" HealthCheckServicesParamsServiceArize HealthCheckServicesParamsService = "arize" HealthCheckServicesParamsServiceSqs HealthCheckServicesParamsService = "sqs" )
func (HealthCheckServicesParamsService) IsKnown ¶
func (r HealthCheckServicesParamsService) IsKnown() bool
type HealthCheckServicesResponse ¶
type HealthCheckServicesResponse = interface{}
type HealthService ¶
type HealthService struct {
Options []option.RequestOption
}
HealthService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewHealthService method instead.
func NewHealthService ¶
func NewHealthService(opts ...option.RequestOption) (r *HealthService)
NewHealthService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*HealthService) CheckAll ¶
func (r *HealthService) CheckAll(ctx context.Context, query HealthCheckAllParams, opts ...option.RequestOption) (res *HealthCheckAllResponse, err error)
🚨 USE `/health/liveliness` to health check the proxy 🚨
See more 👉 https://docs.litellm.ai/docs/proxy/health
Check the health of all the endpoints in config.yaml ¶
To run health checks in the background, add this to config.yaml:
``` general_settings:
# ... other settings background_health_checks: True
```
else, the health checks will be run on models when /health is called.
func (*HealthService) CheckLiveliness ¶
func (r *HealthService) CheckLiveliness(ctx context.Context, opts ...option.RequestOption) (res *HealthCheckLivelinessResponse, err error)
Unprotected endpoint for checking if worker is alive
func (*HealthService) CheckLiveness ¶
func (r *HealthService) CheckLiveness(ctx context.Context, opts ...option.RequestOption) (res *HealthCheckLivenessResponse, err error)
Unprotected endpoint for checking if worker is alive
func (*HealthService) CheckReadiness ¶
func (r *HealthService) CheckReadiness(ctx context.Context, opts ...option.RequestOption) (res *HealthCheckReadinessResponse, err error)
Unprotected endpoint for checking if worker can receive requests
func (*HealthService) CheckServices ¶
func (r *HealthService) CheckServices(ctx context.Context, query HealthCheckServicesParams, opts ...option.RequestOption) (res *HealthCheckServicesResponse, err error)
Use this admin-only endpoint to check if the service is healthy.
Example:
``` curl -L -X GET 'http://0.0.0.0:4000/health/services?service=datadog' -H 'Authorization: Bearer sk-1234' ```
type IPAddressParam ¶
func (IPAddressParam) MarshalJSON ¶
func (r IPAddressParam) MarshalJSON() (data []byte, err error)
type ImageGenerationNewParams ¶
func (ImageGenerationNewParams) URLQuery ¶
func (r ImageGenerationNewParams) URLQuery() (v url.Values)
URLQuery serializes ImageGenerationNewParams's query parameters as `url.Values`.
type ImageGenerationNewResponse ¶
type ImageGenerationNewResponse = interface{}
type ImageGenerationService ¶
type ImageGenerationService struct {
Options []option.RequestOption
}
ImageGenerationService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewImageGenerationService method instead.
func NewImageGenerationService ¶
func NewImageGenerationService(opts ...option.RequestOption) (r *ImageGenerationService)
NewImageGenerationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ImageGenerationService) New ¶
func (r *ImageGenerationService) New(ctx context.Context, body ImageGenerationNewParams, opts ...option.RequestOption) (res *ImageGenerationNewResponse, err error)
Image Generation
type ImageService ¶
type ImageService struct {
Options []option.RequestOption
Generations *ImageGenerationService
}
ImageService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewImageService method instead.
func NewImageService ¶
func NewImageService(opts ...option.RequestOption) (r *ImageService)
NewImageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type KeyBlockParams ¶
type KeyBlockParams struct {
BlockKeyRequest BlockKeyRequestParam `json:"block_key_request,required"`
// The litellm-changed-by header enables tracking of actions performed by
// authorized users on behalf of other users, providing an audit trail for
// accountability
LitellmChangedBy param.Field[string] `header:"litellm-changed-by"`
}
func (KeyBlockParams) MarshalJSON ¶
func (r KeyBlockParams) MarshalJSON() (data []byte, err error)
type KeyBlockResponse ¶
type KeyBlockResponse struct {
Token string `json:"token,nullable"`
Aliases map[string]interface{} `json:"aliases"`
AllowedCacheControls []interface{} `json:"allowed_cache_controls,nullable"`
AllowedRoutes []interface{} `json:"allowed_routes,nullable"`
AutoRotate bool `json:"auto_rotate,nullable"`
Blocked bool `json:"blocked,nullable"`
BudgetDuration string `json:"budget_duration,nullable"`
BudgetResetAt time.Time `json:"budget_reset_at,nullable" format:"date-time"`
Config map[string]interface{} `json:"config"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
CreatedBy string `json:"created_by,nullable"`
Expires KeyBlockResponseExpiresUnion `json:"expires,nullable" format:"date-time"`
KeyAlias string `json:"key_alias,nullable"`
KeyName string `json:"key_name,nullable"`
KeyRotationAt time.Time `json:"key_rotation_at,nullable" format:"date-time"`
LastRotationAt time.Time `json:"last_rotation_at,nullable" format:"date-time"`
LitellmBudgetTable map[string]interface{} `json:"litellm_budget_table,nullable"`
MaxBudget float64 `json:"max_budget,nullable"`
MaxParallelRequests int64 `json:"max_parallel_requests,nullable"`
Metadata map[string]interface{} `json:"metadata"`
ModelMaxBudget map[string]interface{} `json:"model_max_budget"`
ModelSpend map[string]interface{} `json:"model_spend"`
Models []interface{} `json:"models"`
// Represents a LiteLLM_ObjectPermissionTable record
ObjectPermission KeyBlockResponseObjectPermission `json:"object_permission,nullable"`
ObjectPermissionID string `json:"object_permission_id,nullable"`
OrgID string `json:"org_id,nullable"`
Permissions map[string]interface{} `json:"permissions"`
RotationCount int64 `json:"rotation_count,nullable"`
RotationInterval string `json:"rotation_interval,nullable"`
RouterSettings map[string]interface{} `json:"router_settings,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
SoftBudgetCooldown bool `json:"soft_budget_cooldown"`
Spend float64 `json:"spend"`
TeamID string `json:"team_id,nullable"`
TpmLimit int64 `json:"tpm_limit,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
UpdatedBy string `json:"updated_by,nullable"`
UserID string `json:"user_id,nullable"`
JSON keyBlockResponseJSON `json:"-"`
}
func (*KeyBlockResponse) UnmarshalJSON ¶
func (r *KeyBlockResponse) UnmarshalJSON(data []byte) (err error)
type KeyBlockResponseExpiresUnion ¶
type KeyBlockResponseExpiresUnion interface {
ImplementsKeyBlockResponseExpiresUnion()
}
Union satisfied by shared.UnionString or shared.UnionTime.
type KeyBlockResponseObjectPermission ¶
type KeyBlockResponseObjectPermission struct {
ObjectPermissionID string `json:"object_permission_id,required"`
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON keyBlockResponseObjectPermissionJSON `json:"-"`
}
Represents a LiteLLM_ObjectPermissionTable record
func (*KeyBlockResponseObjectPermission) UnmarshalJSON ¶
func (r *KeyBlockResponseObjectPermission) UnmarshalJSON(data []byte) (err error)
type KeyCheckHealthResponse ¶
type KeyCheckHealthResponse struct {
Key KeyCheckHealthResponseKey `json:"key"`
LoggingCallbacks KeyCheckHealthResponseLoggingCallbacks `json:"logging_callbacks,nullable"`
JSON keyCheckHealthResponseJSON `json:"-"`
}
func (*KeyCheckHealthResponse) UnmarshalJSON ¶
func (r *KeyCheckHealthResponse) UnmarshalJSON(data []byte) (err error)
type KeyCheckHealthResponseKey ¶
type KeyCheckHealthResponseKey string
const ( KeyCheckHealthResponseKeyHealthy KeyCheckHealthResponseKey = "healthy" KeyCheckHealthResponseKeyUnhealthy KeyCheckHealthResponseKey = "unhealthy" )
func (KeyCheckHealthResponseKey) IsKnown ¶
func (r KeyCheckHealthResponseKey) IsKnown() bool
type KeyCheckHealthResponseLoggingCallbacks ¶
type KeyCheckHealthResponseLoggingCallbacks struct {
Callbacks []string `json:"callbacks"`
Details string `json:"details,nullable"`
Status KeyCheckHealthResponseLoggingCallbacksStatus `json:"status"`
JSON keyCheckHealthResponseLoggingCallbacksJSON `json:"-"`
}
func (*KeyCheckHealthResponseLoggingCallbacks) UnmarshalJSON ¶
func (r *KeyCheckHealthResponseLoggingCallbacks) UnmarshalJSON(data []byte) (err error)
type KeyCheckHealthResponseLoggingCallbacksStatus ¶
type KeyCheckHealthResponseLoggingCallbacksStatus string
const ( KeyCheckHealthResponseLoggingCallbacksStatusHealthy KeyCheckHealthResponseLoggingCallbacksStatus = "healthy" KeyCheckHealthResponseLoggingCallbacksStatusUnhealthy KeyCheckHealthResponseLoggingCallbacksStatus = "unhealthy" )
func (KeyCheckHealthResponseLoggingCallbacksStatus) IsKnown ¶
func (r KeyCheckHealthResponseLoggingCallbacksStatus) IsKnown() bool
type KeyDeleteParams ¶
type KeyDeleteParams struct {
KeyAliases param.Field[[]string] `json:"key_aliases"`
Keys param.Field[[]string] `json:"keys"`
// The litellm-changed-by header enables tracking of actions performed by
// authorized users on behalf of other users, providing an audit trail for
// accountability
LitellmChangedBy param.Field[string] `header:"litellm-changed-by"`
}
func (KeyDeleteParams) MarshalJSON ¶
func (r KeyDeleteParams) MarshalJSON() (data []byte, err error)
type KeyDeleteResponse ¶
type KeyDeleteResponse = interface{}
type KeyGenerateParams ¶
type KeyGenerateParams struct {
Aliases param.Field[map[string]interface{}] `json:"aliases"`
AllowedCacheControls param.Field[[]interface{}] `json:"allowed_cache_controls"`
AllowedPassthroughRoutes param.Field[[]interface{}] `json:"allowed_passthrough_routes"`
AllowedRoutes param.Field[[]interface{}] `json:"allowed_routes"`
AllowedVectorStoreIndexes param.Field[[]KeyGenerateParamsAllowedVectorStoreIndex] `json:"allowed_vector_store_indexes"`
// Whether this key should be automatically rotated
AutoRotate param.Field[bool] `json:"auto_rotate"`
Blocked param.Field[bool] `json:"blocked"`
BudgetDuration param.Field[string] `json:"budget_duration"`
BudgetID param.Field[string] `json:"budget_id"`
Config param.Field[map[string]interface{}] `json:"config"`
Duration param.Field[string] `json:"duration"`
EnforcedParams param.Field[[]string] `json:"enforced_params"`
Guardrails param.Field[[]string] `json:"guardrails"`
Key param.Field[string] `json:"key"`
KeyAlias param.Field[string] `json:"key_alias"`
// Enum for key types that determine what routes a key can access
KeyType param.Field[KeyGenerateParamsKeyType] `json:"key_type"`
MaxBudget param.Field[float64] `json:"max_budget"`
MaxParallelRequests param.Field[int64] `json:"max_parallel_requests"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
ModelMaxBudget param.Field[map[string]interface{}] `json:"model_max_budget"`
ModelRpmLimit param.Field[map[string]interface{}] `json:"model_rpm_limit"`
ModelTpmLimit param.Field[map[string]interface{}] `json:"model_tpm_limit"`
Models param.Field[[]interface{}] `json:"models"`
ObjectPermission param.Field[KeyGenerateParamsObjectPermission] `json:"object_permission"`
OrganizationID param.Field[string] `json:"organization_id"`
Permissions param.Field[map[string]interface{}] `json:"permissions"`
Prompts param.Field[[]string] `json:"prompts"`
// How often to rotate this key (e.g., '30d', '90d'). Required if auto_rotate=True
RotationInterval param.Field[string] `json:"rotation_interval"`
// Set of params that you can modify via `router.update_settings()`.
RouterSettings param.Field[KeyGenerateParamsRouterSettings] `json:"router_settings"`
RpmLimit param.Field[int64] `json:"rpm_limit"`
RpmLimitType param.Field[KeyGenerateParamsRpmLimitType] `json:"rpm_limit_type"`
SendInviteEmail param.Field[bool] `json:"send_invite_email"`
SoftBudget param.Field[float64] `json:"soft_budget"`
Spend param.Field[float64] `json:"spend"`
Tags param.Field[[]string] `json:"tags"`
TeamID param.Field[string] `json:"team_id"`
TpmLimit param.Field[int64] `json:"tpm_limit"`
TpmLimitType param.Field[KeyGenerateParamsTpmLimitType] `json:"tpm_limit_type"`
UserID param.Field[string] `json:"user_id"`
// The litellm-changed-by header enables tracking of actions performed by
// authorized users on behalf of other users, providing an audit trail for
// accountability
LitellmChangedBy param.Field[string] `header:"litellm-changed-by"`
}
func (KeyGenerateParams) MarshalJSON ¶
func (r KeyGenerateParams) MarshalJSON() (data []byte, err error)
type KeyGenerateParamsAllowedVectorStoreIndex ¶
type KeyGenerateParamsAllowedVectorStoreIndex struct {
IndexName param.Field[string] `json:"index_name,required"`
IndexPermissions param.Field[[]KeyGenerateParamsAllowedVectorStoreIndexesIndexPermission] `json:"index_permissions,required"`
}
func (KeyGenerateParamsAllowedVectorStoreIndex) MarshalJSON ¶
func (r KeyGenerateParamsAllowedVectorStoreIndex) MarshalJSON() (data []byte, err error)
type KeyGenerateParamsAllowedVectorStoreIndexesIndexPermission ¶
type KeyGenerateParamsAllowedVectorStoreIndexesIndexPermission string
const ( KeyGenerateParamsAllowedVectorStoreIndexesIndexPermissionRead KeyGenerateParamsAllowedVectorStoreIndexesIndexPermission = "read" KeyGenerateParamsAllowedVectorStoreIndexesIndexPermissionWrite KeyGenerateParamsAllowedVectorStoreIndexesIndexPermission = "write" )
func (KeyGenerateParamsAllowedVectorStoreIndexesIndexPermission) IsKnown ¶
func (r KeyGenerateParamsAllowedVectorStoreIndexesIndexPermission) IsKnown() bool
type KeyGenerateParamsKeyType ¶
type KeyGenerateParamsKeyType string
Enum for key types that determine what routes a key can access
const ( KeyGenerateParamsKeyTypeLlmAPI KeyGenerateParamsKeyType = "llm_api" KeyGenerateParamsKeyTypeManagement KeyGenerateParamsKeyType = "management" KeyGenerateParamsKeyTypeReadOnly KeyGenerateParamsKeyType = "read_only" KeyGenerateParamsKeyTypeDefault KeyGenerateParamsKeyType = "default" )
func (KeyGenerateParamsKeyType) IsKnown ¶
func (r KeyGenerateParamsKeyType) IsKnown() bool
type KeyGenerateParamsObjectPermission ¶
type KeyGenerateParamsObjectPermission struct {
AgentAccessGroups param.Field[[]string] `json:"agent_access_groups"`
Agents param.Field[[]string] `json:"agents"`
McpAccessGroups param.Field[[]string] `json:"mcp_access_groups"`
McpServers param.Field[[]string] `json:"mcp_servers"`
McpToolPermissions param.Field[map[string][]string] `json:"mcp_tool_permissions"`
VectorStores param.Field[[]string] `json:"vector_stores"`
}
func (KeyGenerateParamsObjectPermission) MarshalJSON ¶
func (r KeyGenerateParamsObjectPermission) MarshalJSON() (data []byte, err error)
type KeyGenerateParamsRouterSettings ¶
type KeyGenerateParamsRouterSettings struct {
AllowedFails param.Field[int64] `json:"allowed_fails"`
ContextWindowFallbacks param.Field[[]map[string]interface{}] `json:"context_window_fallbacks"`
CooldownTime param.Field[float64] `json:"cooldown_time"`
Fallbacks param.Field[[]map[string]interface{}] `json:"fallbacks"`
MaxRetries param.Field[int64] `json:"max_retries"`
ModelGroupAlias param.Field[map[string]KeyGenerateParamsRouterSettingsModelGroupAliasUnion] `json:"model_group_alias"`
ModelGroupRetryPolicy param.Field[map[string]interface{}] `json:"model_group_retry_policy"`
NumRetries param.Field[int64] `json:"num_retries"`
RetryAfter param.Field[float64] `json:"retry_after"`
RoutingStrategy param.Field[string] `json:"routing_strategy"`
RoutingStrategyArgs param.Field[map[string]interface{}] `json:"routing_strategy_args"`
Timeout param.Field[float64] `json:"timeout"`
}
Set of params that you can modify via `router.update_settings()`.
func (KeyGenerateParamsRouterSettings) MarshalJSON ¶
func (r KeyGenerateParamsRouterSettings) MarshalJSON() (data []byte, err error)
type KeyGenerateParamsRouterSettingsModelGroupAliasMap ¶
type KeyGenerateParamsRouterSettingsModelGroupAliasMap map[string]interface{}
func (KeyGenerateParamsRouterSettingsModelGroupAliasMap) ImplementsKeyGenerateParamsRouterSettingsModelGroupAliasUnion ¶
func (r KeyGenerateParamsRouterSettingsModelGroupAliasMap) ImplementsKeyGenerateParamsRouterSettingsModelGroupAliasUnion()
type KeyGenerateParamsRouterSettingsModelGroupAliasUnion ¶
type KeyGenerateParamsRouterSettingsModelGroupAliasUnion interface {
ImplementsKeyGenerateParamsRouterSettingsModelGroupAliasUnion()
}
Satisfied by shared.UnionString, KeyGenerateParamsRouterSettingsModelGroupAliasMap.
type KeyGenerateParamsRpmLimitType ¶
type KeyGenerateParamsRpmLimitType string
const ( KeyGenerateParamsRpmLimitTypeGuaranteedThroughput KeyGenerateParamsRpmLimitType = "guaranteed_throughput" KeyGenerateParamsRpmLimitTypeBestEffortThroughput KeyGenerateParamsRpmLimitType = "best_effort_throughput" KeyGenerateParamsRpmLimitTypeDynamic KeyGenerateParamsRpmLimitType = "dynamic" )
func (KeyGenerateParamsRpmLimitType) IsKnown ¶
func (r KeyGenerateParamsRpmLimitType) IsKnown() bool
type KeyGenerateParamsTpmLimitType ¶
type KeyGenerateParamsTpmLimitType string
const ( KeyGenerateParamsTpmLimitTypeGuaranteedThroughput KeyGenerateParamsTpmLimitType = "guaranteed_throughput" KeyGenerateParamsTpmLimitTypeBestEffortThroughput KeyGenerateParamsTpmLimitType = "best_effort_throughput" KeyGenerateParamsTpmLimitTypeDynamic KeyGenerateParamsTpmLimitType = "dynamic" )
func (KeyGenerateParamsTpmLimitType) IsKnown ¶
func (r KeyGenerateParamsTpmLimitType) IsKnown() bool
type KeyGetInfoParams ¶
type KeyGetInfoParams struct {
// Key in the request parameters
Key param.Field[string] `query:"key"`
}
func (KeyGetInfoParams) URLQuery ¶
func (r KeyGetInfoParams) URLQuery() (v url.Values)
URLQuery serializes KeyGetInfoParams's query parameters as `url.Values`.
type KeyGetInfoResponse ¶
type KeyGetInfoResponse = interface{}
type KeyListParams ¶
type KeyListParams struct {
// Expand related objects (e.g. 'user')
Expand param.Field[[]string] `query:"expand"`
// Include keys created by the user
IncludeCreatedByKeys param.Field[bool] `query:"include_created_by_keys"`
// Include all keys for teams that user is an admin of.
IncludeTeamKeys param.Field[bool] `query:"include_team_keys"`
// Filter keys by key alias
KeyAlias param.Field[string] `query:"key_alias"`
// Filter keys by key hash
KeyHash param.Field[string] `query:"key_hash"`
// Filter keys by organization ID
OrganizationID param.Field[string] `query:"organization_id"`
// Page number
Page param.Field[int64] `query:"page"`
// Return full key object
ReturnFullObject param.Field[bool] `query:"return_full_object"`
// Page size
Size param.Field[int64] `query:"size"`
// Column to sort by (e.g. 'user_id', 'created_at', 'spend')
SortBy param.Field[string] `query:"sort_by"`
// Sort order ('asc' or 'desc')
SortOrder param.Field[string] `query:"sort_order"`
// Filter by status (e.g. 'deleted')
Status param.Field[string] `query:"status"`
// Filter keys by team ID
TeamID param.Field[string] `query:"team_id"`
// Filter keys by user ID
UserID param.Field[string] `query:"user_id"`
}
func (KeyListParams) URLQuery ¶
func (r KeyListParams) URLQuery() (v url.Values)
URLQuery serializes KeyListParams's query parameters as `url.Values`.
type KeyListResponse ¶
type KeyListResponse struct {
CurrentPage int64 `json:"current_page,nullable"`
Keys []KeyListResponseKeysUnion `json:"keys"`
TotalCount int64 `json:"total_count,nullable"`
TotalPages int64 `json:"total_pages,nullable"`
JSON keyListResponseJSON `json:"-"`
}
func (*KeyListResponse) UnmarshalJSON ¶
func (r *KeyListResponse) UnmarshalJSON(data []byte) (err error)
type KeyListResponseKeysLiteLlmDeletedVerificationToken ¶
type KeyListResponseKeysLiteLlmDeletedVerificationToken struct {
ID string `json:"id,nullable"`
Token string `json:"token,nullable"`
Aliases map[string]interface{} `json:"aliases"`
AllowedCacheControls []interface{} `json:"allowed_cache_controls,nullable"`
AllowedRoutes []interface{} `json:"allowed_routes,nullable"`
AutoRotate bool `json:"auto_rotate,nullable"`
Blocked bool `json:"blocked,nullable"`
BudgetDuration string `json:"budget_duration,nullable"`
BudgetResetAt time.Time `json:"budget_reset_at,nullable" format:"date-time"`
Config map[string]interface{} `json:"config"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
CreatedBy string `json:"created_by,nullable"`
DeletedAt time.Time `json:"deleted_at,nullable" format:"date-time"`
DeletedBy string `json:"deleted_by,nullable"`
DeletedByAPIKey string `json:"deleted_by_api_key,nullable"`
Expires KeyListResponseKeysLiteLlmDeletedVerificationTokenExpiresUnion `json:"expires,nullable" format:"date-time"`
KeyAlias string `json:"key_alias,nullable"`
KeyName string `json:"key_name,nullable"`
KeyRotationAt time.Time `json:"key_rotation_at,nullable" format:"date-time"`
LastRotationAt time.Time `json:"last_rotation_at,nullable" format:"date-time"`
LitellmBudgetTable map[string]interface{} `json:"litellm_budget_table,nullable"`
LitellmChangedBy string `json:"litellm_changed_by,nullable"`
MaxBudget float64 `json:"max_budget,nullable"`
MaxParallelRequests int64 `json:"max_parallel_requests,nullable"`
Metadata map[string]interface{} `json:"metadata"`
ModelMaxBudget map[string]interface{} `json:"model_max_budget"`
ModelSpend map[string]interface{} `json:"model_spend"`
Models []interface{} `json:"models"`
// Represents a LiteLLM_ObjectPermissionTable record
ObjectPermission KeyListResponseKeysLiteLlmDeletedVerificationTokenObjectPermission `json:"object_permission,nullable"`
ObjectPermissionID string `json:"object_permission_id,nullable"`
OrgID string `json:"org_id,nullable"`
Permissions map[string]interface{} `json:"permissions"`
RotationCount int64 `json:"rotation_count,nullable"`
RotationInterval string `json:"rotation_interval,nullable"`
RouterSettings map[string]interface{} `json:"router_settings,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
SoftBudgetCooldown bool `json:"soft_budget_cooldown"`
Spend float64 `json:"spend"`
TeamID string `json:"team_id,nullable"`
TpmLimit int64 `json:"tpm_limit,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
UpdatedBy string `json:"updated_by,nullable"`
UserID string `json:"user_id,nullable"`
JSON keyListResponseKeysLiteLlmDeletedVerificationTokenJSON `json:"-"`
}
Recording of deleted keys for audit purposes. Mirrors LiteLLM_VerificationToken plus metadata captured at deletion time.
func (KeyListResponseKeysLiteLlmDeletedVerificationToken) ImplementsKeyListResponseKeysUnion ¶
func (r KeyListResponseKeysLiteLlmDeletedVerificationToken) ImplementsKeyListResponseKeysUnion()
func (*KeyListResponseKeysLiteLlmDeletedVerificationToken) UnmarshalJSON ¶
func (r *KeyListResponseKeysLiteLlmDeletedVerificationToken) UnmarshalJSON(data []byte) (err error)
type KeyListResponseKeysLiteLlmDeletedVerificationTokenExpiresUnion ¶
type KeyListResponseKeysLiteLlmDeletedVerificationTokenExpiresUnion interface {
ImplementsKeyListResponseKeysLiteLlmDeletedVerificationTokenExpiresUnion()
}
Union satisfied by shared.UnionString or shared.UnionTime.
type KeyListResponseKeysLiteLlmDeletedVerificationTokenObjectPermission ¶
type KeyListResponseKeysLiteLlmDeletedVerificationTokenObjectPermission struct {
ObjectPermissionID string `json:"object_permission_id,required"`
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON keyListResponseKeysLiteLlmDeletedVerificationTokenObjectPermissionJSON `json:"-"`
}
Represents a LiteLLM_ObjectPermissionTable record
func (*KeyListResponseKeysLiteLlmDeletedVerificationTokenObjectPermission) UnmarshalJSON ¶
func (r *KeyListResponseKeysLiteLlmDeletedVerificationTokenObjectPermission) UnmarshalJSON(data []byte) (err error)
type KeyListResponseKeysUnion ¶
type KeyListResponseKeysUnion interface {
ImplementsKeyListResponseKeysUnion()
}
Return the row in the db
Union satisfied by shared.UnionString, KeyListResponseKeysUserAPIKeyAuth or KeyListResponseKeysLiteLlmDeletedVerificationToken.
type KeyListResponseKeysUserAPIKeyAuth ¶
type KeyListResponseKeysUserAPIKeyAuth struct {
Token string `json:"token,nullable"`
Aliases map[string]interface{} `json:"aliases"`
AllowedCacheControls []interface{} `json:"allowed_cache_controls,nullable"`
AllowedModelRegion KeyListResponseKeysUserAPIKeyAuthAllowedModelRegion `json:"allowed_model_region,nullable"`
AllowedRoutes []interface{} `json:"allowed_routes,nullable"`
APIKey string `json:"api_key,nullable"`
AutoRotate bool `json:"auto_rotate,nullable"`
Blocked bool `json:"blocked,nullable"`
BudgetDuration string `json:"budget_duration,nullable"`
BudgetResetAt time.Time `json:"budget_reset_at,nullable" format:"date-time"`
Config map[string]interface{} `json:"config"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
CreatedBy string `json:"created_by,nullable"`
EndUserID string `json:"end_user_id,nullable"`
EndUserMaxBudget float64 `json:"end_user_max_budget,nullable"`
EndUserRpmLimit int64 `json:"end_user_rpm_limit,nullable"`
EndUserTpmLimit int64 `json:"end_user_tpm_limit,nullable"`
Expires KeyListResponseKeysUserAPIKeyAuthExpiresUnion `json:"expires,nullable" format:"date-time"`
KeyAlias string `json:"key_alias,nullable"`
KeyName string `json:"key_name,nullable"`
KeyRotationAt time.Time `json:"key_rotation_at,nullable" format:"date-time"`
LastRefreshedAt float64 `json:"last_refreshed_at,nullable"`
LastRotationAt time.Time `json:"last_rotation_at,nullable" format:"date-time"`
LitellmBudgetTable map[string]interface{} `json:"litellm_budget_table,nullable"`
MaxBudget float64 `json:"max_budget,nullable"`
MaxParallelRequests int64 `json:"max_parallel_requests,nullable"`
Metadata map[string]interface{} `json:"metadata"`
ModelMaxBudget map[string]interface{} `json:"model_max_budget"`
ModelSpend map[string]interface{} `json:"model_spend"`
Models []interface{} `json:"models"`
// Represents a LiteLLM_ObjectPermissionTable record
ObjectPermission KeyListResponseKeysUserAPIKeyAuthObjectPermission `json:"object_permission,nullable"`
ObjectPermissionID string `json:"object_permission_id,nullable"`
OrgID string `json:"org_id,nullable"`
OrganizationMaxBudget float64 `json:"organization_max_budget,nullable"`
OrganizationMetadata map[string]interface{} `json:"organization_metadata,nullable"`
OrganizationRpmLimit int64 `json:"organization_rpm_limit,nullable"`
OrganizationTpmLimit int64 `json:"organization_tpm_limit,nullable"`
ParentOtelSpan interface{} `json:"parent_otel_span"`
Permissions map[string]interface{} `json:"permissions"`
RequestRoute string `json:"request_route,nullable"`
RotationCount int64 `json:"rotation_count,nullable"`
RotationInterval string `json:"rotation_interval,nullable"`
RouterSettings map[string]interface{} `json:"router_settings,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
RpmLimitPerModel map[string]int64 `json:"rpm_limit_per_model,nullable"`
SoftBudget float64 `json:"soft_budget,nullable"`
SoftBudgetCooldown bool `json:"soft_budget_cooldown"`
Spend float64 `json:"spend"`
TeamAlias string `json:"team_alias,nullable"`
TeamBlocked bool `json:"team_blocked"`
TeamID string `json:"team_id,nullable"`
TeamMaxBudget float64 `json:"team_max_budget,nullable"`
TeamMember Member `json:"team_member,nullable"`
TeamMemberRpmLimit int64 `json:"team_member_rpm_limit,nullable"`
TeamMemberSpend float64 `json:"team_member_spend,nullable"`
TeamMemberTpmLimit int64 `json:"team_member_tpm_limit,nullable"`
TeamMetadata map[string]interface{} `json:"team_metadata,nullable"`
TeamModelAliases map[string]interface{} `json:"team_model_aliases,nullable"`
TeamModels []interface{} `json:"team_models"`
TeamObjectPermissionID string `json:"team_object_permission_id,nullable"`
TeamRpmLimit int64 `json:"team_rpm_limit,nullable"`
TeamSpend float64 `json:"team_spend,nullable"`
TeamTpmLimit int64 `json:"team_tpm_limit,nullable"`
TpmLimit int64 `json:"tpm_limit,nullable"`
TpmLimitPerModel map[string]int64 `json:"tpm_limit_per_model,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
UpdatedBy string `json:"updated_by,nullable"`
User interface{} `json:"user"`
UserEmail string `json:"user_email,nullable"`
UserID string `json:"user_id,nullable"`
UserMaxBudget float64 `json:"user_max_budget,nullable"`
// Admin Roles: PROXY_ADMIN: admin over the platform PROXY_ADMIN_VIEW_ONLY: can
// login, view all own keys, view all spend ORG_ADMIN: admin over a specific
// organization, can create teams, users only within their organization
//
// Internal User Roles: INTERNAL_USER: can login, view/create/delete their own
// keys, view their spend INTERNAL_USER_VIEW_ONLY: can login, view their own keys,
// view their own spend
//
// Team Roles: TEAM: used for JWT auth
//
// Customer Roles: CUSTOMER: External users -> these are customers
UserRole UserRoles `json:"user_role,nullable"`
UserRpmLimit int64 `json:"user_rpm_limit,nullable"`
UserSpend float64 `json:"user_spend,nullable"`
UserTpmLimit int64 `json:"user_tpm_limit,nullable"`
JSON keyListResponseKeysUserAPIKeyAuthJSON `json:"-"`
}
Return the row in the db
func (KeyListResponseKeysUserAPIKeyAuth) ImplementsKeyListResponseKeysUnion ¶
func (r KeyListResponseKeysUserAPIKeyAuth) ImplementsKeyListResponseKeysUnion()
func (*KeyListResponseKeysUserAPIKeyAuth) UnmarshalJSON ¶
func (r *KeyListResponseKeysUserAPIKeyAuth) UnmarshalJSON(data []byte) (err error)
type KeyListResponseKeysUserAPIKeyAuthAllowedModelRegion ¶
type KeyListResponseKeysUserAPIKeyAuthAllowedModelRegion string
const ( KeyListResponseKeysUserAPIKeyAuthAllowedModelRegionEu KeyListResponseKeysUserAPIKeyAuthAllowedModelRegion = "eu" KeyListResponseKeysUserAPIKeyAuthAllowedModelRegionUs KeyListResponseKeysUserAPIKeyAuthAllowedModelRegion = "us" )
func (KeyListResponseKeysUserAPIKeyAuthAllowedModelRegion) IsKnown ¶
func (r KeyListResponseKeysUserAPIKeyAuthAllowedModelRegion) IsKnown() bool
type KeyListResponseKeysUserAPIKeyAuthExpiresUnion ¶
type KeyListResponseKeysUserAPIKeyAuthExpiresUnion interface {
ImplementsKeyListResponseKeysUserAPIKeyAuthExpiresUnion()
}
Union satisfied by shared.UnionString or shared.UnionTime.
type KeyListResponseKeysUserAPIKeyAuthObjectPermission ¶
type KeyListResponseKeysUserAPIKeyAuthObjectPermission struct {
ObjectPermissionID string `json:"object_permission_id,required"`
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON keyListResponseKeysUserAPIKeyAuthObjectPermissionJSON `json:"-"`
}
Represents a LiteLLM_ObjectPermissionTable record
func (*KeyListResponseKeysUserAPIKeyAuthObjectPermission) UnmarshalJSON ¶
func (r *KeyListResponseKeysUserAPIKeyAuthObjectPermission) UnmarshalJSON(data []byte) (err error)
type KeyRegenerateByKeyParams ¶
type KeyRegenerateByKeyParams struct {
RegenerateKeyRequest RegenerateKeyRequestParam `json:"regenerate_key_request"`
// The litellm-changed-by header enables tracking of actions performed by
// authorized users on behalf of other users, providing an audit trail for
// accountability
LitellmChangedBy param.Field[string] `header:"litellm-changed-by"`
}
func (KeyRegenerateByKeyParams) MarshalJSON ¶
func (r KeyRegenerateByKeyParams) MarshalJSON() (data []byte, err error)
type KeyRegenerateService ¶
type KeyRegenerateService struct {
Options []option.RequestOption
}
KeyRegenerateService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewKeyRegenerateService method instead.
func NewKeyRegenerateService ¶
func NewKeyRegenerateService(opts ...option.RequestOption) (r *KeyRegenerateService)
NewKeyRegenerateService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type KeyService ¶
type KeyService struct {
Options []option.RequestOption
Regenerate *KeyRegenerateService
}
KeyService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewKeyService method instead.
func NewKeyService ¶
func NewKeyService(opts ...option.RequestOption) (r *KeyService)
NewKeyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*KeyService) Block ¶
func (r *KeyService) Block(ctx context.Context, params KeyBlockParams, opts ...option.RequestOption) (res *KeyBlockResponse, err error)
Block an Virtual key from making any requests.
Parameters:
- key: str - The key to block. Can be either the unhashed key (sk-...) or the hashed key value
Example:
```bash
curl --location 'http://0.0.0.0:4000/key/block' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"key": "sk-Fn8Ej39NxjAXrvpUGKghGw"
}'
```
Note: This is an admin-only endpoint. Only proxy admins can block keys.
func (*KeyService) CheckHealth ¶
func (r *KeyService) CheckHealth(ctx context.Context, opts ...option.RequestOption) (res *KeyCheckHealthResponse, err error)
Check the health of the key
Checks:
- If key based logging is configured correctly - sends a test log
Usage ¶
Pass the key in the request header ¶
```bash curl -X POST "http://localhost:4000/key/health" -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" ```
Response when logging callbacks are setup correctly:
```json
{
"key": "healthy",
"logging_callbacks": {
"callbacks": ["gcs_bucket"],
"status": "healthy",
"details": "No logger exceptions triggered, system is healthy. Manually check if logs were sent to ['gcs_bucket']"
}
}
```
Response when logging callbacks are not setup correctly:
```json
{
"key": "unhealthy",
"logging_callbacks": {
"callbacks": ["gcs_bucket"],
"status": "unhealthy",
"details": "Logger exceptions triggered, system is unhealthy: Failed to load vertex credentials. Check to see if credentials containing partial/invalid information."
}
}
```
func (*KeyService) Delete ¶
func (r *KeyService) Delete(ctx context.Context, params KeyDeleteParams, opts ...option.RequestOption) (res *KeyDeleteResponse, err error)
Delete a key from the key management system.
Parameters::
- keys (List[str]): A list of keys or hashed keys to delete. Example {"keys": ["sk-QWrxEynunsNpV1zT48HIrw", "837e17519f44683334df5291321d97b8bf1098cd490e49e215f6fea935aa28be"]}
- key_aliases (List[str]): A list of key aliases to delete. Can be passed instead of `keys`.Example {"key_aliases": ["alias1", "alias2"]}
Returns:
- deleted_keys (List[str]): A list of deleted keys. Example {"deleted_keys": ["sk-QWrxEynunsNpV1zT48HIrw", "837e17519f44683334df5291321d97b8bf1098cd490e49e215f6fea935aa28be"]}
Example:
```bash
curl --location 'http://0.0.0.0:4000/key/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"keys": ["sk-QWrxEynunsNpV1zT48HIrw"]
}'
```
Raises: HTTPException: If an error occurs during key deletion.
func (*KeyService) Generate ¶
func (r *KeyService) Generate(ctx context.Context, params KeyGenerateParams, opts ...option.RequestOption) (res *GenerateKeyResponse, err error)
Generate an API key based on the provided data.
Docs: https://docs.litellm.ai/docs/proxy/virtual_keys
Parameters:
- duration: Optional[str] - Specify the length of time the token is valid for. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d").
- key_alias: Optional[str] - User defined key alias
- key: Optional[str] - User defined key value. If not set, a 16-digit unique sk-key is created for you.
- team_id: Optional[str] - The team id of the key
- user_id: Optional[str] - The user id of the key
- organization_id: Optional[str] - The organization id of the key. If not set, and team_id is set, the organization id will be the same as the team id. If conflict, an error will be raised.
- budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`.
- models: Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models)
- aliases: Optional[dict] - Any alias mappings, on top of anything in the config.yaml model list. - https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---upgradedowngrade-models
- config: Optional[dict] - any key-specific configs, overrides config in config.yaml
- spend: Optional[int] - Amount spent by key. Default is 0. Will be updated by proxy whenever key is used. https://docs.litellm.ai/docs/proxy/virtual_keys#managing-auth---tracking-spend
- send_invite_email: Optional[bool] - Whether to send an invite email to the user_id, with the generate key
- max_budget: Optional[float] - Specify max budget for a given key.
- budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d").
- max_parallel_requests: Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x.
- metadata: Optional[dict] - Metadata for key, store information for key. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" }
- guardrails: Optional[List[str]] - List of active guardrails for the key
- disable_global_guardrails: Optional[bool] - Whether to disable global guardrails for the key.
- permissions: Optional[dict] - key-specific permissions. Currently just used for turning off pii masking (if connected). Example - {"pii": false}
- model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}}}. IF null or {} then no model specific budget.
- model_rpm_limit: Optional[dict] - key-specific model rpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific rpm limit.
- model_tpm_limit: Optional[dict] - key-specific model tpm limit. Example - {"text-davinci-002": 1000, "gpt-3.5-turbo": 1000}. IF null or {} then no model specific tpm limit.
- tpm_limit_type: Optional[str] - Type of tpm limit. Options: "best_effort_throughput" (no error if we're overallocating tpm), "guaranteed_throughput" (raise an error if we're overallocating tpm), "dynamic" (dynamically exceed limit when no 429 errors). Defaults to "best_effort_throughput".
- rpm_limit_type: Optional[str] - Type of rpm limit. Options: "best_effort_throughput" (no error if we're overallocating rpm), "guaranteed_throughput" (raise an error if we're overallocating rpm), "dynamic" (dynamically exceed limit when no 429 errors). Defaults to "best_effort_throughput".
- allowed_cache_controls: Optional[list] - List of allowed cache control values. Example - ["no-cache", "no-store"]. See all values - https://docs.litellm.ai/docs/proxy/caching#turn-on--off-caching-per-request
- blocked: Optional[bool] - Whether the key is blocked.
- rpm_limit: Optional[int] - Specify rpm limit for a given key (Requests per minute)
- tpm_limit: Optional[int] - Specify tpm limit for a given key (Tokens per minute)
- soft_budget: Optional[float] - Specify soft budget for a given key. Will trigger a slack alert when this soft budget is reached.
- tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing).
- prompts: Optional[List[str]] - List of prompts that the key is allowed to use.
- enforced_params: Optional[List[str]] - List of enforced params for the key (Enterprise only). [Docs](https://docs.litellm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests)
- prompts: Optional[List[str]] - List of prompts that the key is allowed to use.
- allowed_routes: Optional[list] - List of allowed routes for the key. Store the actual route or store a wildcard pattern for a set of routes. Example - ["/chat/completions", "/embeddings", "/keys/*"]
- allowed_passthrough_routes: Optional[list] - List of allowed pass through endpoints for the key. Store the actual endpoint or store a wildcard pattern for a set of endpoints. Example - ["/my-custom-endpoint"]. Use this instead of allowed_routes, if you just want to specify which pass through endpoints the key can access, without specifying the routes. If allowed_routes is specified, allowed_pass_through_endpoints is ignored.
- object_permission: Optional[LiteLLM_ObjectPermissionBase] - key-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"], "agents": ["agent_1", "agent_2"], "agent_access_groups": ["dev_group"]}. IF null or {} then no object permission.
- key_type: Optional[str] - Type of key that determines default allowed routes. Options: "llm_api" (can call LLM API routes), "management" (can call management routes), "read_only" (can only call info/read routes), "default" (uses default allowed routes). Defaults to "default".
- prompts: Optional[List[str]] - List of allowed prompts for the key. If specified, the key will only be able to use these specific prompts.
- auto_rotate: Optional[bool] - Whether this key should be automatically rotated (regenerated)
- rotation_interval: Optional[str] - How often to auto-rotate this key (e.g., '30s', '30m', '30h', '30d'). Required if auto_rotate=True.
- allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{"index_name": "my-index", "index_permissions": ["write", "read"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint.
- router_settings: Optional[UpdateRouterConfig] - key-specific router settings. Example - {"model_group_retry_policy": {"max_retries": 5}}. IF null or {} then no router settings.
Examples:
1. Allow users to turn on/off pii masking
```bash
curl --location 'http://0.0.0.0:4000/key/generate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"permissions": {"allow_pii_controls": true}
}'
```
Returns:
- key: (str) The generated api key
- expires: (datetime) Datetime object for when key expires.
- user_id: (str) Unique user id - used for tracking spend across multiple keys for same user id.
func (*KeyService) GetInfo ¶
func (r *KeyService) GetInfo(ctx context.Context, query KeyGetInfoParams, opts ...option.RequestOption) (res *KeyGetInfoResponse, err error)
Retrieve information about a key. Parameters: key: Optional[str] = Query parameter representing the key in the request user_api_key_dict: UserAPIKeyAuth = Dependency representing the user's API key Returns: Dict containing the key and its associated information
Example Curl:
``` curl -X GET "http://0.0.0.0:4000/key/info?key=sk-test-example-key-123" -H "Authorization: Bearer sk-1234" ```
Example Curl - if no key is passed, it will use the Key Passed in Authorization Header
``` curl -X GET "http://0.0.0.0:4000/key/info" -H "Authorization: Bearer sk-test-example-key-123" ```
func (*KeyService) List ¶
func (r *KeyService) List(ctx context.Context, query KeyListParams, opts ...option.RequestOption) (res *KeyListResponse, err error)
List all keys for a given user / team / organization.
Parameters: expand: Optional[List[str]] - Expand related objects (e.g. 'user' to include user information) status: Optional[str] - Filter by status. Currently supports "deleted" to query deleted keys.
Returns: { "keys": List[str] or List[UserAPIKeyAuth], "total_count": int, "current_page": int, "total_pages": int, }
When expand includes "user", each key object will include a "user" field with the associated user object. Note: When expand=user is specified, full key objects are returned regardless of the return_full_object parameter.
func (*KeyService) RegenerateByKey ¶
func (r *KeyService) RegenerateByKey(ctx context.Context, key string, params KeyRegenerateByKeyParams, opts ...option.RequestOption) (res *GenerateKeyResponse, err error)
Regenerate an existing API key while optionally updating its parameters.
Parameters:
- key: str (path parameter) - The key to regenerate
- data: Optional[RegenerateKeyRequest] - Request body containing optional parameters to update
- key: Optional[str] - The key to regenerate.
- new_master_key: Optional[str] - The new master key to use, if key is the master key.
- new_key: Optional[str] - The new key to use, if key is not the master key. If both set, new_master_key will be used.
- key_alias: Optional[str] - User-friendly key alias
- user_id: Optional[str] - User ID associated with key
- team_id: Optional[str] - Team ID associated with key
- models: Optional[list] - Model_name's a user is allowed to call
- tags: Optional[List[str]] - Tags for organizing keys (Enterprise only)
- spend: Optional[float] - Amount spent by key
- max_budget: Optional[float] - Max budget for key
- model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}}
- budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.)
- soft_budget: Optional[float] - Soft budget limit (warning vs. hard stop). Will trigger a slack alert when this soft budget is reached.
- max_parallel_requests: Optional[int] - Rate limit for parallel requests
- metadata: Optional[dict] - Metadata for key. Example {"team": "core-infra", "app": "app2"}
- tpm_limit: Optional[int] - Tokens per minute limit
- rpm_limit: Optional[int] - Requests per minute limit
- model_rpm_limit: Optional[dict] - Model-specific RPM limits {"gpt-4": 100, "claude-v1": 200}
- model_tpm_limit: Optional[dict] - Model-specific TPM limits {"gpt-4": 100000, "claude-v1": 200000}
- allowed_cache_controls: Optional[list] - List of allowed cache control values
- duration: Optional[str] - Key validity duration ("30d", "1h", etc.)
- permissions: Optional[dict] - Key-specific permissions
- guardrails: Optional[List[str]] - List of active guardrails for the key
- blocked: Optional[bool] - Whether the key is blocked
Returns:
- GenerateKeyResponse containing the new key and its updated parameters
Example:
```bash
curl --location --request POST 'http://localhost:4000/key/sk-1234/regenerate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{
"max_budget": 100,
"metadata": {"team": "core-infra"},
"models": ["gpt-4", "gpt-3.5-turbo"]
}'
```
Note: This is an Enterprise feature. It requires a premium license to use.
func (*KeyService) Unblock ¶
func (r *KeyService) Unblock(ctx context.Context, params KeyUnblockParams, opts ...option.RequestOption) (res *KeyUnblockResponse, err error)
Unblock a Virtual key to allow it to make requests again.
Parameters:
- key: str - The key to unblock. Can be either the unhashed key (sk-...) or the hashed key value
Example:
```bash
curl --location 'http://0.0.0.0:4000/key/unblock' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"key": "sk-Fn8Ej39NxjAXrvpUGKghGw"
}'
```
Note: This is an admin-only endpoint. Only proxy admins can unblock keys.
func (*KeyService) Update ¶
func (r *KeyService) Update(ctx context.Context, params KeyUpdateParams, opts ...option.RequestOption) (res *KeyUpdateResponse, err error)
Update an existing API key's parameters.
Parameters:
- key: str - The key to update
- key_alias: Optional[str] - User-friendly key alias
- user_id: Optional[str] - User ID associated with key
- team_id: Optional[str] - Team ID associated with key
- budget_id: Optional[str] - The budget id associated with the key. Created by calling `/budget/new`.
- models: Optional[list] - Model_name's a user is allowed to call
- tags: Optional[List[str]] - Tags for organizing keys (Enterprise only)
- prompts: Optional[List[str]] - List of prompts that the key is allowed to use.
- enforced_params: Optional[List[str]] - List of enforced params for the key (Enterprise only). [Docs](https://docs.litellm.ai/docs/proxy/enterprise#enforce-required-params-for-llm-requests)
- spend: Optional[float] - Amount spent by key
- max_budget: Optional[float] - Max budget for key
- model_max_budget: Optional[Dict[str, BudgetConfig]] - Model-specific budgets {"gpt-4": {"budget_limit": 0.0005, "time_period": "30d"}}
- budget_duration: Optional[str] - Budget reset period ("30d", "1h", etc.)
- soft_budget: Optional[float] - [TODO] Soft budget limit (warning vs. hard stop). Will trigger a slack alert when this soft budget is reached.
- max_parallel_requests: Optional[int] - Rate limit for parallel requests
- metadata: Optional[dict] - Metadata for key. Example {"team": "core-infra", "app": "app2"}
- tpm_limit: Optional[int] - Tokens per minute limit
- rpm_limit: Optional[int] - Requests per minute limit
- model_rpm_limit: Optional[dict] - Model-specific RPM limits {"gpt-4": 100, "claude-v1": 200}
- model_tpm_limit: Optional[dict] - Model-specific TPM limits {"gpt-4": 100000, "claude-v1": 200000}
- tpm_limit_type: Optional[str] - TPM rate limit type - "best_effort_throughput", "guaranteed_throughput", or "dynamic"
- rpm_limit_type: Optional[str] - RPM rate limit type - "best_effort_throughput", "guaranteed_throughput", or "dynamic"
- allowed_cache_controls: Optional[list] - List of allowed cache control values
- duration: Optional[str] - Key validity duration ("30d", "1h", etc.) or "-1" to never expire
- permissions: Optional[dict] - Key-specific permissions
- send_invite_email: Optional[bool] - Send invite email to user_id
- guardrails: Optional[List[str]] - List of active guardrails for the key
- disable_global_guardrails: Optional[bool] - Whether to disable global guardrails for the key.
- prompts: Optional[List[str]] - List of prompts that the key is allowed to use.
- blocked: Optional[bool] - Whether the key is blocked
- aliases: Optional[dict] - Model aliases for the key - [Docs](https://litellm.vercel.app/docs/proxy/virtual_keys#model-aliases)
- config: Optional[dict] - [DEPRECATED PARAM] Key-specific config.
- temp_budget_increase: Optional[float] - Temporary budget increase for the key (Enterprise only).
- temp_budget_expiry: Optional[str] - Expiry time for the temporary budget increase (Enterprise only).
- allowed_routes: Optional[list] - List of allowed routes for the key. Store the actual route or store a wildcard pattern for a set of routes. Example - ["/chat/completions", "/embeddings", "/keys/*"]
- allowed_passthrough_routes: Optional[list] - List of allowed pass through routes for the key. Store the actual route or store a wildcard pattern for a set of routes. Example - ["/my-custom-endpoint"]. Use this instead of allowed_routes, if you just want to specify which pass through routes the key can access, without specifying the routes. If allowed_routes is specified, allowed_passthrough_routes is ignored.
- prompts: Optional[List[str]] - List of allowed prompts for the key. If specified, the key will only be able to use these specific prompts.
- object_permission: Optional[LiteLLM_ObjectPermissionBase] - key-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"], "agents": ["agent_1", "agent_2"], "agent_access_groups": ["dev_group"]}. IF null or {} then no object permission.
- auto_rotate: Optional[bool] - Whether this key should be automatically rotated
- rotation_interval: Optional[str] - How often to rotate this key (e.g., '30d', '90d'). Required if auto_rotate=True
- allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{"index_name": "my-index", "index_permissions": ["write", "read"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint.
- router_settings: Optional[UpdateRouterConfig] - key-specific router settings. Example - {"model_group_retry_policy": {"max_retries": 5}}. IF null or {} then no router settings.
Example:
```bash
curl --location 'http://0.0.0.0:4000/key/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"key": "sk-1234",
"key_alias": "my-key",
"user_id": "user-1234",
"team_id": "team-1234",
"max_budget": 100,
"metadata": {"any_key": "any-val"},
}'
```
type KeyUnblockParams ¶
type KeyUnblockParams struct {
BlockKeyRequest BlockKeyRequestParam `json:"block_key_request,required"`
// The litellm-changed-by header enables tracking of actions performed by
// authorized users on behalf of other users, providing an audit trail for
// accountability
LitellmChangedBy param.Field[string] `header:"litellm-changed-by"`
}
func (KeyUnblockParams) MarshalJSON ¶
func (r KeyUnblockParams) MarshalJSON() (data []byte, err error)
type KeyUnblockResponse ¶
type KeyUnblockResponse = interface{}
type KeyUpdateParams ¶
type KeyUpdateParams struct {
Key param.Field[string] `json:"key,required"`
Aliases param.Field[map[string]interface{}] `json:"aliases"`
AllowedCacheControls param.Field[[]interface{}] `json:"allowed_cache_controls"`
AllowedPassthroughRoutes param.Field[[]interface{}] `json:"allowed_passthrough_routes"`
AllowedRoutes param.Field[[]interface{}] `json:"allowed_routes"`
AllowedVectorStoreIndexes param.Field[[]KeyUpdateParamsAllowedVectorStoreIndex] `json:"allowed_vector_store_indexes"`
AutoRotate param.Field[bool] `json:"auto_rotate"`
Blocked param.Field[bool] `json:"blocked"`
BudgetDuration param.Field[string] `json:"budget_duration"`
BudgetID param.Field[string] `json:"budget_id"`
Config param.Field[map[string]interface{}] `json:"config"`
Duration param.Field[string] `json:"duration"`
EnforcedParams param.Field[[]string] `json:"enforced_params"`
Guardrails param.Field[[]string] `json:"guardrails"`
KeyAlias param.Field[string] `json:"key_alias"`
MaxBudget param.Field[float64] `json:"max_budget"`
MaxParallelRequests param.Field[int64] `json:"max_parallel_requests"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
ModelMaxBudget param.Field[map[string]interface{}] `json:"model_max_budget"`
ModelRpmLimit param.Field[map[string]interface{}] `json:"model_rpm_limit"`
ModelTpmLimit param.Field[map[string]interface{}] `json:"model_tpm_limit"`
Models param.Field[[]interface{}] `json:"models"`
ObjectPermission param.Field[KeyUpdateParamsObjectPermission] `json:"object_permission"`
Permissions param.Field[map[string]interface{}] `json:"permissions"`
Prompts param.Field[[]string] `json:"prompts"`
RotationInterval param.Field[string] `json:"rotation_interval"`
// Set of params that you can modify via `router.update_settings()`.
RouterSettings param.Field[KeyUpdateParamsRouterSettings] `json:"router_settings"`
RpmLimit param.Field[int64] `json:"rpm_limit"`
RpmLimitType param.Field[KeyUpdateParamsRpmLimitType] `json:"rpm_limit_type"`
Spend param.Field[float64] `json:"spend"`
Tags param.Field[[]string] `json:"tags"`
TeamID param.Field[string] `json:"team_id"`
TempBudgetExpiry param.Field[time.Time] `json:"temp_budget_expiry" format:"date-time"`
TempBudgetIncrease param.Field[float64] `json:"temp_budget_increase"`
TpmLimit param.Field[int64] `json:"tpm_limit"`
TpmLimitType param.Field[KeyUpdateParamsTpmLimitType] `json:"tpm_limit_type"`
UserID param.Field[string] `json:"user_id"`
// The litellm-changed-by header enables tracking of actions performed by
// authorized users on behalf of other users, providing an audit trail for
// accountability
LitellmChangedBy param.Field[string] `header:"litellm-changed-by"`
}
func (KeyUpdateParams) MarshalJSON ¶
func (r KeyUpdateParams) MarshalJSON() (data []byte, err error)
type KeyUpdateParamsAllowedVectorStoreIndex ¶
type KeyUpdateParamsAllowedVectorStoreIndex struct {
IndexName param.Field[string] `json:"index_name,required"`
IndexPermissions param.Field[[]KeyUpdateParamsAllowedVectorStoreIndexesIndexPermission] `json:"index_permissions,required"`
}
func (KeyUpdateParamsAllowedVectorStoreIndex) MarshalJSON ¶
func (r KeyUpdateParamsAllowedVectorStoreIndex) MarshalJSON() (data []byte, err error)
type KeyUpdateParamsAllowedVectorStoreIndexesIndexPermission ¶
type KeyUpdateParamsAllowedVectorStoreIndexesIndexPermission string
const ( KeyUpdateParamsAllowedVectorStoreIndexesIndexPermissionRead KeyUpdateParamsAllowedVectorStoreIndexesIndexPermission = "read" KeyUpdateParamsAllowedVectorStoreIndexesIndexPermissionWrite KeyUpdateParamsAllowedVectorStoreIndexesIndexPermission = "write" )
func (KeyUpdateParamsAllowedVectorStoreIndexesIndexPermission) IsKnown ¶
func (r KeyUpdateParamsAllowedVectorStoreIndexesIndexPermission) IsKnown() bool
type KeyUpdateParamsObjectPermission ¶
type KeyUpdateParamsObjectPermission struct {
AgentAccessGroups param.Field[[]string] `json:"agent_access_groups"`
Agents param.Field[[]string] `json:"agents"`
McpAccessGroups param.Field[[]string] `json:"mcp_access_groups"`
McpServers param.Field[[]string] `json:"mcp_servers"`
McpToolPermissions param.Field[map[string][]string] `json:"mcp_tool_permissions"`
VectorStores param.Field[[]string] `json:"vector_stores"`
}
func (KeyUpdateParamsObjectPermission) MarshalJSON ¶
func (r KeyUpdateParamsObjectPermission) MarshalJSON() (data []byte, err error)
type KeyUpdateParamsRouterSettings ¶
type KeyUpdateParamsRouterSettings struct {
AllowedFails param.Field[int64] `json:"allowed_fails"`
ContextWindowFallbacks param.Field[[]map[string]interface{}] `json:"context_window_fallbacks"`
CooldownTime param.Field[float64] `json:"cooldown_time"`
Fallbacks param.Field[[]map[string]interface{}] `json:"fallbacks"`
MaxRetries param.Field[int64] `json:"max_retries"`
ModelGroupAlias param.Field[map[string]KeyUpdateParamsRouterSettingsModelGroupAliasUnion] `json:"model_group_alias"`
ModelGroupRetryPolicy param.Field[map[string]interface{}] `json:"model_group_retry_policy"`
NumRetries param.Field[int64] `json:"num_retries"`
RetryAfter param.Field[float64] `json:"retry_after"`
RoutingStrategy param.Field[string] `json:"routing_strategy"`
RoutingStrategyArgs param.Field[map[string]interface{}] `json:"routing_strategy_args"`
Timeout param.Field[float64] `json:"timeout"`
}
Set of params that you can modify via `router.update_settings()`.
func (KeyUpdateParamsRouterSettings) MarshalJSON ¶
func (r KeyUpdateParamsRouterSettings) MarshalJSON() (data []byte, err error)
type KeyUpdateParamsRouterSettingsModelGroupAliasMap ¶
type KeyUpdateParamsRouterSettingsModelGroupAliasMap map[string]interface{}
func (KeyUpdateParamsRouterSettingsModelGroupAliasMap) ImplementsKeyUpdateParamsRouterSettingsModelGroupAliasUnion ¶
func (r KeyUpdateParamsRouterSettingsModelGroupAliasMap) ImplementsKeyUpdateParamsRouterSettingsModelGroupAliasUnion()
type KeyUpdateParamsRouterSettingsModelGroupAliasUnion ¶
type KeyUpdateParamsRouterSettingsModelGroupAliasUnion interface {
ImplementsKeyUpdateParamsRouterSettingsModelGroupAliasUnion()
}
Satisfied by shared.UnionString, KeyUpdateParamsRouterSettingsModelGroupAliasMap.
type KeyUpdateParamsRpmLimitType ¶
type KeyUpdateParamsRpmLimitType string
const ( KeyUpdateParamsRpmLimitTypeGuaranteedThroughput KeyUpdateParamsRpmLimitType = "guaranteed_throughput" KeyUpdateParamsRpmLimitTypeBestEffortThroughput KeyUpdateParamsRpmLimitType = "best_effort_throughput" KeyUpdateParamsRpmLimitTypeDynamic KeyUpdateParamsRpmLimitType = "dynamic" )
func (KeyUpdateParamsRpmLimitType) IsKnown ¶
func (r KeyUpdateParamsRpmLimitType) IsKnown() bool
type KeyUpdateParamsTpmLimitType ¶
type KeyUpdateParamsTpmLimitType string
const ( KeyUpdateParamsTpmLimitTypeGuaranteedThroughput KeyUpdateParamsTpmLimitType = "guaranteed_throughput" KeyUpdateParamsTpmLimitTypeBestEffortThroughput KeyUpdateParamsTpmLimitType = "best_effort_throughput" KeyUpdateParamsTpmLimitTypeDynamic KeyUpdateParamsTpmLimitType = "dynamic" )
func (KeyUpdateParamsTpmLimitType) IsKnown ¶
func (r KeyUpdateParamsTpmLimitType) IsKnown() bool
type KeyUpdateResponse ¶
type KeyUpdateResponse = interface{}
type LangfuseDeleteResponse ¶
type LangfuseDeleteResponse = interface{}
type LangfuseGetResponse ¶
type LangfuseGetResponse = interface{}
type LangfuseNewResponse ¶
type LangfuseNewResponse = interface{}
type LangfusePatchResponse ¶
type LangfusePatchResponse = interface{}
type LangfuseService ¶
type LangfuseService struct {
Options []option.RequestOption
}
LangfuseService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLangfuseService method instead.
func NewLangfuseService ¶
func NewLangfuseService(opts ...option.RequestOption) (r *LangfuseService)
NewLangfuseService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LangfuseService) Delete ¶
func (r *LangfuseService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *LangfuseDeleteResponse, err error)
Call Langfuse via LiteLLM proxy. Works with Langfuse SDK.
func (*LangfuseService) Get ¶
func (r *LangfuseService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *LangfuseGetResponse, err error)
Call Langfuse via LiteLLM proxy. Works with Langfuse SDK.
func (*LangfuseService) New ¶
func (r *LangfuseService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *LangfuseNewResponse, err error)
Call Langfuse via LiteLLM proxy. Works with Langfuse SDK.
func (*LangfuseService) Patch ¶
func (r *LangfuseService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *LangfusePatchResponse, err error)
Call Langfuse via LiteLLM proxy. Works with Langfuse SDK.
func (*LangfuseService) Update ¶
func (r *LangfuseService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *LangfuseUpdateResponse, err error)
Call Langfuse via LiteLLM proxy. Works with Langfuse SDK.
type LangfuseUpdateResponse ¶
type LangfuseUpdateResponse = interface{}
type LiteLlmEndUserTable ¶
type LiteLlmEndUserTable struct {
Blocked bool `json:"blocked,required"`
UserID string `json:"user_id,required"`
Alias string `json:"alias,nullable"`
AllowedModelRegion LiteLlmEndUserTableAllowedModelRegion `json:"allowed_model_region,nullable"`
DefaultModel string `json:"default_model,nullable"`
// Represents user-controllable params for a LiteLLM_BudgetTable record
LitellmBudgetTable BudgetTable `json:"litellm_budget_table,nullable"`
Spend float64 `json:"spend"`
JSON liteLlmEndUserTableJSON `json:"-"`
}
func (*LiteLlmEndUserTable) UnmarshalJSON ¶
func (r *LiteLlmEndUserTable) UnmarshalJSON(data []byte) (err error)
type LiteLlmEndUserTableAllowedModelRegion ¶
type LiteLlmEndUserTableAllowedModelRegion string
const ( LiteLlmEndUserTableAllowedModelRegionEu LiteLlmEndUserTableAllowedModelRegion = "eu" LiteLlmEndUserTableAllowedModelRegionUs LiteLlmEndUserTableAllowedModelRegion = "us" )
func (LiteLlmEndUserTableAllowedModelRegion) IsKnown ¶
func (r LiteLlmEndUserTableAllowedModelRegion) IsKnown() bool
type LiteLlmFineTuningJobCreateCustomLlmProvider ¶
type LiteLlmFineTuningJobCreateCustomLlmProvider string
const ( LiteLlmFineTuningJobCreateCustomLlmProviderOpenAI LiteLlmFineTuningJobCreateCustomLlmProvider = "openai" LiteLlmFineTuningJobCreateCustomLlmProviderAzure LiteLlmFineTuningJobCreateCustomLlmProvider = "azure" LiteLlmFineTuningJobCreateCustomLlmProviderVertexAI LiteLlmFineTuningJobCreateCustomLlmProvider = "vertex_ai" )
func (LiteLlmFineTuningJobCreateCustomLlmProvider) IsKnown ¶
func (r LiteLlmFineTuningJobCreateCustomLlmProvider) IsKnown() bool
type LiteLlmFineTuningJobCreateHyperparametersBatchSizeUnionParam ¶
type LiteLlmFineTuningJobCreateHyperparametersBatchSizeUnionParam interface {
ImplementsLiteLlmFineTuningJobCreateHyperparametersBatchSizeUnionParam()
}
Satisfied by shared.UnionString, shared.UnionInt.
type LiteLlmFineTuningJobCreateHyperparametersLearningRateMultiplierUnionParam ¶
type LiteLlmFineTuningJobCreateHyperparametersLearningRateMultiplierUnionParam interface {
ImplementsLiteLlmFineTuningJobCreateHyperparametersLearningRateMultiplierUnionParam()
}
Satisfied by shared.UnionString, shared.UnionFloat.
type LiteLlmFineTuningJobCreateHyperparametersNEpochsUnionParam ¶
type LiteLlmFineTuningJobCreateHyperparametersNEpochsUnionParam interface {
ImplementsLiteLlmFineTuningJobCreateHyperparametersNEpochsUnionParam()
}
Satisfied by shared.UnionString, shared.UnionInt.
type LiteLlmFineTuningJobCreateHyperparametersParam ¶
type LiteLlmFineTuningJobCreateHyperparametersParam struct {
BatchSize param.Field[LiteLlmFineTuningJobCreateHyperparametersBatchSizeUnionParam] `json:"batch_size"`
LearningRateMultiplier param.Field[LiteLlmFineTuningJobCreateHyperparametersLearningRateMultiplierUnionParam] `json:"learning_rate_multiplier"`
NEpochs param.Field[LiteLlmFineTuningJobCreateHyperparametersNEpochsUnionParam] `json:"n_epochs"`
}
func (LiteLlmFineTuningJobCreateHyperparametersParam) MarshalJSON ¶
func (r LiteLlmFineTuningJobCreateHyperparametersParam) MarshalJSON() (data []byte, err error)
type LiteLlmFineTuningJobCreateParam ¶
type LiteLlmFineTuningJobCreateParam struct {
Model param.Field[string] `json:"model,required"`
TrainingFile param.Field[string] `json:"training_file,required"`
CustomLlmProvider param.Field[LiteLlmFineTuningJobCreateCustomLlmProvider] `json:"custom_llm_provider"`
Hyperparameters param.Field[LiteLlmFineTuningJobCreateHyperparametersParam] `json:"hyperparameters"`
Integrations param.Field[[]string] `json:"integrations"`
Seed param.Field[int64] `json:"seed"`
Suffix param.Field[string] `json:"suffix"`
ValidationFile param.Field[string] `json:"validation_file"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (LiteLlmFineTuningJobCreateParam) MarshalJSON ¶
func (r LiteLlmFineTuningJobCreateParam) MarshalJSON() (data []byte, err error)
type Member ¶
type Member struct {
// The role of the user within the team. 'admin' users can manage team settings and
// members, 'user' is a regular team member
Role MemberRole `json:"role,required"`
// The email address of the user to add. Either user_id or user_email must be
// provided
UserEmail string `json:"user_email,nullable"`
// The unique ID of the user to add. Either user_id or user_email must be provided
UserID string `json:"user_id,nullable"`
JSON memberJSON `json:"-"`
}
func (*Member) UnmarshalJSON ¶
type MemberParam ¶
type MemberParam struct {
// The role of the user within the team. 'admin' users can manage team settings and
// members, 'user' is a regular team member
Role param.Field[MemberRole] `json:"role,required"`
// The email address of the user to add. Either user_id or user_email must be
// provided
UserEmail param.Field[string] `json:"user_email"`
// The unique ID of the user to add. Either user_id or user_email must be provided
UserID param.Field[string] `json:"user_id"`
}
func (MemberParam) MarshalJSON ¶
func (r MemberParam) MarshalJSON() (data []byte, err error)
type MemberRole ¶
type MemberRole string
The role of the user within the team. 'admin' users can manage team settings and members, 'user' is a regular team member
const ( MemberRoleAdmin MemberRole = "admin" MemberRoleUser MemberRole = "user" )
func (MemberRole) IsKnown ¶
func (r MemberRole) IsKnown() bool
type ModelGroupGetInfoParams ¶
func (ModelGroupGetInfoParams) URLQuery ¶
func (r ModelGroupGetInfoParams) URLQuery() (v url.Values)
URLQuery serializes ModelGroupGetInfoParams's query parameters as `url.Values`.
type ModelGroupGetInfoResponse ¶
type ModelGroupGetInfoResponse = interface{}
type ModelGroupService ¶
type ModelGroupService struct {
Options []option.RequestOption
}
ModelGroupService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewModelGroupService method instead.
func NewModelGroupService ¶
func NewModelGroupService(opts ...option.RequestOption) (r *ModelGroupService)
NewModelGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ModelGroupService) GetInfo ¶
func (r *ModelGroupService) GetInfo(ctx context.Context, query ModelGroupGetInfoParams, opts ...option.RequestOption) (res *ModelGroupGetInfoResponse, err error)
Get information about all the deployments on litellm proxy, including config.yaml descriptions (except api key and api base)
- /model_group/info returns all model groups. End users of proxy should use /model_group/info since those models will be used for /chat/completions, /embeddings, etc.
- /model_group/info?model_group=rerank-english-v3.0 returns all model groups for a specific model group (`model_name` in config.yaml)
Example Request (All Models):
```shell curl -X 'GET' 'http://localhost:4000/model_group/info' -H 'accept: application/json' -H 'x-api-key: sk-1234' ```
Example Request (Specific Model Group):
```shell curl -X 'GET' 'http://localhost:4000/model_group/info?model_group=rerank-english-v3.0' -H 'accept: application/json' -H 'Authorization: Bearer sk-1234' ```
Example Request (Specific Wildcard Model Group): (e.g. `model_name: openai/*` on config.yaml)
```shell curl -X 'GET' 'http://localhost:4000/model_group/info?model_group=openai/tts-1' -H 'accept: application/json' -H 'Authorization: Bearersk-1234' ```
Learn how to use and set wildcard models [here](https://docs.litellm.ai/docs/wildcard_routing)
Example Response:
```json
{
"data": [
{
"model_group": "rerank-english-v3.0",
"providers": ["cohere"],
"max_input_tokens": null,
"max_output_tokens": null,
"input_cost_per_token": 0.0,
"output_cost_per_token": 0.0,
"mode": null,
"tpm": null,
"rpm": null,
"supports_parallel_function_calling": false,
"supports_vision": false,
"supports_function_calling": false,
"supported_openai_params": [
"stream",
"temperature",
"max_tokens",
"logit_bias",
"top_p",
"frequency_penalty",
"presence_penalty",
"stop",
"n",
"extra_headers"
]
},
{
"model_group": "gpt-3.5-turbo",
"providers": ["openai"],
"max_input_tokens": 16385.0,
"max_output_tokens": 4096.0,
"input_cost_per_token": 1.5e-6,
"output_cost_per_token": 2e-6,
"mode": "chat",
"tpm": null,
"rpm": null,
"supports_parallel_function_calling": false,
"supports_vision": false,
"supports_function_calling": true,
"supported_openai_params": [
"frequency_penalty",
"logit_bias",
"logprobs",
"top_logprobs",
"max_tokens",
"max_completion_tokens",
"n",
"presence_penalty",
"seed",
"stop",
"stream",
"stream_options",
"temperature",
"top_p",
"tools",
"tool_choice",
"function_call",
"functions",
"max_retries",
"extra_headers",
"parallel_tool_calls",
"response_format"
]
},
{
"model_group": "llava-hf",
"providers": ["openai"],
"max_input_tokens": null,
"max_output_tokens": null,
"input_cost_per_token": 0.0,
"output_cost_per_token": 0.0,
"mode": null,
"tpm": null,
"rpm": null,
"supports_parallel_function_calling": false,
"supports_vision": true,
"supports_function_calling": false,
"supported_openai_params": [
"frequency_penalty",
"logit_bias",
"logprobs",
"top_logprobs",
"max_tokens",
"max_completion_tokens",
"n",
"presence_penalty",
"seed",
"stop",
"stream",
"stream_options",
"temperature",
"top_p",
"tools",
"tool_choice",
"function_call",
"functions",
"max_retries",
"extra_headers",
"parallel_tool_calls",
"response_format"
]
}
]
}
```
type ModelInfoListParams ¶
func (ModelInfoListParams) URLQuery ¶
func (r ModelInfoListParams) URLQuery() (v url.Values)
URLQuery serializes ModelInfoListParams's query parameters as `url.Values`.
type ModelInfoListResponse ¶
type ModelInfoListResponse = interface{}
type ModelInfoParam ¶
type ModelInfoParam struct {
ID param.Field[string] `json:"id,required"`
BaseModel param.Field[string] `json:"base_model"`
CreatedAt param.Field[time.Time] `json:"created_at" format:"date-time"`
CreatedBy param.Field[string] `json:"created_by"`
DBModel param.Field[bool] `json:"db_model"`
TeamID param.Field[string] `json:"team_id"`
TeamPublicModelName param.Field[string] `json:"team_public_model_name"`
Tier param.Field[ModelInfoTier] `json:"tier"`
UpdatedAt param.Field[time.Time] `json:"updated_at" format:"date-time"`
UpdatedBy param.Field[string] `json:"updated_by"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
ModelInfoParam represents model information parameters
func (ModelInfoParam) MarshalJSON ¶
func (r ModelInfoParam) MarshalJSON() (data []byte, err error)
type ModelInfoService ¶
type ModelInfoService struct {
Options []option.RequestOption
}
ModelInfoService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewModelInfoService method instead.
func NewModelInfoService ¶
func NewModelInfoService(opts ...option.RequestOption) (r *ModelInfoService)
NewModelInfoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ModelInfoService) List ¶
func (r *ModelInfoService) List(ctx context.Context, query ModelInfoListParams, opts ...option.RequestOption) (res *ModelInfoListResponse, err error)
Provides more info about each model in /models, including config.yaml descriptions (except api key and api base)
Parameters: litellm_model_id: Optional[str] = None (this is the value of `x-litellm-model-id` returned in response headers)
- When litellm_model_id is passed, it will return the info for that specific model
- When litellm_model_id is not passed, it will return the info for all models
Returns: Returns a dictionary containing information about each model.
Example Response:
```json
{
"data": [
{
"model_name": "fake-openai-endpoint",
"litellm_params": {
"api_base": "https://exampleopenaiendpoint-production.up.railway.app/",
"model": "openai/fake"
},
"model_info": {
"id": "112f74fab24a7a5245d2ced3536dd8f5f9192c57ee6e332af0f0512e08bed5af",
"db_model": false
}
}
]
}
```
type ModelInfoTier ¶
type ModelInfoTier string
const ( ModelInfoTierFree ModelInfoTier = "free" ModelInfoTierPaid ModelInfoTier = "paid" )
func (ModelInfoTier) IsKnown ¶
func (r ModelInfoTier) IsKnown() bool
type ModelListParams ¶
type ModelListParams struct {
FallbackType param.Field[string] `query:"fallback_type"`
IncludeMetadata param.Field[bool] `query:"include_metadata"`
IncludeModelAccessGroups param.Field[bool] `query:"include_model_access_groups"`
OnlyModelAccessGroups param.Field[bool] `query:"only_model_access_groups"`
ReturnWildcardRoutes param.Field[bool] `query:"return_wildcard_routes"`
TeamID param.Field[string] `query:"team_id"`
}
func (ModelListParams) URLQuery ¶
func (r ModelListParams) URLQuery() (v url.Values)
URLQuery serializes ModelListParams's query parameters as `url.Values`.
type ModelListResponse ¶
type ModelListResponse = interface{}
type ModelService ¶
type ModelService struct {
Options []option.RequestOption
Info *ModelInfoService
Update *ModelUpdateService
}
ModelService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewModelService method instead.
func NewModelService ¶
func NewModelService(opts ...option.RequestOption) (r *ModelService)
NewModelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ModelService) List ¶
func (r *ModelService) List(ctx context.Context, query ModelListParams, opts ...option.RequestOption) (res *ModelListResponse, err error)
Use `/model/info` - to get detailed model information, example - pricing, mode, etc.
This is just for compatibility with openai projects like aider.
Query Parameters:
- include_metadata: Include additional metadata in the response with fallback information
- fallback_type: Type of fallbacks to include ("general", "context_window", "content_policy") Defaults to "general" when include_metadata=true
type ModelUpdateFullParams ¶
type ModelUpdateFullParams struct {
UpdateDeployment UpdateDeploymentParam `json:"update_deployment,required"`
}
func (ModelUpdateFullParams) MarshalJSON ¶
func (r ModelUpdateFullParams) MarshalJSON() (data []byte, err error)
type ModelUpdateFullResponse ¶
type ModelUpdateFullResponse = interface{}
type ModelUpdatePartialParams ¶
type ModelUpdatePartialParams struct {
UpdateDeployment UpdateDeploymentParam `json:"update_deployment,required"`
}
func (ModelUpdatePartialParams) MarshalJSON ¶
func (r ModelUpdatePartialParams) MarshalJSON() (data []byte, err error)
type ModelUpdatePartialResponse ¶
type ModelUpdatePartialResponse = interface{}
type ModelUpdateService ¶
type ModelUpdateService struct {
Options []option.RequestOption
}
ModelUpdateService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewModelUpdateService method instead.
func NewModelUpdateService ¶
func NewModelUpdateService(opts ...option.RequestOption) (r *ModelUpdateService)
NewModelUpdateService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ModelUpdateService) Full ¶
func (r *ModelUpdateService) Full(ctx context.Context, body ModelUpdateFullParams, opts ...option.RequestOption) (res *ModelUpdateFullResponse, err error)
Edit existing model params
func (*ModelUpdateService) Partial ¶
func (r *ModelUpdateService) Partial(ctx context.Context, modelID string, body ModelUpdatePartialParams, opts ...option.RequestOption) (res *ModelUpdatePartialResponse, err error)
PATCH Endpoint for partial model updates.
Only updates the fields specified in the request while preserving other existing values. Follows proper PATCH semantics by only modifying provided fields.
Args: model_id: The ID of the model to update patch_data: The fields to update and their new values user_api_key_dict: User authentication information
Returns: Updated model information
Raises: ProxyException: For various error conditions including authentication and database errors
type ModerationNewResponse ¶
type ModerationNewResponse = interface{}
type ModerationService ¶
type ModerationService struct {
Options []option.RequestOption
}
ModerationService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewModerationService method instead.
func NewModerationService ¶
func NewModerationService(opts ...option.RequestOption) (r *ModerationService)
NewModerationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ModerationService) New ¶
func (r *ModerationService) New(ctx context.Context, opts ...option.RequestOption) (res *ModerationNewResponse, err error)
The moderations endpoint is a tool you can use to check whether content complies with an LLM Providers policies. Quick Start
``` curl --location 'http://0.0.0.0:4000/moderations' --header 'Content-Type: application/json' --header 'Authorization: Bearer sk-1234' --data '{"input": "Sample text goes here", "model": "text-moderation-stable"}' ```
type OpenAIDeleteResponse ¶
type OpenAIDeleteResponse = interface{}
type OpenAIDeploymentChatCompleteParams ¶
type OpenAIDeploymentChatCompleteParams struct {
Messages param.Field[[]OpenAIDeploymentChatCompleteParamsMessageUnion] `json:"messages,required"`
Model param.Field[string] `json:"model,required"`
Caching param.Field[bool] `json:"caching"`
ContextWindowFallbackDict param.Field[map[string]string] `json:"context_window_fallback_dict"`
Fallbacks param.Field[[]string] `json:"fallbacks"`
FrequencyPenalty param.Field[float64] `json:"frequency_penalty"`
FunctionCall param.Field[OpenAIDeploymentChatCompleteParamsFunctionCallUnion] `json:"function_call"`
Functions param.Field[[]map[string]interface{}] `json:"functions"`
Guardrails param.Field[[]string] `json:"guardrails"`
LogitBias param.Field[map[string]float64] `json:"logit_bias"`
Logprobs param.Field[bool] `json:"logprobs"`
MaxTokens param.Field[int64] `json:"max_tokens"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
N param.Field[int64] `json:"n"`
NumRetries param.Field[int64] `json:"num_retries"`
ParallelToolCalls param.Field[bool] `json:"parallel_tool_calls"`
PresencePenalty param.Field[float64] `json:"presence_penalty"`
ResponseFormat param.Field[map[string]interface{}] `json:"response_format"`
Seed param.Field[int64] `json:"seed"`
ServiceTier param.Field[string] `json:"service_tier"`
Stop param.Field[OpenAIDeploymentChatCompleteParamsStopUnion] `json:"stop"`
Stream param.Field[bool] `json:"stream"`
StreamOptions param.Field[map[string]interface{}] `json:"stream_options"`
Temperature param.Field[float64] `json:"temperature"`
ToolChoice param.Field[OpenAIDeploymentChatCompleteParamsToolChoiceUnion] `json:"tool_choice"`
Tools param.Field[[]map[string]interface{}] `json:"tools"`
TopLogprobs param.Field[int64] `json:"top_logprobs"`
TopP param.Field[float64] `json:"top_p"`
User param.Field[string] `json:"user"`
}
func (OpenAIDeploymentChatCompleteParams) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParams) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsFunctionCallMap ¶
type OpenAIDeploymentChatCompleteParamsFunctionCallMap map[string]interface{}
func (OpenAIDeploymentChatCompleteParamsFunctionCallMap) ImplementsOpenAIDeploymentChatCompleteParamsFunctionCallUnion ¶
func (r OpenAIDeploymentChatCompleteParamsFunctionCallMap) ImplementsOpenAIDeploymentChatCompleteParamsFunctionCallUnion()
type OpenAIDeploymentChatCompleteParamsFunctionCallUnion ¶
type OpenAIDeploymentChatCompleteParamsFunctionCallUnion interface {
ImplementsOpenAIDeploymentChatCompleteParamsFunctionCallUnion()
}
Satisfied by shared.UnionString, OpenAIDeploymentChatCompleteParamsFunctionCallMap.
type OpenAIDeploymentChatCompleteParamsMessage ¶
type OpenAIDeploymentChatCompleteParamsMessage struct {
Role param.Field[OpenAIDeploymentChatCompleteParamsMessagesRole] `json:"role,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Content param.Field[interface{}] `json:"content"`
FunctionCall param.Field[interface{}] `json:"function_call"`
Name param.Field[string] `json:"name"`
ReasoningContent param.Field[string] `json:"reasoning_content"`
ThinkingBlocks param.Field[interface{}] `json:"thinking_blocks"`
ToolCallID param.Field[string] `json:"tool_call_id"`
ToolCalls param.Field[interface{}] `json:"tool_calls"`
}
func (OpenAIDeploymentChatCompleteParamsMessage) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessage) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessageUnion ¶
type OpenAIDeploymentChatCompleteParamsMessageUnion interface {
// contains filtered or unexported methods
}
Satisfied by OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessage, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessage, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessage, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessage, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessage, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessage, OpenAIDeploymentChatCompleteParamsMessage.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessage ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessage struct {
Role param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageRole] `json:"role,required"`
CacheControl param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControl] `json:"cache_control"`
Content param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion] `json:"content"`
FunctionCall param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageFunctionCall] `json:"function_call"`
Name param.Field[string] `json:"name"`
ReasoningContent param.Field[string] `json:"reasoning_content"`
ThinkingBlocks param.Field[[]OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlockUnion] `json:"thinking_blocks"`
ToolCalls param.Field[[]OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCall] `json:"tool_calls"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessage) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessage) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControl ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControl struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControlType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControl) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControl) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControlType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControlType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControlTypeEphemeral OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageCacheControlType = "ephemeral"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArray ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArray []OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItemUnion
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArray) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArray) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion()
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType] `json:"type,required"`
CacheControl param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl] `json:"cache_control"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControl) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlTypeEphemeral OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectCacheControlType = "ephemeral"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectTypeText OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObjectType = "text"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType] `json:"type,required"`
CacheControl param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlUnion] `json:"cache_control"`
Signature param.Field[string] `json:"signature"`
Thinking param.Field[string] `json:"thinking"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentTypeEphemeral OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType = "ephemeral"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlMap ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlMap map[string]interface{}
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlUnion interface {
// contains filtered or unexported methods
}
Satisfied by OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlMap, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockCacheControlChatCompletionCachedContent.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockTypeThinking OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlockType = "thinking"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItem ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItem struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayType] `json:"type,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Signature param.Field[string] `json:"signature"`
Text param.Field[string] `json:"text"`
Thinking param.Field[string] `json:"thinking"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItem) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItem) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItemUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItemUnion interface {
// contains filtered or unexported methods
}
Satisfied by OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionTextObject, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayChatCompletionThinkingBlock, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayItem.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayType string
const ( OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayTypeText OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayType = "text" OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayTypeThinking OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArrayType = "thinking" )
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion interface {
ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentUnion()
}
Satisfied by shared.UnionString, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageContentArray.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageFunctionCall ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageFunctionCall struct {
Arguments param.Field[string] `json:"arguments"`
Name param.Field[string] `json:"name"`
ProviderSpecificFields param.Field[map[string]interface{}] `json:"provider_specific_fields"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageFunctionCall) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageFunctionCall) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageRole ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageRole string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageRoleAssistant OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageRole = "assistant"
)
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageRole) IsKnown ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageRole) IsKnown() bool
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlock ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlock struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksType] `json:"type,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Data param.Field[string] `json:"data"`
Signature param.Field[string] `json:"signature"`
Thinking param.Field[string] `json:"thinking"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlock) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlock) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlockUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlockUnion interface {
// contains filtered or unexported methods
}
Satisfied by OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlock.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType] `json:"type,required"`
CacheControl param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnion] `json:"cache_control"`
Data param.Field[string] `json:"data"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlock) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentTypeEphemeral OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType = "ephemeral"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMap ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMap map[string]interface{}
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnion interface {
// contains filtered or unexported methods
}
Satisfied by OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMap, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContent.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockTypeRedactedThinking OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionRedactedThinkingBlockType = "redacted_thinking"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType] `json:"type,required"`
CacheControl param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnion] `json:"cache_control"`
Signature param.Field[string] `json:"signature"`
Thinking param.Field[string] `json:"thinking"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlock) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent) MarshalJSON ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentTypeEphemeral OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType = "ephemeral"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMap ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMap map[string]interface{}
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnion interface {
// contains filtered or unexported methods
}
Satisfied by OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMap, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContent.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockTypeThinking OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksChatCompletionThinkingBlockType = "thinking"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksType string
const ( OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksTypeThinking OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksType = "thinking" OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksTypeRedactedThinking OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageThinkingBlocksType = "redacted_thinking" )
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCall ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCall struct {
ID param.Field[string] `json:"id,required"`
Function param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsFunction] `json:"function,required"`
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCall) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCall) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsFunction ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsFunction struct {
Arguments param.Field[string] `json:"arguments"`
Name param.Field[string] `json:"name"`
ProviderSpecificFields param.Field[map[string]interface{}] `json:"provider_specific_fields"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsFunction) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsFunction) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsTypeFunction OpenAIDeploymentChatCompleteParamsMessagesChatCompletionAssistantMessageToolCallsType = "function"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessage ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessage struct {
Content param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion] `json:"content,required"`
Role param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageRole] `json:"role,required"`
CacheControl param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControl] `json:"cache_control"`
Name param.Field[string] `json:"name"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessage) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessage) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControl ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControl struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControlType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControl) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControl) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControlType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControlType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControlTypeEphemeral OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageCacheControlType = "ephemeral"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentArray ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentArray []interface{}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentArray) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentArray) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion()
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion interface {
ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentUnion()
}
Satisfied by shared.UnionString, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageContentArray.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageRole ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageRole string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageRoleDeveloper OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageRole = "developer"
)
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageRole) IsKnown ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionDeveloperMessageRole) IsKnown() bool
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessage ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessage struct {
Content param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion] `json:"content,required"`
Name param.Field[string] `json:"name,required"`
Role param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageRole] `json:"role,required"`
ToolCallID param.Field[string] `json:"tool_call_id,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessage) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessage) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArray ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArray []OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayItem
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArray) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArray) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion()
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlTypeEphemeral OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControlType = "ephemeral"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayItem ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayItem struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayType] `json:"type,required"`
CacheControl param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayCacheControl] `json:"cache_control"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayItem) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayItem) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayTypeText OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArrayType = "text"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion interface {
ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentUnion()
}
Satisfied by shared.UnionString, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageContentArray.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageRole ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageRole string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageRoleFunction OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageRole = "function"
)
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageRole) IsKnown ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionFunctionMessageRole) IsKnown() bool
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessage ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessage struct {
Content param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion] `json:"content,required"`
Role param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageRole] `json:"role,required"`
CacheControl param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageCacheControl] `json:"cache_control"`
Name param.Field[string] `json:"name"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessage) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessage) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageCacheControl ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageCacheControl struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageCacheControl) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageCacheControl) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlTypeEphemeral OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageCacheControlType = "ephemeral"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentArray ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentArray []interface{}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentArray) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentArray) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion()
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion interface {
ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentUnion()
}
Satisfied by shared.UnionString, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageContentArray.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageRole ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageRole string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageRoleSystem OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageRole = "system"
)
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageRole) IsKnown ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionSystemMessageRole) IsKnown() bool
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessage ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessage struct {
Content param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentUnion] `json:"content,required"`
Role param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageRole] `json:"role,required"`
ToolCallID param.Field[string] `json:"tool_call_id,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessage) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessage) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArray ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArray []OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayItem
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArray) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentUnion ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArray) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentUnion()
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControl ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControl struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControlType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControl) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControl) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControlType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControlType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControlTypeEphemeral OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControlType = "ephemeral"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayItem ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayItem struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayType] `json:"type,required"`
CacheControl param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayCacheControl] `json:"cache_control"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayItem) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayItem) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayTypeText OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArrayType = "text"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentUnion interface {
ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentUnion()
}
Satisfied by shared.UnionString, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageContentArray.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageRole ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageRole string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageRoleTool OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageRole = "tool"
)
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageRole) IsKnown ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionToolMessageRole) IsKnown() bool
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessage ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessage struct {
Content param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentUnion] `json:"content,required"`
Role param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageRole] `json:"role,required"`
CacheControl param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageCacheControl] `json:"cache_control"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessage) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessage) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageCacheControl ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageCacheControl struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageCacheControlType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageCacheControl) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageCacheControl) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageCacheControlType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageCacheControlType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageCacheControlTypeEphemeral OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageCacheControlType = "ephemeral"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArray ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArray []OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItemUnion
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArray) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentUnion ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArray) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentUnion()
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject struct {
InputAudio param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio] `json:"input_audio,required"`
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio struct {
Data param.Field[string] `json:"data,required"`
Format param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat] `json:"format,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudio) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat string
const ( OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormatWav OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat = "wav" OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormatMP3 OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectInputAudioFormat = "mp3" )
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectTypeInputAudio OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObjectType = "input_audio"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject struct {
Citations param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations] `json:"citations,required"`
Context param.Field[string] `json:"context,required"`
Source param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource] `json:"source,required"`
Title param.Field[string] `json:"title,required"`
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations struct {
Enabled param.Field[bool] `json:"enabled,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectCitations) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource struct {
Data param.Field[string] `json:"data,required"`
MediaType param.Field[string] `json:"media_type,required"`
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSource) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceTypeText OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectSourceType = "text"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectTypeDocument OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObjectType = "document"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject struct {
File param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile] `json:"file,required"`
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile struct {
FileData param.Field[string] `json:"file_data"`
FileID param.Field[string] `json:"file_id"`
Filename param.Field[string] `json:"filename"`
Format param.Field[string] `json:"format"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectFile) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectTypeFile OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObjectType = "file"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject struct {
ImageURL param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion] `json:"image_url,required"`
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject struct {
URL param.Field[string] `json:"url,required"`
Detail param.Field[string] `json:"detail"`
Format param.Field[string] `json:"format"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion()
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion interface {
ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLUnion()
}
Satisfied by shared.UnionString, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectImageURLChatCompletionImageURLObject.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectTypeImageURL OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObjectType = "image_url"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject struct {
Text param.Field[string] `json:"text,required"`
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType] `json:"type,required"`
CacheControl param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl] `json:"cache_control"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType] `json:"type,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControl) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlTypeEphemeral OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectCacheControlType = "ephemeral"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectTypeText OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObjectType = "text"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType] `json:"type,required"`
VideoURL param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion] `json:"video_url,required"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectTypeVideoURL OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectType = "video_url"
)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject struct {
URL param.Field[string] `json:"url,required"`
Detail param.Field[string] `json:"detail"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion()
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion interface {
ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLUnion()
}
Satisfied by shared.UnionString, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObjectVideoURLChatCompletionVideoURLObject.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItem ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItem struct {
Type param.Field[OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType] `json:"type,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Citations param.Field[interface{}] `json:"citations"`
Context param.Field[string] `json:"context"`
File param.Field[interface{}] `json:"file"`
ImageURL param.Field[interface{}] `json:"image_url"`
InputAudio param.Field[interface{}] `json:"input_audio"`
Source param.Field[interface{}] `json:"source"`
Text param.Field[string] `json:"text"`
Title param.Field[string] `json:"title"`
VideoURL param.Field[interface{}] `json:"video_url"`
}
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItem) MarshalJSON ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItem) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItemUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItemUnion interface {
// contains filtered or unexported methods
}
Satisfied by OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionTextObject, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionImageObject, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionAudioObject, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionDocumentObject, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionVideoObject, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayChatCompletionFileObject, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayItem.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType string
const ( OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayTypeText OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType = "text" OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayTypeImageURL OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType = "image_url" OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayTypeInputAudio OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType = "input_audio" OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayTypeDocument OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType = "document" OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayTypeVideoURL OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType = "video_url" OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayTypeFile OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArrayType = "file" )
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentUnion ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentUnion interface {
ImplementsOpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentUnion()
}
Satisfied by shared.UnionString, OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageContentArray.
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageRole ¶
type OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageRole string
const (
OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageRoleUser OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageRole = "user"
)
func (OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageRole) IsKnown ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesChatCompletionUserMessageRole) IsKnown() bool
type OpenAIDeploymentChatCompleteParamsMessagesRole ¶
type OpenAIDeploymentChatCompleteParamsMessagesRole string
const ( OpenAIDeploymentChatCompleteParamsMessagesRoleUser OpenAIDeploymentChatCompleteParamsMessagesRole = "user" OpenAIDeploymentChatCompleteParamsMessagesRoleAssistant OpenAIDeploymentChatCompleteParamsMessagesRole = "assistant" OpenAIDeploymentChatCompleteParamsMessagesRoleTool OpenAIDeploymentChatCompleteParamsMessagesRole = "tool" OpenAIDeploymentChatCompleteParamsMessagesRoleSystem OpenAIDeploymentChatCompleteParamsMessagesRole = "system" OpenAIDeploymentChatCompleteParamsMessagesRoleFunction OpenAIDeploymentChatCompleteParamsMessagesRole = "function" OpenAIDeploymentChatCompleteParamsMessagesRoleDeveloper OpenAIDeploymentChatCompleteParamsMessagesRole = "developer" )
func (OpenAIDeploymentChatCompleteParamsMessagesRole) IsKnown ¶
func (r OpenAIDeploymentChatCompleteParamsMessagesRole) IsKnown() bool
type OpenAIDeploymentChatCompleteParamsStopArray ¶
type OpenAIDeploymentChatCompleteParamsStopArray []string
func (OpenAIDeploymentChatCompleteParamsStopArray) ImplementsOpenAIDeploymentChatCompleteParamsStopUnion ¶
func (r OpenAIDeploymentChatCompleteParamsStopArray) ImplementsOpenAIDeploymentChatCompleteParamsStopUnion()
type OpenAIDeploymentChatCompleteParamsStopUnion ¶
type OpenAIDeploymentChatCompleteParamsStopUnion interface {
ImplementsOpenAIDeploymentChatCompleteParamsStopUnion()
}
Satisfied by shared.UnionString, OpenAIDeploymentChatCompleteParamsStopArray.
type OpenAIDeploymentChatCompleteParamsToolChoiceMap ¶
type OpenAIDeploymentChatCompleteParamsToolChoiceMap map[string]interface{}
func (OpenAIDeploymentChatCompleteParamsToolChoiceMap) ImplementsOpenAIDeploymentChatCompleteParamsToolChoiceUnion ¶
func (r OpenAIDeploymentChatCompleteParamsToolChoiceMap) ImplementsOpenAIDeploymentChatCompleteParamsToolChoiceUnion()
type OpenAIDeploymentChatCompleteParamsToolChoiceUnion ¶
type OpenAIDeploymentChatCompleteParamsToolChoiceUnion interface {
ImplementsOpenAIDeploymentChatCompleteParamsToolChoiceUnion()
}
Satisfied by shared.UnionString, OpenAIDeploymentChatCompleteParamsToolChoiceMap.
type OpenAIDeploymentChatCompleteResponse ¶
type OpenAIDeploymentChatCompleteResponse = interface{}
type OpenAIDeploymentChatService ¶
type OpenAIDeploymentChatService struct {
Options []option.RequestOption
}
OpenAIDeploymentChatService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOpenAIDeploymentChatService method instead.
func NewOpenAIDeploymentChatService ¶
func NewOpenAIDeploymentChatService(opts ...option.RequestOption) (r *OpenAIDeploymentChatService)
NewOpenAIDeploymentChatService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OpenAIDeploymentChatService) Complete ¶
func (r *OpenAIDeploymentChatService) Complete(ctx context.Context, model string, body OpenAIDeploymentChatCompleteParams, opts ...option.RequestOption) (res *OpenAIDeploymentChatCompleteResponse, err error)
Follows the exact same API spec as `OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat`
```bash curl -X POST http://localhost:4000/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234"
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}'
```
type OpenAIDeploymentCompleteResponse ¶
type OpenAIDeploymentCompleteResponse = interface{}
type OpenAIDeploymentEmbedParams ¶
type OpenAIDeploymentEmbedParams struct {
Model param.Field[string] `json:"model,required"`
APIBase param.Field[string] `json:"api_base"`
APIKey param.Field[string] `json:"api_key"`
APIType param.Field[string] `json:"api_type"`
APIVersion param.Field[string] `json:"api_version"`
Caching param.Field[bool] `json:"caching"`
CustomLlmProvider param.Field[OpenAIDeploymentEmbedParamsCustomLlmProviderUnion] `json:"custom_llm_provider"`
Input param.Field[[]string] `json:"input"`
LitellmCallID param.Field[string] `json:"litellm_call_id"`
LitellmLoggingObj param.Field[map[string]interface{}] `json:"litellm_logging_obj"`
LoggerFn param.Field[string] `json:"logger_fn"`
Timeout param.Field[int64] `json:"timeout"`
User param.Field[string] `json:"user"`
}
func (OpenAIDeploymentEmbedParams) MarshalJSON ¶
func (r OpenAIDeploymentEmbedParams) MarshalJSON() (data []byte, err error)
type OpenAIDeploymentEmbedParamsCustomLlmProviderMap ¶
type OpenAIDeploymentEmbedParamsCustomLlmProviderMap map[string]interface{}
func (OpenAIDeploymentEmbedParamsCustomLlmProviderMap) ImplementsOpenAIDeploymentEmbedParamsCustomLlmProviderUnion ¶
func (r OpenAIDeploymentEmbedParamsCustomLlmProviderMap) ImplementsOpenAIDeploymentEmbedParamsCustomLlmProviderUnion()
type OpenAIDeploymentEmbedParamsCustomLlmProviderUnion ¶
type OpenAIDeploymentEmbedParamsCustomLlmProviderUnion interface {
ImplementsOpenAIDeploymentEmbedParamsCustomLlmProviderUnion()
}
Satisfied by shared.UnionString, OpenAIDeploymentEmbedParamsCustomLlmProviderMap.
type OpenAIDeploymentEmbedResponse ¶
type OpenAIDeploymentEmbedResponse = interface{}
type OpenAIDeploymentService ¶
type OpenAIDeploymentService struct {
Options []option.RequestOption
Chat *OpenAIDeploymentChatService
}
OpenAIDeploymentService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOpenAIDeploymentService method instead.
func NewOpenAIDeploymentService ¶
func NewOpenAIDeploymentService(opts ...option.RequestOption) (r *OpenAIDeploymentService)
NewOpenAIDeploymentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OpenAIDeploymentService) Complete ¶
func (r *OpenAIDeploymentService) Complete(ctx context.Context, model string, opts ...option.RequestOption) (res *OpenAIDeploymentCompleteResponse, err error)
Follows the exact same API spec as `OpenAI's Completions API https://platform.openai.com/docs/api-reference/completions`
```bash curl -X POST http://localhost:4000/v1/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234"
-d '{
"model": "gpt-3.5-turbo-instruct",
"prompt": "Once upon a time",
"max_tokens": 50,
"temperature": 0.7
}'
```
func (*OpenAIDeploymentService) Embed ¶
func (r *OpenAIDeploymentService) Embed(ctx context.Context, model string, body OpenAIDeploymentEmbedParams, opts ...option.RequestOption) (res *OpenAIDeploymentEmbedResponse, err error)
Follows the exact same API spec as `OpenAI's Embeddings API https://platform.openai.com/docs/api-reference/embeddings`
```bash curl -X POST http://localhost:4000/v1/embeddings -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234"
-d '{
"model": "text-embedding-ada-002",
"input": "The quick brown fox jumps over the lazy dog"
}'
```
type OpenAIGetResponse ¶
type OpenAIGetResponse = interface{}
type OpenAINewResponse ¶
type OpenAINewResponse = interface{}
type OpenAIPatchResponse ¶
type OpenAIPatchResponse = interface{}
type OpenAIService ¶
type OpenAIService struct {
Options []option.RequestOption
Deployments *OpenAIDeploymentService
}
OpenAIService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOpenAIService method instead.
func NewOpenAIService ¶
func NewOpenAIService(opts ...option.RequestOption) (r *OpenAIService)
NewOpenAIService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OpenAIService) Delete ¶
func (r *OpenAIService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *OpenAIDeleteResponse, err error)
Simple pass-through for OpenAI. Use this if you want to directly send a request to OpenAI.
func (*OpenAIService) Get ¶
func (r *OpenAIService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *OpenAIGetResponse, err error)
Simple pass-through for OpenAI. Use this if you want to directly send a request to OpenAI.
func (*OpenAIService) New ¶
func (r *OpenAIService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *OpenAINewResponse, err error)
Simple pass-through for OpenAI. Use this if you want to directly send a request to OpenAI.
func (*OpenAIService) Patch ¶
func (r *OpenAIService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *OpenAIPatchResponse, err error)
Simple pass-through for OpenAI. Use this if you want to directly send a request to OpenAI.
func (*OpenAIService) Update ¶
func (r *OpenAIService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *OpenAIUpdateResponse, err error)
Simple pass-through for OpenAI. Use this if you want to directly send a request to OpenAI.
type OpenAIUpdateResponse ¶
type OpenAIUpdateResponse = interface{}
type OrgMemberParam ¶
type OrgMemberParam struct {
Role param.Field[OrgMemberRole] `json:"role,required"`
// The email address of the user to add. Either user_id or user_email must be
// provided
UserEmail param.Field[string] `json:"user_email"`
// The unique ID of the user to add. Either user_id or user_email must be provided
UserID param.Field[string] `json:"user_id"`
}
func (OrgMemberParam) MarshalJSON ¶
func (r OrgMemberParam) MarshalJSON() (data []byte, err error)
type OrgMemberRole ¶
type OrgMemberRole string
const ( OrgMemberRoleOrgAdmin OrgMemberRole = "org_admin" OrgMemberRoleInternalUser OrgMemberRole = "internal_user" OrgMemberRoleInternalUserViewer OrgMemberRole = "internal_user_viewer" )
func (OrgMemberRole) IsKnown ¶
func (r OrgMemberRole) IsKnown() bool
type OrganizationAddMemberParams ¶
type OrganizationAddMemberParams struct {
Member param.Field[OrganizationAddMemberParamsMemberUnion] `json:"member,required"`
OrganizationID param.Field[string] `json:"organization_id,required"`
MaxBudgetInOrganization param.Field[float64] `json:"max_budget_in_organization"`
}
func (OrganizationAddMemberParams) MarshalJSON ¶
func (r OrganizationAddMemberParams) MarshalJSON() (data []byte, err error)
type OrganizationAddMemberParamsMemberArray ¶
type OrganizationAddMemberParamsMemberArray []OrgMemberParam
type OrganizationAddMemberParamsMemberUnion ¶
type OrganizationAddMemberParamsMemberUnion interface {
// contains filtered or unexported methods
}
Satisfied by OrganizationAddMemberParamsMemberArray, OrgMemberParam.
type OrganizationAddMemberResponse ¶
type OrganizationAddMemberResponse struct {
OrganizationID string `json:"organization_id,required"`
UpdatedOrganizationMemberships []OrganizationMembershipTable `json:"updated_organization_memberships,required"`
UpdatedUsers []OrganizationAddMemberResponseUpdatedUser `json:"updated_users,required"`
JSON organizationAddMemberResponseJSON `json:"-"`
}
func (*OrganizationAddMemberResponse) UnmarshalJSON ¶
func (r *OrganizationAddMemberResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationAddMemberResponseUpdatedUser ¶
type OrganizationAddMemberResponseUpdatedUser struct {
UserID string `json:"user_id,required"`
BudgetDuration string `json:"budget_duration,nullable"`
BudgetResetAt time.Time `json:"budget_reset_at,nullable" format:"date-time"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
MaxBudget float64 `json:"max_budget,nullable"`
Metadata map[string]interface{} `json:"metadata,nullable"`
ModelMaxBudget map[string]interface{} `json:"model_max_budget,nullable"`
ModelSpend map[string]interface{} `json:"model_spend,nullable"`
Models []interface{} `json:"models"`
// Represents a LiteLLM_ObjectPermissionTable record
ObjectPermission OrganizationAddMemberResponseUpdatedUsersObjectPermission `json:"object_permission,nullable"`
OrganizationMemberships []OrganizationMembershipTable `json:"organization_memberships,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
Spend float64 `json:"spend"`
SSOUserID string `json:"sso_user_id,nullable"`
Teams []string `json:"teams"`
TpmLimit int64 `json:"tpm_limit,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
UserAlias string `json:"user_alias,nullable"`
UserEmail string `json:"user_email,nullable"`
UserRole string `json:"user_role,nullable"`
JSON organizationAddMemberResponseUpdatedUserJSON `json:"-"`
}
func (*OrganizationAddMemberResponseUpdatedUser) UnmarshalJSON ¶
func (r *OrganizationAddMemberResponseUpdatedUser) UnmarshalJSON(data []byte) (err error)
type OrganizationAddMemberResponseUpdatedUsersObjectPermission ¶
type OrganizationAddMemberResponseUpdatedUsersObjectPermission struct {
ObjectPermissionID string `json:"object_permission_id,required"`
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON organizationAddMemberResponseUpdatedUsersObjectPermissionJSON `json:"-"`
}
Represents a LiteLLM_ObjectPermissionTable record
func (*OrganizationAddMemberResponseUpdatedUsersObjectPermission) UnmarshalJSON ¶
func (r *OrganizationAddMemberResponseUpdatedUsersObjectPermission) UnmarshalJSON(data []byte) (err error)
type OrganizationDeleteMemberParams ¶
type OrganizationDeleteMemberParams struct {
OrganizationID param.Field[string] `json:"organization_id,required"`
UserEmail param.Field[string] `json:"user_email"`
UserID param.Field[string] `json:"user_id"`
}
func (OrganizationDeleteMemberParams) MarshalJSON ¶
func (r OrganizationDeleteMemberParams) MarshalJSON() (data []byte, err error)
type OrganizationDeleteMemberResponse ¶
type OrganizationDeleteMemberResponse = interface{}
type OrganizationDeleteParams ¶
type OrganizationDeleteParams struct {
OrganizationIDs param.Field[[]string] `json:"organization_ids,required"`
}
func (OrganizationDeleteParams) MarshalJSON ¶
func (r OrganizationDeleteParams) MarshalJSON() (data []byte, err error)
type OrganizationInfoDeprecatedParams ¶
type OrganizationInfoDeprecatedParams struct {
Organizations param.Field[[]string] `json:"organizations,required"`
}
func (OrganizationInfoDeprecatedParams) MarshalJSON ¶
func (r OrganizationInfoDeprecatedParams) MarshalJSON() (data []byte, err error)
type OrganizationInfoDeprecatedResponse ¶
type OrganizationInfoDeprecatedResponse = interface{}
type OrganizationInfoGetParams ¶
type OrganizationInfoGetParams struct {
OrganizationID param.Field[string] `query:"organization_id,required"`
}
func (OrganizationInfoGetParams) URLQuery ¶
func (r OrganizationInfoGetParams) URLQuery() (v url.Values)
URLQuery serializes OrganizationInfoGetParams's query parameters as `url.Values`.
type OrganizationInfoService ¶
type OrganizationInfoService struct {
Options []option.RequestOption
}
OrganizationInfoService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationInfoService method instead.
func NewOrganizationInfoService ¶
func NewOrganizationInfoService(opts ...option.RequestOption) (r *OrganizationInfoService)
NewOrganizationInfoService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrganizationInfoService) Deprecated ¶
func (r *OrganizationInfoService) Deprecated(ctx context.Context, body OrganizationInfoDeprecatedParams, opts ...option.RequestOption) (res *OrganizationInfoDeprecatedResponse, err error)
DEPRECATED: Use GET /organization/info instead
func (*OrganizationInfoService) Get ¶
func (r *OrganizationInfoService) Get(ctx context.Context, query OrganizationInfoGetParams, opts ...option.RequestOption) (res *OrganizationTableWithMembers, err error)
Get the org specific information
type OrganizationListParams ¶
type OrganizationListParams struct {
// Filter organizations by partial organization_alias match. Supports
// case-insensitive search.
OrgAlias param.Field[string] `query:"org_alias"`
// Filter organizations by exact organization_id match
OrgID param.Field[string] `query:"org_id"`
}
func (OrganizationListParams) URLQuery ¶
func (r OrganizationListParams) URLQuery() (v url.Values)
URLQuery serializes OrganizationListParams's query parameters as `url.Values`.
type OrganizationMembershipTable ¶
type OrganizationMembershipTable struct {
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
OrganizationID string `json:"organization_id,required"`
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
UserID string `json:"user_id,required"`
BudgetID string `json:"budget_id,nullable"`
// Represents user-controllable params for a LiteLLM_BudgetTable record
LitellmBudgetTable BudgetTable `json:"litellm_budget_table,nullable"`
Spend float64 `json:"spend"`
User interface{} `json:"user"`
UserRole string `json:"user_role,nullable"`
JSON organizationMembershipTableJSON `json:"-"`
}
This is the table that track what organizations a user belongs to and users spend within the organization
func (*OrganizationMembershipTable) UnmarshalJSON ¶
func (r *OrganizationMembershipTable) UnmarshalJSON(data []byte) (err error)
type OrganizationNewParams ¶
type OrganizationNewParams struct {
OrganizationAlias param.Field[string] `json:"organization_alias,required"`
BudgetDuration param.Field[string] `json:"budget_duration"`
BudgetID param.Field[string] `json:"budget_id"`
MaxBudget param.Field[float64] `json:"max_budget"`
MaxParallelRequests param.Field[int64] `json:"max_parallel_requests"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
ModelMaxBudget param.Field[map[string]interface{}] `json:"model_max_budget"`
ModelRpmLimit param.Field[map[string]int64] `json:"model_rpm_limit"`
ModelTpmLimit param.Field[map[string]int64] `json:"model_tpm_limit"`
Models param.Field[[]interface{}] `json:"models"`
ObjectPermission param.Field[OrganizationNewParamsObjectPermission] `json:"object_permission"`
OrganizationID param.Field[string] `json:"organization_id"`
RpmLimit param.Field[int64] `json:"rpm_limit"`
SoftBudget param.Field[float64] `json:"soft_budget"`
TpmLimit param.Field[int64] `json:"tpm_limit"`
}
func (OrganizationNewParams) MarshalJSON ¶
func (r OrganizationNewParams) MarshalJSON() (data []byte, err error)
type OrganizationNewParamsObjectPermission ¶
type OrganizationNewParamsObjectPermission struct {
AgentAccessGroups param.Field[[]string] `json:"agent_access_groups"`
Agents param.Field[[]string] `json:"agents"`
McpAccessGroups param.Field[[]string] `json:"mcp_access_groups"`
McpServers param.Field[[]string] `json:"mcp_servers"`
McpToolPermissions param.Field[map[string][]string] `json:"mcp_tool_permissions"`
VectorStores param.Field[[]string] `json:"vector_stores"`
}
func (OrganizationNewParamsObjectPermission) MarshalJSON ¶
func (r OrganizationNewParamsObjectPermission) MarshalJSON() (data []byte, err error)
type OrganizationNewResponse ¶
type OrganizationNewResponse struct {
BudgetID string `json:"budget_id,required"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CreatedBy string `json:"created_by,required"`
Models []string `json:"models,required"`
OrganizationID string `json:"organization_id,required"`
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
UpdatedBy string `json:"updated_by,required"`
// Represents user-controllable params for a LiteLLM_BudgetTable record
LitellmBudgetTable BudgetTable `json:"litellm_budget_table,nullable"`
Metadata map[string]interface{} `json:"metadata,nullable"`
// Represents a LiteLLM_ObjectPermissionTable record
ObjectPermission OrganizationNewResponseObjectPermission `json:"object_permission,nullable"`
ObjectPermissionID string `json:"object_permission_id,nullable"`
OrganizationAlias string `json:"organization_alias,nullable"`
Spend float64 `json:"spend"`
Users []OrganizationNewResponseUser `json:"users,nullable"`
JSON organizationNewResponseJSON `json:"-"`
}
func (*OrganizationNewResponse) UnmarshalJSON ¶
func (r *OrganizationNewResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationNewResponseObjectPermission ¶
type OrganizationNewResponseObjectPermission struct {
ObjectPermissionID string `json:"object_permission_id,required"`
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON organizationNewResponseObjectPermissionJSON `json:"-"`
}
Represents a LiteLLM_ObjectPermissionTable record
func (*OrganizationNewResponseObjectPermission) UnmarshalJSON ¶
func (r *OrganizationNewResponseObjectPermission) UnmarshalJSON(data []byte) (err error)
type OrganizationNewResponseUser ¶
type OrganizationNewResponseUser struct {
UserID string `json:"user_id,required"`
BudgetDuration string `json:"budget_duration,nullable"`
BudgetResetAt time.Time `json:"budget_reset_at,nullable" format:"date-time"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
MaxBudget float64 `json:"max_budget,nullable"`
Metadata map[string]interface{} `json:"metadata,nullable"`
ModelMaxBudget map[string]interface{} `json:"model_max_budget,nullable"`
ModelSpend map[string]interface{} `json:"model_spend,nullable"`
Models []interface{} `json:"models"`
// Represents a LiteLLM_ObjectPermissionTable record
ObjectPermission OrganizationNewResponseUsersObjectPermission `json:"object_permission,nullable"`
OrganizationMemberships []OrganizationMembershipTable `json:"organization_memberships,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
Spend float64 `json:"spend"`
SSOUserID string `json:"sso_user_id,nullable"`
Teams []string `json:"teams"`
TpmLimit int64 `json:"tpm_limit,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
UserAlias string `json:"user_alias,nullable"`
UserEmail string `json:"user_email,nullable"`
UserRole string `json:"user_role,nullable"`
JSON organizationNewResponseUserJSON `json:"-"`
}
func (*OrganizationNewResponseUser) UnmarshalJSON ¶
func (r *OrganizationNewResponseUser) UnmarshalJSON(data []byte) (err error)
type OrganizationNewResponseUsersObjectPermission ¶
type OrganizationNewResponseUsersObjectPermission struct {
ObjectPermissionID string `json:"object_permission_id,required"`
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON organizationNewResponseUsersObjectPermissionJSON `json:"-"`
}
Represents a LiteLLM_ObjectPermissionTable record
func (*OrganizationNewResponseUsersObjectPermission) UnmarshalJSON ¶
func (r *OrganizationNewResponseUsersObjectPermission) UnmarshalJSON(data []byte) (err error)
type OrganizationService ¶
type OrganizationService struct {
Options []option.RequestOption
Info *OrganizationInfoService
}
OrganizationService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationService method instead.
func NewOrganizationService ¶
func NewOrganizationService(opts ...option.RequestOption) (r *OrganizationService)
NewOrganizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrganizationService) AddMember ¶
func (r *OrganizationService) AddMember(ctx context.Context, body OrganizationAddMemberParams, opts ...option.RequestOption) (res *OrganizationAddMemberResponse, err error)
[BETA]
Add new members (either via user_email or user_id) to an organization
If user doesn't exist, new user row will also be added to User Table
Only proxy_admin or org_admin of organization, allowed to access this endpoint.
Parameters: ¶
- organization_id: str (required) - member: Union[List[Member], Member] (required)
- role: Literal[LitellmUserRoles] (required)
- user_id: Optional[str]
- user_email: Optional[str]
Note: Either user_id or user_email must be provided for each member.
Example:
```
curl -X POST 'http://0.0.0.0:4000/organization/member_add' -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{
"organization_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849",
"member": {
"role": "internal_user",
"user_id": "krrish247652@berri.ai"
},
"max_budget_in_organization": 100.0
}'
```
The following is executed in this function:
- Check if organization exists
- Creates a new Internal User if the user_id or user_email is not found in LiteLLM_UserTable
- Add Internal User to the `LiteLLM_OrganizationMembership` table
func (*OrganizationService) Delete ¶
func (r *OrganizationService) Delete(ctx context.Context, body OrganizationDeleteParams, opts ...option.RequestOption) (res *[]OrganizationTableWithMembers, err error)
Delete an organization
Parameters: ¶
- organization_ids: List[str] - The organization ids to delete.
func (*OrganizationService) DeleteMember ¶
func (r *OrganizationService) DeleteMember(ctx context.Context, body OrganizationDeleteMemberParams, opts ...option.RequestOption) (res *OrganizationDeleteMemberResponse, err error)
Delete a member from an organization
func (*OrganizationService) List ¶
func (r *OrganizationService) List(ctx context.Context, query OrganizationListParams, opts ...option.RequestOption) (res *[]OrganizationTableWithMembers, err error)
Get a list of organizations with optional filtering.
Parameters: org_id: Optional[str] Filter organizations by exact organization_id match org_alias: Optional[str] Filter organizations by partial organization_alias match (case-insensitive)
Example:
``` curl --location --request GET 'http://0.0.0.0:4000/organization/list?org_alias=my-org' --header 'Authorization: Bearer sk-1234' ```
Example with org_id:
``` curl --location --request GET 'http://0.0.0.0:4000/organization/list?org_id=123e4567-e89b-12d3-a456-426614174000' --header 'Authorization: Bearer sk-1234' ```
func (*OrganizationService) New ¶
func (r *OrganizationService) New(ctx context.Context, body OrganizationNewParams, opts ...option.RequestOption) (res *OrganizationNewResponse, err error)
Allow orgs to own teams
Set org level budgets + model access.
Only admins can create orgs.
Parameters ¶
- organization_alias: _str_ - The name of the organization.
- models: _List_ - The models the organization has access to.
- budget_id: _Optional[str]_ - The id for a budget (tpm/rpm/max budget) for the organization.
### IF NO BUDGET ID - CREATE ONE WITH THESE PARAMS
- max_budget: _Optional[float]_ - Max budget for org
- tpm_limit: _Optional[int]_ - Max tpm limit for org
- rpm_limit: _Optional[int]_ - Max rpm limit for org
- model_rpm_limit: _Optional[Dict[str, int]]_ - The RPM (Requests Per Minute) limit per model for this organization.
- model_tpm_limit: _Optional[Dict[str, int]]_ - The TPM (Tokens Per Minute) limit per model for this organization.
- max_parallel_requests: _Optional[int]_ - [Not Implemented Yet] Max parallel requests for org
- soft_budget: _Optional[float]_ - [Not Implemented Yet] Get a slack alert when this soft budget is reached. Don't block requests.
- model_max_budget: _Optional[dict]_ - Max budget for a specific model
- budget_duration: _Optional[str]_ - Frequency of reseting org budget
- metadata: _Optional[dict]_ - Metadata for organization, store information for organization. Example metadata - {"extra_info": "some info"}
- blocked: _bool_ - Flag indicating if the org is blocked or not - will stop all calls from keys with this org_id.
- tags: _Optional[List[str]]_ - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing).
- organization_id: _Optional[str]_ - The organization id of the team. Default is None. Create via `/organization/new`.
- model_aliases: Optional[dict] - Model aliases for the team. [Docs](https://docs.litellm.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
- object_permission: Optional[LiteLLM_ObjectPermissionBase] - organization-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"]}. IF null or {} then no object permission. Case 1: Create new org **without** a budget_id
```bash curl --location 'http://0.0.0.0:4000/organization/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json'
--data '{
"organization_alias": "my-secret-org",
"models": ["model1", "model2"],
"max_budget": 100
}'
```
Case 2: Create new org **with** a budget_id
```bash curl --location 'http://0.0.0.0:4000/organization/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json'
--data '{
"organization_alias": "my-secret-org",
"models": ["model1", "model2"],
"budget_id": "428eeaa8-f3ac-4e85-a8fb-7dc8d7aa8689"
}'
```
func (*OrganizationService) Update ¶
func (r *OrganizationService) Update(ctx context.Context, opts ...option.RequestOption) (res *OrganizationTableWithMembers, err error)
Update an organization
func (*OrganizationService) UpdateMember ¶
func (r *OrganizationService) UpdateMember(ctx context.Context, body OrganizationUpdateMemberParams, opts ...option.RequestOption) (res *OrganizationMembershipTable, err error)
Update a member's role in an organization
type OrganizationTableWithMembers ¶
type OrganizationTableWithMembers struct {
BudgetID string `json:"budget_id,required"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
CreatedBy string `json:"created_by,required"`
Models []string `json:"models,required"`
UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
UpdatedBy string `json:"updated_by,required"`
// Represents user-controllable params for a LiteLLM_BudgetTable record
LitellmBudgetTable BudgetTable `json:"litellm_budget_table,nullable"`
Members []OrganizationMembershipTable `json:"members"`
Metadata map[string]interface{} `json:"metadata,nullable"`
// Represents a LiteLLM_ObjectPermissionTable record
ObjectPermission OrganizationTableWithMembersObjectPermission `json:"object_permission,nullable"`
ObjectPermissionID string `json:"object_permission_id,nullable"`
OrganizationAlias string `json:"organization_alias,nullable"`
OrganizationID string `json:"organization_id,nullable"`
Spend float64 `json:"spend"`
Teams []OrganizationTableWithMembersTeam `json:"teams"`
Users []OrganizationTableWithMembersUser `json:"users,nullable"`
JSON organizationTableWithMembersJSON `json:"-"`
}
Returned by the /organization/info endpoint and /organization/list endpoint
func (*OrganizationTableWithMembers) UnmarshalJSON ¶
func (r *OrganizationTableWithMembers) UnmarshalJSON(data []byte) (err error)
type OrganizationTableWithMembersObjectPermission ¶
type OrganizationTableWithMembersObjectPermission struct {
ObjectPermissionID string `json:"object_permission_id,required"`
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON organizationTableWithMembersObjectPermissionJSON `json:"-"`
}
Represents a LiteLLM_ObjectPermissionTable record
func (*OrganizationTableWithMembersObjectPermission) UnmarshalJSON ¶
func (r *OrganizationTableWithMembersObjectPermission) UnmarshalJSON(data []byte) (err error)
type OrganizationTableWithMembersTeam ¶
type OrganizationTableWithMembersTeam struct {
TeamID string `json:"team_id,required"`
Admins []interface{} `json:"admins"`
Blocked bool `json:"blocked"`
BudgetDuration string `json:"budget_duration,nullable"`
BudgetResetAt time.Time `json:"budget_reset_at,nullable" format:"date-time"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
LitellmModelTable interface{} `json:"litellm_model_table"`
MaxBudget float64 `json:"max_budget,nullable"`
MaxParallelRequests int64 `json:"max_parallel_requests,nullable"`
Members []interface{} `json:"members"`
MembersWithRoles []Member `json:"members_with_roles"`
Metadata map[string]interface{} `json:"metadata,nullable"`
ModelID int64 `json:"model_id,nullable"`
Models []interface{} `json:"models"`
// Represents a LiteLLM_ObjectPermissionTable record
ObjectPermission OrganizationTableWithMembersTeamsObjectPermission `json:"object_permission,nullable"`
ObjectPermissionID string `json:"object_permission_id,nullable"`
OrganizationID string `json:"organization_id,nullable"`
RouterSettings map[string]interface{} `json:"router_settings,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
Spend float64 `json:"spend,nullable"`
TeamAlias string `json:"team_alias,nullable"`
TeamMemberPermissions []string `json:"team_member_permissions,nullable"`
TpmLimit int64 `json:"tpm_limit,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
JSON organizationTableWithMembersTeamJSON `json:"-"`
}
func (*OrganizationTableWithMembersTeam) UnmarshalJSON ¶
func (r *OrganizationTableWithMembersTeam) UnmarshalJSON(data []byte) (err error)
type OrganizationTableWithMembersTeamsObjectPermission ¶
type OrganizationTableWithMembersTeamsObjectPermission struct {
ObjectPermissionID string `json:"object_permission_id,required"`
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON organizationTableWithMembersTeamsObjectPermissionJSON `json:"-"`
}
Represents a LiteLLM_ObjectPermissionTable record
func (*OrganizationTableWithMembersTeamsObjectPermission) UnmarshalJSON ¶
func (r *OrganizationTableWithMembersTeamsObjectPermission) UnmarshalJSON(data []byte) (err error)
type OrganizationTableWithMembersUser ¶
type OrganizationTableWithMembersUser struct {
UserID string `json:"user_id,required"`
BudgetDuration string `json:"budget_duration,nullable"`
BudgetResetAt time.Time `json:"budget_reset_at,nullable" format:"date-time"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
MaxBudget float64 `json:"max_budget,nullable"`
Metadata map[string]interface{} `json:"metadata,nullable"`
ModelMaxBudget map[string]interface{} `json:"model_max_budget,nullable"`
ModelSpend map[string]interface{} `json:"model_spend,nullable"`
Models []interface{} `json:"models"`
// Represents a LiteLLM_ObjectPermissionTable record
ObjectPermission OrganizationTableWithMembersUsersObjectPermission `json:"object_permission,nullable"`
OrganizationMemberships []OrganizationMembershipTable `json:"organization_memberships,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
Spend float64 `json:"spend"`
SSOUserID string `json:"sso_user_id,nullable"`
Teams []string `json:"teams"`
TpmLimit int64 `json:"tpm_limit,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
UserAlias string `json:"user_alias,nullable"`
UserEmail string `json:"user_email,nullable"`
UserRole string `json:"user_role,nullable"`
JSON organizationTableWithMembersUserJSON `json:"-"`
}
func (*OrganizationTableWithMembersUser) UnmarshalJSON ¶
func (r *OrganizationTableWithMembersUser) UnmarshalJSON(data []byte) (err error)
type OrganizationTableWithMembersUsersObjectPermission ¶
type OrganizationTableWithMembersUsersObjectPermission struct {
ObjectPermissionID string `json:"object_permission_id,required"`
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON organizationTableWithMembersUsersObjectPermissionJSON `json:"-"`
}
Represents a LiteLLM_ObjectPermissionTable record
func (*OrganizationTableWithMembersUsersObjectPermission) UnmarshalJSON ¶
func (r *OrganizationTableWithMembersUsersObjectPermission) UnmarshalJSON(data []byte) (err error)
type OrganizationUpdateMemberParams ¶
type OrganizationUpdateMemberParams struct {
OrganizationID param.Field[string] `json:"organization_id,required"`
MaxBudgetInOrganization param.Field[float64] `json:"max_budget_in_organization"`
// Admin Roles: PROXY_ADMIN: admin over the platform PROXY_ADMIN_VIEW_ONLY: can
// login, view all own keys, view all spend ORG_ADMIN: admin over a specific
// organization, can create teams, users only within their organization
//
// Internal User Roles: INTERNAL_USER: can login, view/create/delete their own
// keys, view their spend INTERNAL_USER_VIEW_ONLY: can login, view their own keys,
// view their own spend
//
// Team Roles: TEAM: used for JWT auth
//
// Customer Roles: CUSTOMER: External users -> these are customers
Role param.Field[UserRoles] `json:"role"`
UserEmail param.Field[string] `json:"user_email"`
UserID param.Field[string] `json:"user_id"`
}
func (OrganizationUpdateMemberParams) MarshalJSON ¶
func (r OrganizationUpdateMemberParams) MarshalJSON() (data []byte, err error)
type PassThroughEndpointResponse ¶
type PassThroughEndpointResponse struct {
Endpoints []PassThroughGenericEndpoint `json:"endpoints,required"`
JSON passThroughEndpointResponseJSON `json:"-"`
}
func (*PassThroughEndpointResponse) UnmarshalJSON ¶
func (r *PassThroughEndpointResponse) UnmarshalJSON(data []byte) (err error)
type PassThroughGenericEndpoint ¶
type PassThroughGenericEndpoint struct {
// The route to be added to the LiteLLM Proxy Server.
Path string `json:"path,required"`
// The URL to which requests for this path should be forwarded.
Target string `json:"target,required"`
// Optional unique identifier for the pass-through endpoint. If not provided,
// endpoints will be identified by path for backwards compatibility.
ID string `json:"id,nullable"`
// Whether authentication is required for the pass-through endpoint. If True,
// requests to the endpoint will require a valid LiteLLM API key.
Auth bool `json:"auth"`
// The USD cost per request to the target endpoint. This is used to calculate the
// cost of the request to the target endpoint.
CostPerRequest float64 `json:"cost_per_request"`
// Guardrails configuration for this passthrough endpoint. Dict keys are guardrail
// names, values are optional settings for field targeting. When set, all
// org/team/key level guardrails will also execute. Defaults to None (no guardrails
// execute).
Guardrails map[string]PassThroughGenericEndpointGuardrail `json:"guardrails,nullable"`
// Key-value pairs of headers to be forwarded with the request. You can set any key
// value pair here and it will be forwarded to your target endpoint
Headers map[string]interface{} `json:"headers"`
// If True, requests to subpaths of the path will be forwarded to the target
// endpoint. For example, if the path is /bria and include_subpath is True,
// requests to /bria/v1/text-to-image/base/2.3 will be forwarded to the target
// endpoint.
IncludeSubpath bool `json:"include_subpath"`
JSON passThroughGenericEndpointJSON `json:"-"`
}
func (*PassThroughGenericEndpoint) UnmarshalJSON ¶
func (r *PassThroughGenericEndpoint) UnmarshalJSON(data []byte) (err error)
type PassThroughGenericEndpointGuardrail ¶
type PassThroughGenericEndpointGuardrail struct {
// JSONPath expressions for input field targeting (pre_call). Examples: 'query',
// 'documents[*].text', 'messages[*].content'. If not specified, guardrail runs on
// entire request payload.
RequestFields []string `json:"request_fields,nullable"`
// JSONPath expressions for output field targeting (post_call). Examples:
// 'results[*].text', 'output'. If not specified, guardrail runs on entire response
// payload.
ResponseFields []string `json:"response_fields,nullable"`
JSON passThroughGenericEndpointGuardrailJSON `json:"-"`
}
Settings for a specific guardrail on a passthrough endpoint.
Allows field-level targeting for guardrail execution.
func (*PassThroughGenericEndpointGuardrail) UnmarshalJSON ¶
func (r *PassThroughGenericEndpointGuardrail) UnmarshalJSON(data []byte) (err error)
type PassThroughGenericEndpointGuardrailParam ¶
type PassThroughGenericEndpointGuardrailParam struct {
// JSONPath expressions for input field targeting (pre_call). Examples: 'query',
// 'documents[*].text', 'messages[*].content'. If not specified, guardrail runs on
// entire request payload.
RequestFields param.Field[[]string] `json:"request_fields"`
// JSONPath expressions for output field targeting (post_call). Examples:
// 'results[*].text', 'output'. If not specified, guardrail runs on entire response
// payload.
ResponseFields param.Field[[]string] `json:"response_fields"`
}
Settings for a specific guardrail on a passthrough endpoint.
Allows field-level targeting for guardrail execution.
func (PassThroughGenericEndpointGuardrailParam) MarshalJSON ¶
func (r PassThroughGenericEndpointGuardrailParam) MarshalJSON() (data []byte, err error)
type PassThroughGenericEndpointParam ¶
type PassThroughGenericEndpointParam struct {
// The route to be added to the LiteLLM Proxy Server.
Path param.Field[string] `json:"path,required"`
// The URL to which requests for this path should be forwarded.
Target param.Field[string] `json:"target,required"`
// Optional unique identifier for the pass-through endpoint. If not provided,
// endpoints will be identified by path for backwards compatibility.
ID param.Field[string] `json:"id"`
// Whether authentication is required for the pass-through endpoint. If True,
// requests to the endpoint will require a valid LiteLLM API key.
Auth param.Field[bool] `json:"auth"`
// The USD cost per request to the target endpoint. This is used to calculate the
// cost of the request to the target endpoint.
CostPerRequest param.Field[float64] `json:"cost_per_request"`
// Guardrails configuration for this passthrough endpoint. Dict keys are guardrail
// names, values are optional settings for field targeting. When set, all
// org/team/key level guardrails will also execute. Defaults to None (no guardrails
// execute).
Guardrails param.Field[map[string]PassThroughGenericEndpointGuardrailParam] `json:"guardrails"`
// Key-value pairs of headers to be forwarded with the request. You can set any key
// value pair here and it will be forwarded to your target endpoint
Headers param.Field[map[string]interface{}] `json:"headers"`
// If True, requests to subpaths of the path will be forwarded to the target
// endpoint. For example, if the path is /bria and include_subpath is True,
// requests to /bria/v1/text-to-image/base/2.3 will be forwarded to the target
// endpoint.
IncludeSubpath param.Field[bool] `json:"include_subpath"`
}
func (PassThroughGenericEndpointParam) MarshalJSON ¶
func (r PassThroughGenericEndpointParam) MarshalJSON() (data []byte, err error)
type ProviderListBudgetsResponse ¶
type ProviderListBudgetsResponse struct {
Providers map[string]ProviderListBudgetsResponseProvider `json:"providers"`
JSON providerListBudgetsResponseJSON `json:"-"`
}
Complete provider budget configuration and status. Maps provider names to their budget configs.
func (*ProviderListBudgetsResponse) UnmarshalJSON ¶
func (r *ProviderListBudgetsResponse) UnmarshalJSON(data []byte) (err error)
type ProviderListBudgetsResponseProvider ¶
type ProviderListBudgetsResponseProvider struct {
BudgetLimit float64 `json:"budget_limit,required,nullable"`
TimePeriod string `json:"time_period,required,nullable"`
BudgetResetAt string `json:"budget_reset_at,nullable"`
Spend float64 `json:"spend,nullable"`
JSON providerListBudgetsResponseProviderJSON `json:"-"`
}
Configuration for a single provider's budget settings
func (*ProviderListBudgetsResponseProvider) UnmarshalJSON ¶
func (r *ProviderListBudgetsResponseProvider) UnmarshalJSON(data []byte) (err error)
type ProviderService ¶
type ProviderService struct {
Options []option.RequestOption
}
ProviderService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProviderService method instead.
func NewProviderService ¶
func NewProviderService(opts ...option.RequestOption) (r *ProviderService)
NewProviderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProviderService) ListBudgets ¶
func (r *ProviderService) ListBudgets(ctx context.Context, opts ...option.RequestOption) (res *ProviderListBudgetsResponse, err error)
Provider Budget Routing - Get Budget, Spend Details https://docs.litellm.ai/docs/proxy/provider_budget_routing
Use this endpoint to check current budget, spend and budget reset time for a provider
Example Request ¶
```bash curl -X GET http://localhost:4000/provider/budgets -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" ```
Example Response ¶
```json
{
"providers": {
"openai": {
"budget_limit": 1e-12,
"time_period": "1d",
"spend": 0.0,
"budget_reset_at": null
},
"azure": {
"budget_limit": 100.0,
"time_period": "1d",
"spend": 0.0,
"budget_reset_at": null
},
"anthropic": {
"budget_limit": 100.0,
"time_period": "10d",
"spend": 0.0,
"budget_reset_at": null
},
"vertex_ai": {
"budget_limit": 100.0,
"time_period": "12d",
"spend": 0.0,
"budget_reset_at": null
}
}
}
```
type RegenerateKeyRequestAllowedVectorStoreIndexParam ¶
type RegenerateKeyRequestAllowedVectorStoreIndexParam struct {
IndexName param.Field[string] `json:"index_name,required"`
IndexPermissions param.Field[[]RegenerateKeyRequestAllowedVectorStoreIndexesIndexPermission] `json:"index_permissions,required"`
}
func (RegenerateKeyRequestAllowedVectorStoreIndexParam) MarshalJSON ¶
func (r RegenerateKeyRequestAllowedVectorStoreIndexParam) MarshalJSON() (data []byte, err error)
type RegenerateKeyRequestAllowedVectorStoreIndexesIndexPermission ¶
type RegenerateKeyRequestAllowedVectorStoreIndexesIndexPermission string
const ( RegenerateKeyRequestAllowedVectorStoreIndexesIndexPermissionRead RegenerateKeyRequestAllowedVectorStoreIndexesIndexPermission = "read" RegenerateKeyRequestAllowedVectorStoreIndexesIndexPermissionWrite RegenerateKeyRequestAllowedVectorStoreIndexesIndexPermission = "write" )
func (RegenerateKeyRequestAllowedVectorStoreIndexesIndexPermission) IsKnown ¶
func (r RegenerateKeyRequestAllowedVectorStoreIndexesIndexPermission) IsKnown() bool
type RegenerateKeyRequestKeyType ¶
type RegenerateKeyRequestKeyType string
Enum for key types that determine what routes a key can access
const ( RegenerateKeyRequestKeyTypeLlmAPI RegenerateKeyRequestKeyType = "llm_api" RegenerateKeyRequestKeyTypeManagement RegenerateKeyRequestKeyType = "management" RegenerateKeyRequestKeyTypeReadOnly RegenerateKeyRequestKeyType = "read_only" RegenerateKeyRequestKeyTypeDefault RegenerateKeyRequestKeyType = "default" )
func (RegenerateKeyRequestKeyType) IsKnown ¶
func (r RegenerateKeyRequestKeyType) IsKnown() bool
type RegenerateKeyRequestObjectPermissionParam ¶
type RegenerateKeyRequestObjectPermissionParam struct {
AgentAccessGroups param.Field[[]string] `json:"agent_access_groups"`
Agents param.Field[[]string] `json:"agents"`
McpAccessGroups param.Field[[]string] `json:"mcp_access_groups"`
McpServers param.Field[[]string] `json:"mcp_servers"`
McpToolPermissions param.Field[map[string][]string] `json:"mcp_tool_permissions"`
VectorStores param.Field[[]string] `json:"vector_stores"`
}
func (RegenerateKeyRequestObjectPermissionParam) MarshalJSON ¶
func (r RegenerateKeyRequestObjectPermissionParam) MarshalJSON() (data []byte, err error)
type RegenerateKeyRequestParam ¶
type RegenerateKeyRequestParam struct {
Aliases param.Field[map[string]interface{}] `json:"aliases"`
AllowedCacheControls param.Field[[]interface{}] `json:"allowed_cache_controls"`
AllowedPassthroughRoutes param.Field[[]interface{}] `json:"allowed_passthrough_routes"`
AllowedRoutes param.Field[[]interface{}] `json:"allowed_routes"`
AllowedVectorStoreIndexes param.Field[[]RegenerateKeyRequestAllowedVectorStoreIndexParam] `json:"allowed_vector_store_indexes"`
// Whether this key should be automatically rotated
AutoRotate param.Field[bool] `json:"auto_rotate"`
Blocked param.Field[bool] `json:"blocked"`
BudgetDuration param.Field[string] `json:"budget_duration"`
BudgetID param.Field[string] `json:"budget_id"`
Config param.Field[map[string]interface{}] `json:"config"`
Duration param.Field[string] `json:"duration"`
EnforcedParams param.Field[[]string] `json:"enforced_params"`
Guardrails param.Field[[]string] `json:"guardrails"`
Key param.Field[string] `json:"key"`
KeyAlias param.Field[string] `json:"key_alias"`
// Enum for key types that determine what routes a key can access
KeyType param.Field[RegenerateKeyRequestKeyType] `json:"key_type"`
MaxBudget param.Field[float64] `json:"max_budget"`
MaxParallelRequests param.Field[int64] `json:"max_parallel_requests"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
ModelMaxBudget param.Field[map[string]interface{}] `json:"model_max_budget"`
ModelRpmLimit param.Field[map[string]interface{}] `json:"model_rpm_limit"`
ModelTpmLimit param.Field[map[string]interface{}] `json:"model_tpm_limit"`
Models param.Field[[]interface{}] `json:"models"`
NewKey param.Field[string] `json:"new_key"`
NewMasterKey param.Field[string] `json:"new_master_key"`
ObjectPermission param.Field[RegenerateKeyRequestObjectPermissionParam] `json:"object_permission"`
OrganizationID param.Field[string] `json:"organization_id"`
Permissions param.Field[map[string]interface{}] `json:"permissions"`
Prompts param.Field[[]string] `json:"prompts"`
// How often to rotate this key (e.g., '30d', '90d'). Required if auto_rotate=True
RotationInterval param.Field[string] `json:"rotation_interval"`
// Set of params that you can modify via `router.update_settings()`.
RouterSettings param.Field[RegenerateKeyRequestRouterSettingsParam] `json:"router_settings"`
RpmLimit param.Field[int64] `json:"rpm_limit"`
RpmLimitType param.Field[RegenerateKeyRequestRpmLimitType] `json:"rpm_limit_type"`
SendInviteEmail param.Field[bool] `json:"send_invite_email"`
SoftBudget param.Field[float64] `json:"soft_budget"`
Spend param.Field[float64] `json:"spend"`
Tags param.Field[[]string] `json:"tags"`
TeamID param.Field[string] `json:"team_id"`
TpmLimit param.Field[int64] `json:"tpm_limit"`
TpmLimitType param.Field[RegenerateKeyRequestTpmLimitType] `json:"tpm_limit_type"`
UserID param.Field[string] `json:"user_id"`
}
func (RegenerateKeyRequestParam) MarshalJSON ¶
func (r RegenerateKeyRequestParam) MarshalJSON() (data []byte, err error)
type RegenerateKeyRequestRouterSettingsModelGroupAliasMapParam ¶
type RegenerateKeyRequestRouterSettingsModelGroupAliasMapParam map[string]interface{}
func (RegenerateKeyRequestRouterSettingsModelGroupAliasMapParam) ImplementsRegenerateKeyRequestRouterSettingsModelGroupAliasUnionParam ¶
func (r RegenerateKeyRequestRouterSettingsModelGroupAliasMapParam) ImplementsRegenerateKeyRequestRouterSettingsModelGroupAliasUnionParam()
type RegenerateKeyRequestRouterSettingsModelGroupAliasUnionParam ¶
type RegenerateKeyRequestRouterSettingsModelGroupAliasUnionParam interface {
ImplementsRegenerateKeyRequestRouterSettingsModelGroupAliasUnionParam()
}
Satisfied by shared.UnionString, RegenerateKeyRequestRouterSettingsModelGroupAliasMapParam.
type RegenerateKeyRequestRouterSettingsParam ¶
type RegenerateKeyRequestRouterSettingsParam struct {
AllowedFails param.Field[int64] `json:"allowed_fails"`
ContextWindowFallbacks param.Field[[]map[string]interface{}] `json:"context_window_fallbacks"`
CooldownTime param.Field[float64] `json:"cooldown_time"`
Fallbacks param.Field[[]map[string]interface{}] `json:"fallbacks"`
MaxRetries param.Field[int64] `json:"max_retries"`
ModelGroupAlias param.Field[map[string]RegenerateKeyRequestRouterSettingsModelGroupAliasUnionParam] `json:"model_group_alias"`
ModelGroupRetryPolicy param.Field[map[string]interface{}] `json:"model_group_retry_policy"`
NumRetries param.Field[int64] `json:"num_retries"`
RetryAfter param.Field[float64] `json:"retry_after"`
RoutingStrategy param.Field[string] `json:"routing_strategy"`
RoutingStrategyArgs param.Field[map[string]interface{}] `json:"routing_strategy_args"`
Timeout param.Field[float64] `json:"timeout"`
}
Set of params that you can modify via `router.update_settings()`.
func (RegenerateKeyRequestRouterSettingsParam) MarshalJSON ¶
func (r RegenerateKeyRequestRouterSettingsParam) MarshalJSON() (data []byte, err error)
type RegenerateKeyRequestRpmLimitType ¶
type RegenerateKeyRequestRpmLimitType string
const ( RegenerateKeyRequestRpmLimitTypeGuaranteedThroughput RegenerateKeyRequestRpmLimitType = "guaranteed_throughput" RegenerateKeyRequestRpmLimitTypeBestEffortThroughput RegenerateKeyRequestRpmLimitType = "best_effort_throughput" RegenerateKeyRequestRpmLimitTypeDynamic RegenerateKeyRequestRpmLimitType = "dynamic" )
func (RegenerateKeyRequestRpmLimitType) IsKnown ¶
func (r RegenerateKeyRequestRpmLimitType) IsKnown() bool
type RegenerateKeyRequestTpmLimitType ¶
type RegenerateKeyRequestTpmLimitType string
const ( RegenerateKeyRequestTpmLimitTypeGuaranteedThroughput RegenerateKeyRequestTpmLimitType = "guaranteed_throughput" RegenerateKeyRequestTpmLimitTypeBestEffortThroughput RegenerateKeyRequestTpmLimitType = "best_effort_throughput" RegenerateKeyRequestTpmLimitTypeDynamic RegenerateKeyRequestTpmLimitType = "dynamic" )
func (RegenerateKeyRequestTpmLimitType) IsKnown ¶
func (r RegenerateKeyRequestTpmLimitType) IsKnown() bool
type RerankNewResponse ¶
type RerankNewResponse = interface{}
type RerankNewV1Response ¶
type RerankNewV1Response = interface{}
type RerankNewV2Response ¶
type RerankNewV2Response = interface{}
type RerankService ¶
type RerankService struct {
Options []option.RequestOption
}
RerankService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRerankService method instead.
func NewRerankService ¶
func NewRerankService(opts ...option.RequestOption) (r *RerankService)
NewRerankService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RerankService) New ¶
func (r *RerankService) New(ctx context.Context, opts ...option.RequestOption) (res *RerankNewResponse, err error)
Rerank
func (*RerankService) NewV1 ¶
func (r *RerankService) NewV1(ctx context.Context, opts ...option.RequestOption) (res *RerankNewV1Response, err error)
Rerank
func (*RerankService) NewV2 ¶
func (r *RerankService) NewV2(ctx context.Context, opts ...option.RequestOption) (res *RerankNewV2Response, err error)
Rerank
type ResponseDeleteResponse ¶
type ResponseDeleteResponse = interface{}
type ResponseGetResponse ¶
type ResponseGetResponse = interface{}
type ResponseInputItemListResponse ¶
type ResponseInputItemListResponse = interface{}
type ResponseInputItemService ¶
type ResponseInputItemService struct {
Options []option.RequestOption
}
ResponseInputItemService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewResponseInputItemService method instead.
func NewResponseInputItemService ¶
func NewResponseInputItemService(opts ...option.RequestOption) (r *ResponseInputItemService)
NewResponseInputItemService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ResponseInputItemService) List ¶
func (r *ResponseInputItemService) List(ctx context.Context, responseID string, opts ...option.RequestOption) (res *ResponseInputItemListResponse, err error)
List input items for a response.
type ResponseNewResponse ¶
type ResponseNewResponse = interface{}
type ResponseService ¶
type ResponseService struct {
Options []option.RequestOption
InputItems *ResponseInputItemService
}
ResponseService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewResponseService method instead.
func NewResponseService ¶
func NewResponseService(opts ...option.RequestOption) (r *ResponseService)
NewResponseService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ResponseService) Delete ¶
func (r *ResponseService) Delete(ctx context.Context, responseID string, opts ...option.RequestOption) (res *ResponseDeleteResponse, err error)
Delete a response by ID.
Supports both:
- Polling IDs (litellm*poll*\*): Deletes from Redis cache - Provider response IDs: Passes through to provider API
Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/delete
```bash curl -X DELETE http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer sk-1234" ```
func (*ResponseService) Get ¶
func (r *ResponseService) Get(ctx context.Context, responseID string, opts ...option.RequestOption) (res *ResponseGetResponse, err error)
Get a response by ID.
Supports both:
- Polling IDs (litellm*poll*\*): Returns cumulative cached content from background responses
- Provider response IDs: Passes through to provider API
Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/get
```bash # Get polling response curl -X GET http://localhost:4000/v1/responses/litellm_poll_abc123 -H "Authorization: Bearer sk-1234"
# Get provider response curl -X GET http://localhost:4000/v1/responses/resp_abc123 -H "Authorization: Bearer sk-1234" ```
func (*ResponseService) New ¶
func (r *ResponseService) New(ctx context.Context, opts ...option.RequestOption) (res *ResponseNewResponse, err error)
Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses
Supports background mode with polling_via_cache for partial response retrieval. When background=true and polling_via_cache is enabled, returns a polling_id immediately and streams the response in the background, updating Redis cache.
```bash # Normal request
curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{
"model": "gpt-4o",
"input": "Tell me about AI"
}'
Background request with polling ¶
curl -X POST http://localhost:4000/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{
"model": "gpt-4o",
"input": "Tell me about AI",
"background": true
}'
```
type RouteListResponse ¶
type RouteListResponse = interface{}
type RouteService ¶
type RouteService struct {
Options []option.RequestOption
}
RouteService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRouteService method instead.
func NewRouteService ¶
func NewRouteService(opts ...option.RequestOption) (r *RouteService)
NewRouteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*RouteService) List ¶
func (r *RouteService) List(ctx context.Context, opts ...option.RequestOption) (res *RouteListResponse, err error)
Get a list of available routes in the FastAPI application.
type SettingGetResponse ¶
type SettingGetResponse = interface{}
type SettingService ¶
type SettingService struct {
Options []option.RequestOption
}
SettingService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSettingService method instead.
func NewSettingService ¶
func NewSettingService(opts ...option.RequestOption) (r *SettingService)
NewSettingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SettingService) Get ¶
func (r *SettingService) Get(ctx context.Context, opts ...option.RequestOption) (res *SettingGetResponse, err error)
Returns a list of litellm level settings
This is useful for debugging and ensuring the proxy server is configured correctly.
Response schema:
```
{
"alerting": _alerting,
"litellm.callbacks": litellm_callbacks,
"litellm.input_callback": litellm_input_callbacks,
"litellm.failure_callback": litellm_failure_callbacks,
"litellm.success_callback": litellm_success_callbacks,
"litellm._async_success_callback": litellm_async_success_callbacks,
"litellm._async_failure_callback": litellm_async_failure_callbacks,
"litellm._async_input_callback": litellm_async_input_callbacks,
"all_litellm_callbacks": all_litellm_callbacks,
"num_callbacks": len(all_litellm_callbacks),
"num_alerting": _num_alerting,
"litellm.request_timeout": litellm.request_timeout,
}
```
type SpendCalculateSpendParams ¶
type SpendCalculateSpendParams struct {
CompletionResponse param.Field[map[string]interface{}] `json:"completion_response"`
Messages param.Field[[]interface{}] `json:"messages"`
Model param.Field[string] `json:"model"`
}
func (SpendCalculateSpendParams) MarshalJSON ¶
func (r SpendCalculateSpendParams) MarshalJSON() (data []byte, err error)
type SpendCalculateSpendResponse ¶
type SpendCalculateSpendResponse = interface{}
type SpendListLogsParams ¶
type SpendListLogsParams struct {
// Get spend logs based on api key
APIKey param.Field[string] `query:"api_key"`
// Time till which to view key spend
EndDate param.Field[string] `query:"end_date"`
// request_id to get spend logs for specific request_id. If none passed then pass
// spend logs for all requests
RequestID param.Field[string] `query:"request_id"`
// Time from which to start viewing key spend
StartDate param.Field[string] `query:"start_date"`
// When start_date and end_date are provided, summarize=true returns aggregated
// data by date (legacy behavior), summarize=false returns filtered individual logs
Summarize param.Field[bool] `query:"summarize"`
// Get spend logs based on user_id
UserID param.Field[string] `query:"user_id"`
}
func (SpendListLogsParams) URLQuery ¶
func (r SpendListLogsParams) URLQuery() (v url.Values)
URLQuery serializes SpendListLogsParams's query parameters as `url.Values`.
type SpendListLogsResponse ¶
type SpendListLogsResponse struct {
APIKey string `json:"api_key,required"`
CallType string `json:"call_type,required"`
EndTime SpendListLogsResponseEndTimeUnion `json:"endTime,required,nullable" format:"date-time"`
Messages SpendListLogsResponseMessagesUnion `json:"messages,required,nullable"`
RequestID string `json:"request_id,required"`
Response SpendListLogsResponseResponseUnion `json:"response,required,nullable"`
StartTime SpendListLogsResponseStartTimeUnion `json:"startTime,required,nullable" format:"date-time"`
APIBase string `json:"api_base,nullable"`
CacheHit string `json:"cache_hit,nullable"`
CacheKey string `json:"cache_key,nullable"`
CompletionTokens int64 `json:"completion_tokens,nullable"`
Metadata interface{} `json:"metadata"`
Model string `json:"model,nullable"`
PromptTokens int64 `json:"prompt_tokens,nullable"`
RequestTags interface{} `json:"request_tags"`
RequesterIPAddress string `json:"requester_ip_address,nullable"`
Spend float64 `json:"spend,nullable"`
TotalTokens int64 `json:"total_tokens,nullable"`
User string `json:"user,nullable"`
JSON spendListLogsResponseJSON `json:"-"`
}
func (*SpendListLogsResponse) UnmarshalJSON ¶
func (r *SpendListLogsResponse) UnmarshalJSON(data []byte) (err error)
type SpendListLogsResponseEndTimeUnion ¶
type SpendListLogsResponseEndTimeUnion interface {
ImplementsSpendListLogsResponseEndTimeUnion()
}
Union satisfied by shared.UnionString or shared.UnionTime.
type SpendListLogsResponseMessagesArray ¶
type SpendListLogsResponseMessagesArray []interface{}
func (SpendListLogsResponseMessagesArray) ImplementsSpendListLogsResponseMessagesUnion ¶
func (r SpendListLogsResponseMessagesArray) ImplementsSpendListLogsResponseMessagesUnion()
type SpendListLogsResponseMessagesMap ¶
type SpendListLogsResponseMessagesMap map[string]interface{}
func (SpendListLogsResponseMessagesMap) ImplementsSpendListLogsResponseMessagesUnion ¶
func (r SpendListLogsResponseMessagesMap) ImplementsSpendListLogsResponseMessagesUnion()
type SpendListLogsResponseMessagesUnion ¶
type SpendListLogsResponseMessagesUnion interface {
ImplementsSpendListLogsResponseMessagesUnion()
}
Union satisfied by shared.UnionString, SpendListLogsResponseMessagesArray or SpendListLogsResponseMessagesMap.
type SpendListLogsResponseResponseArray ¶
type SpendListLogsResponseResponseArray []interface{}
func (SpendListLogsResponseResponseArray) ImplementsSpendListLogsResponseResponseUnion ¶
func (r SpendListLogsResponseResponseArray) ImplementsSpendListLogsResponseResponseUnion()
type SpendListLogsResponseResponseMap ¶
type SpendListLogsResponseResponseMap map[string]interface{}
func (SpendListLogsResponseResponseMap) ImplementsSpendListLogsResponseResponseUnion ¶
func (r SpendListLogsResponseResponseMap) ImplementsSpendListLogsResponseResponseUnion()
type SpendListLogsResponseResponseUnion ¶
type SpendListLogsResponseResponseUnion interface {
ImplementsSpendListLogsResponseResponseUnion()
}
Union satisfied by shared.UnionString, SpendListLogsResponseResponseArray or SpendListLogsResponseResponseMap.
type SpendListLogsResponseStartTimeUnion ¶
type SpendListLogsResponseStartTimeUnion interface {
ImplementsSpendListLogsResponseStartTimeUnion()
}
Union satisfied by shared.UnionString or shared.UnionTime.
type SpendListTagsParams ¶
type SpendListTagsParams struct {
// Time till which to view key spend
EndDate param.Field[string] `query:"end_date"`
// Time from which to start viewing key spend
StartDate param.Field[string] `query:"start_date"`
}
func (SpendListTagsParams) URLQuery ¶
func (r SpendListTagsParams) URLQuery() (v url.Values)
URLQuery serializes SpendListTagsParams's query parameters as `url.Values`.
type SpendListTagsResponse ¶
type SpendListTagsResponse struct {
APIKey string `json:"api_key,required"`
CallType string `json:"call_type,required"`
EndTime SpendListTagsResponseEndTimeUnion `json:"endTime,required,nullable" format:"date-time"`
Messages SpendListTagsResponseMessagesUnion `json:"messages,required,nullable"`
RequestID string `json:"request_id,required"`
Response SpendListTagsResponseResponseUnion `json:"response,required,nullable"`
StartTime SpendListTagsResponseStartTimeUnion `json:"startTime,required,nullable" format:"date-time"`
APIBase string `json:"api_base,nullable"`
CacheHit string `json:"cache_hit,nullable"`
CacheKey string `json:"cache_key,nullable"`
CompletionTokens int64 `json:"completion_tokens,nullable"`
Metadata interface{} `json:"metadata"`
Model string `json:"model,nullable"`
PromptTokens int64 `json:"prompt_tokens,nullable"`
RequestTags interface{} `json:"request_tags"`
RequesterIPAddress string `json:"requester_ip_address,nullable"`
Spend float64 `json:"spend,nullable"`
TotalTokens int64 `json:"total_tokens,nullable"`
User string `json:"user,nullable"`
JSON spendListTagsResponseJSON `json:"-"`
}
func (*SpendListTagsResponse) UnmarshalJSON ¶
func (r *SpendListTagsResponse) UnmarshalJSON(data []byte) (err error)
type SpendListTagsResponseEndTimeUnion ¶
type SpendListTagsResponseEndTimeUnion interface {
ImplementsSpendListTagsResponseEndTimeUnion()
}
Union satisfied by shared.UnionString or shared.UnionTime.
type SpendListTagsResponseMessagesArray ¶
type SpendListTagsResponseMessagesArray []interface{}
func (SpendListTagsResponseMessagesArray) ImplementsSpendListTagsResponseMessagesUnion ¶
func (r SpendListTagsResponseMessagesArray) ImplementsSpendListTagsResponseMessagesUnion()
type SpendListTagsResponseMessagesMap ¶
type SpendListTagsResponseMessagesMap map[string]interface{}
func (SpendListTagsResponseMessagesMap) ImplementsSpendListTagsResponseMessagesUnion ¶
func (r SpendListTagsResponseMessagesMap) ImplementsSpendListTagsResponseMessagesUnion()
type SpendListTagsResponseMessagesUnion ¶
type SpendListTagsResponseMessagesUnion interface {
ImplementsSpendListTagsResponseMessagesUnion()
}
Union satisfied by shared.UnionString, SpendListTagsResponseMessagesArray or SpendListTagsResponseMessagesMap.
type SpendListTagsResponseResponseArray ¶
type SpendListTagsResponseResponseArray []interface{}
func (SpendListTagsResponseResponseArray) ImplementsSpendListTagsResponseResponseUnion ¶
func (r SpendListTagsResponseResponseArray) ImplementsSpendListTagsResponseResponseUnion()
type SpendListTagsResponseResponseMap ¶
type SpendListTagsResponseResponseMap map[string]interface{}
func (SpendListTagsResponseResponseMap) ImplementsSpendListTagsResponseResponseUnion ¶
func (r SpendListTagsResponseResponseMap) ImplementsSpendListTagsResponseResponseUnion()
type SpendListTagsResponseResponseUnion ¶
type SpendListTagsResponseResponseUnion interface {
ImplementsSpendListTagsResponseResponseUnion()
}
Union satisfied by shared.UnionString, SpendListTagsResponseResponseArray or SpendListTagsResponseResponseMap.
type SpendListTagsResponseStartTimeUnion ¶
type SpendListTagsResponseStartTimeUnion interface {
ImplementsSpendListTagsResponseStartTimeUnion()
}
Union satisfied by shared.UnionString or shared.UnionTime.
type SpendService ¶
type SpendService struct {
Options []option.RequestOption
}
SpendService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSpendService method instead.
func NewSpendService ¶
func NewSpendService(opts ...option.RequestOption) (r *SpendService)
NewSpendService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SpendService) CalculateSpend ¶
func (r *SpendService) CalculateSpend(ctx context.Context, body SpendCalculateSpendParams, opts ...option.RequestOption) (res *SpendCalculateSpendResponse, err error)
Accepts all the params of completion_cost.
Calculate spend **before** making call:
Note: If you see a spend of $0.0 you need to set custom_pricing for your model: https://docs.litellm.ai/docs/proxy/custom_pricing
``` curl --location 'http://localhost:4000/spend/calculate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json'
--data '{
"model": "anthropic.claude-v2",
"messages": [{"role": "user", "content": "Hey, how'''s it going?"}]
}'
```
Calculate spend **after** making call:
``` curl --location 'http://localhost:4000/spend/calculate' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json'
--data '{
"completion_response": {
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"model": "gpt-3.5-turbo-0125",
"system_fingerprint": "fp_44709d6fcb",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello there, how may I assist you today?"
},
"logprobs": null,
"finish_reason": "stop"
}]
"usage": {
"prompt_tokens": 9,
"completion_tokens": 12,
"total_tokens": 21
}
}
}'
```
func (*SpendService) ListLogs ¶
func (r *SpendService) ListLogs(ctx context.Context, query SpendListLogsParams, opts ...option.RequestOption) (res *[]SpendListLogsResponse, err error)
[DEPRECATED] This endpoint is not paginated and can cause performance issues. Please use `/spend/logs/v2` instead for paginated access to spend logs.
View all spend logs, if request_id is provided, only logs for that request_id will be returned
When start_date and end_date are provided:
- summarize=true (default): Returns aggregated spend data grouped by date (maintains backward compatibility)
- summarize=false: Returns filtered individual log entries within the date range
Example Request for all logs ¶
``` curl -X GET "http://0.0.0.0:8000/spend/logs" -H "Authorization: Bearer sk-1234" ```
Example Request for specific request_id
``` curl -X GET "http://0.0.0.0:8000/spend/logs?request_id=chatcmpl-6dcb2540-d3d7-4e49-bb27-291f863f112e" -H "Authorization: Bearer sk-1234" ```
Example Request for specific api_key
``` curl -X GET "http://0.0.0.0:8000/spend/logs?api_key=sk-test-example-key-123" -H "Authorization: Bearer sk-1234" ```
Example Request for specific user_id
``` curl -X GET "http://0.0.0.0:8000/spend/logs?user_id=ishaan@berri.ai" -H "Authorization: Bearer sk-1234" ```
Example Request for date range with individual logs (unsummarized)
``` curl -X GET "http://0.0.0.0:8000/spend/logs?start_date=2024-01-01&end_date=2024-01-02&summarize=false" -H "Authorization: Bearer sk-1234" ```
func (*SpendService) ListTags ¶
func (r *SpendService) ListTags(ctx context.Context, query SpendListTagsParams, opts ...option.RequestOption) (res *[]SpendListTagsResponse, err error)
LiteLLM Enterprise - View Spend Per Request Tag
Example Request:
``` curl -X GET "http://0.0.0.0:8000/spend/tags" -H "Authorization: Bearer sk-1234" ```
Spend with Start Date and End Date ¶
``` curl -X GET "http://0.0.0.0:8000/spend/tags?start_date=2022-01-01&end_date=2022-02-01" -H "Authorization: Bearer sk-1234" ```
type TeamAddMemberParams ¶
type TeamAddMemberParams struct {
// Member object or list of member objects to add. Each member must include either
// user_id or user_email, and a role
Member param.Field[TeamAddMemberParamsMemberUnion] `json:"member,required"`
// The ID of the team to add the member to
TeamID param.Field[string] `json:"team_id,required"`
// Maximum budget allocated to this user within the team. If not set, user has
// unlimited budget within team limits
MaxBudgetInTeam param.Field[float64] `json:"max_budget_in_team"`
}
func (TeamAddMemberParams) MarshalJSON ¶
func (r TeamAddMemberParams) MarshalJSON() (data []byte, err error)
type TeamAddMemberParamsMemberArray ¶
type TeamAddMemberParamsMemberArray []MemberParam
type TeamAddMemberParamsMemberUnion ¶
type TeamAddMemberParamsMemberUnion interface {
// contains filtered or unexported methods
}
Member object or list of member objects to add. Each member must include either user_id or user_email, and a role
Satisfied by TeamAddMemberParamsMemberArray, MemberParam.
type TeamAddMemberResponse ¶
type TeamAddMemberResponse struct {
TeamID string `json:"team_id,required"`
UpdatedTeamMemberships []TeamAddMemberResponseUpdatedTeamMembership `json:"updated_team_memberships,required"`
UpdatedUsers []TeamAddMemberResponseUpdatedUser `json:"updated_users,required"`
Admins []interface{} `json:"admins"`
Blocked bool `json:"blocked"`
BudgetDuration string `json:"budget_duration,nullable"`
BudgetResetAt time.Time `json:"budget_reset_at,nullable" format:"date-time"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
LitellmModelTable TeamAddMemberResponseLitellmModelTable `json:"litellm_model_table,nullable"`
MaxBudget float64 `json:"max_budget,nullable"`
MaxParallelRequests int64 `json:"max_parallel_requests,nullable"`
Members []interface{} `json:"members"`
MembersWithRoles []Member `json:"members_with_roles"`
Metadata map[string]interface{} `json:"metadata,nullable"`
ModelID int64 `json:"model_id,nullable"`
Models []interface{} `json:"models"`
// Represents a LiteLLM_ObjectPermissionTable record
ObjectPermission TeamAddMemberResponseObjectPermission `json:"object_permission,nullable"`
ObjectPermissionID string `json:"object_permission_id,nullable"`
OrganizationID string `json:"organization_id,nullable"`
RouterSettings map[string]interface{} `json:"router_settings,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
Spend float64 `json:"spend,nullable"`
TeamAlias string `json:"team_alias,nullable"`
TeamMemberPermissions []string `json:"team_member_permissions,nullable"`
TpmLimit int64 `json:"tpm_limit,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
JSON teamAddMemberResponseJSON `json:"-"`
}
func (*TeamAddMemberResponse) UnmarshalJSON ¶
func (r *TeamAddMemberResponse) UnmarshalJSON(data []byte) (err error)
type TeamAddMemberResponseLitellmModelTable ¶
type TeamAddMemberResponseLitellmModelTable struct {
CreatedBy string `json:"created_by,required"`
UpdatedBy string `json:"updated_by,required"`
ID int64 `json:"id,nullable"`
ModelAliases TeamAddMemberResponseLitellmModelTableModelAliasesUnion `json:"model_aliases,nullable"`
Team interface{} `json:"team"`
JSON teamAddMemberResponseLitellmModelTableJSON `json:"-"`
}
func (*TeamAddMemberResponseLitellmModelTable) UnmarshalJSON ¶
func (r *TeamAddMemberResponseLitellmModelTable) UnmarshalJSON(data []byte) (err error)
type TeamAddMemberResponseLitellmModelTableModelAliasesMap ¶
type TeamAddMemberResponseLitellmModelTableModelAliasesMap map[string]interface{}
func (TeamAddMemberResponseLitellmModelTableModelAliasesMap) ImplementsTeamAddMemberResponseLitellmModelTableModelAliasesUnion ¶
func (r TeamAddMemberResponseLitellmModelTableModelAliasesMap) ImplementsTeamAddMemberResponseLitellmModelTableModelAliasesUnion()
type TeamAddMemberResponseLitellmModelTableModelAliasesUnion ¶
type TeamAddMemberResponseLitellmModelTableModelAliasesUnion interface {
ImplementsTeamAddMemberResponseLitellmModelTableModelAliasesUnion()
}
Union satisfied by TeamAddMemberResponseLitellmModelTableModelAliasesMap or shared.UnionString.
type TeamAddMemberResponseObjectPermission ¶
type TeamAddMemberResponseObjectPermission struct {
ObjectPermissionID string `json:"object_permission_id,required"`
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON teamAddMemberResponseObjectPermissionJSON `json:"-"`
}
Represents a LiteLLM_ObjectPermissionTable record
func (*TeamAddMemberResponseObjectPermission) UnmarshalJSON ¶
func (r *TeamAddMemberResponseObjectPermission) UnmarshalJSON(data []byte) (err error)
type TeamAddMemberResponseUpdatedTeamMembership ¶
type TeamAddMemberResponseUpdatedTeamMembership struct {
// Represents user-controllable params for a LiteLLM_BudgetTable record
LitellmBudgetTable BudgetTable `json:"litellm_budget_table,required,nullable"`
TeamID string `json:"team_id,required"`
UserID string `json:"user_id,required"`
BudgetID string `json:"budget_id,nullable"`
Spend float64 `json:"spend,nullable"`
JSON teamAddMemberResponseUpdatedTeamMembershipJSON `json:"-"`
}
func (*TeamAddMemberResponseUpdatedTeamMembership) UnmarshalJSON ¶
func (r *TeamAddMemberResponseUpdatedTeamMembership) UnmarshalJSON(data []byte) (err error)
type TeamAddMemberResponseUpdatedUser ¶
type TeamAddMemberResponseUpdatedUser struct {
UserID string `json:"user_id,required"`
BudgetDuration string `json:"budget_duration,nullable"`
BudgetResetAt time.Time `json:"budget_reset_at,nullable" format:"date-time"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
MaxBudget float64 `json:"max_budget,nullable"`
Metadata map[string]interface{} `json:"metadata,nullable"`
ModelMaxBudget map[string]interface{} `json:"model_max_budget,nullable"`
ModelSpend map[string]interface{} `json:"model_spend,nullable"`
Models []interface{} `json:"models"`
// Represents a LiteLLM_ObjectPermissionTable record
ObjectPermission TeamAddMemberResponseUpdatedUsersObjectPermission `json:"object_permission,nullable"`
OrganizationMemberships []OrganizationMembershipTable `json:"organization_memberships,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
Spend float64 `json:"spend"`
SSOUserID string `json:"sso_user_id,nullable"`
Teams []string `json:"teams"`
TpmLimit int64 `json:"tpm_limit,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
UserAlias string `json:"user_alias,nullable"`
UserEmail string `json:"user_email,nullable"`
UserRole string `json:"user_role,nullable"`
JSON teamAddMemberResponseUpdatedUserJSON `json:"-"`
}
func (*TeamAddMemberResponseUpdatedUser) UnmarshalJSON ¶
func (r *TeamAddMemberResponseUpdatedUser) UnmarshalJSON(data []byte) (err error)
type TeamAddMemberResponseUpdatedUsersObjectPermission ¶
type TeamAddMemberResponseUpdatedUsersObjectPermission struct {
ObjectPermissionID string `json:"object_permission_id,required"`
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON teamAddMemberResponseUpdatedUsersObjectPermissionJSON `json:"-"`
}
Represents a LiteLLM_ObjectPermissionTable record
func (*TeamAddMemberResponseUpdatedUsersObjectPermission) UnmarshalJSON ¶
func (r *TeamAddMemberResponseUpdatedUsersObjectPermission) UnmarshalJSON(data []byte) (err error)
type TeamBlockParams ¶
type TeamBlockParams struct {
BlockTeamRequest BlockTeamRequestParam `json:"block_team_request,required"`
}
func (TeamBlockParams) MarshalJSON ¶
func (r TeamBlockParams) MarshalJSON() (data []byte, err error)
type TeamBlockResponse ¶
type TeamBlockResponse = interface{}
type TeamCallbackAddParams ¶
type TeamCallbackAddParams struct {
CallbackName param.Field[string] `json:"callback_name,required"`
CallbackVars param.Field[map[string]string] `json:"callback_vars,required"`
CallbackType param.Field[TeamCallbackAddParamsCallbackType] `json:"callback_type"`
// The litellm-changed-by header enables tracking of actions performed by
// authorized users on behalf of other users, providing an audit trail for
// accountability
LitellmChangedBy param.Field[string] `header:"litellm-changed-by"`
}
func (TeamCallbackAddParams) MarshalJSON ¶
func (r TeamCallbackAddParams) MarshalJSON() (data []byte, err error)
type TeamCallbackAddParamsCallbackType ¶
type TeamCallbackAddParamsCallbackType string
const ( TeamCallbackAddParamsCallbackTypeSuccess TeamCallbackAddParamsCallbackType = "success" TeamCallbackAddParamsCallbackTypeFailure TeamCallbackAddParamsCallbackType = "failure" TeamCallbackAddParamsCallbackTypeSuccessAndFailure TeamCallbackAddParamsCallbackType = "success_and_failure" )
func (TeamCallbackAddParamsCallbackType) IsKnown ¶
func (r TeamCallbackAddParamsCallbackType) IsKnown() bool
type TeamCallbackAddResponse ¶
type TeamCallbackAddResponse = interface{}
type TeamCallbackGetResponse ¶
type TeamCallbackGetResponse = interface{}
type TeamCallbackService ¶
type TeamCallbackService struct {
Options []option.RequestOption
}
TeamCallbackService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTeamCallbackService method instead.
func NewTeamCallbackService ¶
func NewTeamCallbackService(opts ...option.RequestOption) (r *TeamCallbackService)
NewTeamCallbackService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TeamCallbackService) Add ¶
func (r *TeamCallbackService) Add(ctx context.Context, teamID string, params TeamCallbackAddParams, opts ...option.RequestOption) (res *TeamCallbackAddResponse, err error)
Add a success/failure callback to a team
Use this if if you want different teams to have different success/failure callbacks
Parameters:
- callback_name (Literal["langfuse", "langsmith", "gcs"], required): The name of the callback to add
- callback_type (Literal["success", "failure", "success_and_failure"], required): The type of callback to add. One of:
- "success": Callback for successful LLM calls
- "failure": Callback for failed LLM calls
- "success_and_failure": Callback for both successful and failed LLM calls
- callback_vars (StandardCallbackDynamicParams, required): A dictionary of variables to pass to the callback
- langfuse_public_key: The public key for the Langfuse callback
- langfuse_secret_key: The secret key for the Langfuse callback
- langfuse_secret: The secret for the Langfuse callback
- langfuse_host: The host for the Langfuse callback
- gcs_bucket_name: The name of the GCS bucket
- gcs_path_service_account: The path to the GCS service account
- langsmith_api_key: The API key for the Langsmith callback
- langsmith_project: The project for the Langsmith callback
- langsmith_base_url: The base URL for the Langsmith callback
Example curl:
```
curl -X POST 'http:/localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' -H 'Content-Type: application/json' -H 'Authorization: Bearer sk-1234' -d '{
"callback_name": "langfuse",
"callback_type": "success",
"callback_vars": {"langfuse_public_key": "pk-lf-xxxx1", "langfuse_secret_key": "sk-xxxxx"}
}' ```
This means for the team where team_id = dbe2f686-a686-4896-864a-4c3924458709, all LLM calls will be logged to langfuse using the public key pk-lf-xxxx1 and the secret key sk-xxxxx
func (*TeamCallbackService) Get ¶
func (r *TeamCallbackService) Get(ctx context.Context, teamID string, opts ...option.RequestOption) (res *TeamCallbackGetResponse, err error)
Get the success/failure callbacks and variables for a team
Parameters:
- team_id (str, required): The unique identifier for the team
Example curl:
``` curl -X GET 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback' -H 'Authorization: Bearer sk-1234' ```
This will return the callback settings for the team with id dbe2f686-a686-4896-864a-4c3924458709
Returns { "status": "success", "data": { "team_id": team_id, "success_callbacks": team_callback_settings_obj.success_callback, "failure_callbacks": team_callback_settings_obj.failure_callback, "callback_vars": team_callback_settings_obj.callback_vars, }, }
type TeamDeleteParams ¶
type TeamDeleteParams struct {
TeamIDs param.Field[[]string] `json:"team_ids,required"`
// The litellm-changed-by header enables tracking of actions performed by
// authorized users on behalf of other users, providing an audit trail for
// accountability
LitellmChangedBy param.Field[string] `header:"litellm-changed-by"`
}
func (TeamDeleteParams) MarshalJSON ¶
func (r TeamDeleteParams) MarshalJSON() (data []byte, err error)
type TeamDeleteResponse ¶
type TeamDeleteResponse = interface{}
type TeamDisableLoggingResponse ¶
type TeamDisableLoggingResponse = interface{}
type TeamGetInfoParams ¶
type TeamGetInfoParams struct {
// Team ID in the request parameters
TeamID param.Field[string] `query:"team_id"`
}
func (TeamGetInfoParams) URLQuery ¶
func (r TeamGetInfoParams) URLQuery() (v url.Values)
URLQuery serializes TeamGetInfoParams's query parameters as `url.Values`.
type TeamGetInfoResponse ¶
type TeamGetInfoResponse = interface{}
type TeamListAvailableParams ¶
type TeamListAvailableParams struct {
ResponseModel param.Field[interface{}] `query:"response_model"`
}
func (TeamListAvailableParams) URLQuery ¶
func (r TeamListAvailableParams) URLQuery() (v url.Values)
URLQuery serializes TeamListAvailableParams's query parameters as `url.Values`.
type TeamListAvailableResponse ¶
type TeamListAvailableResponse = interface{}
type TeamListParams ¶
type TeamListParams struct {
OrganizationID param.Field[string] `query:"organization_id"`
// Only return teams which this 'user_id' belongs to
UserID param.Field[string] `query:"user_id"`
}
func (TeamListParams) URLQuery ¶
func (r TeamListParams) URLQuery() (v url.Values)
URLQuery serializes TeamListParams's query parameters as `url.Values`.
type TeamListResponse ¶
type TeamListResponse = interface{}
type TeamModelAddParams ¶
type TeamModelAddParams struct {
Models param.Field[[]string] `json:"models,required"`
TeamID param.Field[string] `json:"team_id,required"`
}
func (TeamModelAddParams) MarshalJSON ¶
func (r TeamModelAddParams) MarshalJSON() (data []byte, err error)
type TeamModelAddResponse ¶
type TeamModelAddResponse = interface{}
type TeamModelRemoveParams ¶
type TeamModelRemoveParams struct {
Models param.Field[[]string] `json:"models,required"`
TeamID param.Field[string] `json:"team_id,required"`
}
func (TeamModelRemoveParams) MarshalJSON ¶
func (r TeamModelRemoveParams) MarshalJSON() (data []byte, err error)
type TeamModelRemoveResponse ¶
type TeamModelRemoveResponse = interface{}
type TeamModelService ¶
type TeamModelService struct {
Options []option.RequestOption
}
TeamModelService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTeamModelService method instead.
func NewTeamModelService ¶
func NewTeamModelService(opts ...option.RequestOption) (r *TeamModelService)
NewTeamModelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TeamModelService) Add ¶
func (r *TeamModelService) Add(ctx context.Context, body TeamModelAddParams, opts ...option.RequestOption) (res *TeamModelAddResponse, err error)
Add models to a team's allowed model list. Only proxy admin or team admin can add models.
Parameters:
- team_id: str - Required. The team to add models to - models: List[str] - Required. List of models to add to the team
Example Request:
```
curl --location 'http://0.0.0.0:4000/team/model/add' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"team_id": "team-1234",
"models": ["gpt-4", "claude-2"]
}'
```
func (*TeamModelService) Remove ¶
func (r *TeamModelService) Remove(ctx context.Context, body TeamModelRemoveParams, opts ...option.RequestOption) (res *TeamModelRemoveResponse, err error)
Remove models from a team's allowed model list. Only proxy admin or team admin can remove models.
Parameters:
- team_id: str - Required. The team to remove models from - models: List[str] - Required. List of models to remove from the team
Example Request:
```
curl --location 'http://0.0.0.0:4000/team/model/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"team_id": "team-1234",
"models": ["gpt-4"]
}'
```
type TeamNewParams ¶
type TeamNewParams struct {
Admins param.Field[[]interface{}] `json:"admins"`
AllowedPassthroughRoutes param.Field[[]interface{}] `json:"allowed_passthrough_routes"`
AllowedVectorStoreIndexes param.Field[[]TeamNewParamsAllowedVectorStoreIndex] `json:"allowed_vector_store_indexes"`
Blocked param.Field[bool] `json:"blocked"`
BudgetDuration param.Field[string] `json:"budget_duration"`
Guardrails param.Field[[]string] `json:"guardrails"`
MaxBudget param.Field[float64] `json:"max_budget"`
Members param.Field[[]interface{}] `json:"members"`
MembersWithRoles param.Field[[]MemberParam] `json:"members_with_roles"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
ModelAliases param.Field[map[string]interface{}] `json:"model_aliases"`
ModelRpmLimit param.Field[map[string]int64] `json:"model_rpm_limit"`
ModelTpmLimit param.Field[map[string]int64] `json:"model_tpm_limit"`
Models param.Field[[]interface{}] `json:"models"`
ObjectPermission param.Field[TeamNewParamsObjectPermission] `json:"object_permission"`
OrganizationID param.Field[string] `json:"organization_id"`
Prompts param.Field[[]string] `json:"prompts"`
RouterSettings param.Field[map[string]interface{}] `json:"router_settings"`
RpmLimit param.Field[int64] `json:"rpm_limit"`
RpmLimitType param.Field[TeamNewParamsRpmLimitType] `json:"rpm_limit_type"`
SecretManagerSettings param.Field[map[string]interface{}] `json:"secret_manager_settings"`
Tags param.Field[[]interface{}] `json:"tags"`
TeamAlias param.Field[string] `json:"team_alias"`
TeamID param.Field[string] `json:"team_id"`
TeamMemberBudget param.Field[float64] `json:"team_member_budget"`
TeamMemberKeyDuration param.Field[string] `json:"team_member_key_duration"`
TeamMemberPermissions param.Field[[]string] `json:"team_member_permissions"`
TeamMemberRpmLimit param.Field[int64] `json:"team_member_rpm_limit"`
TeamMemberTpmLimit param.Field[int64] `json:"team_member_tpm_limit"`
TpmLimit param.Field[int64] `json:"tpm_limit"`
TpmLimitType param.Field[TeamNewParamsTpmLimitType] `json:"tpm_limit_type"`
// The litellm-changed-by header enables tracking of actions performed by
// authorized users on behalf of other users, providing an audit trail for
// accountability
LitellmChangedBy param.Field[string] `header:"litellm-changed-by"`
}
func (TeamNewParams) MarshalJSON ¶
func (r TeamNewParams) MarshalJSON() (data []byte, err error)
type TeamNewParamsAllowedVectorStoreIndex ¶
type TeamNewParamsAllowedVectorStoreIndex struct {
IndexName param.Field[string] `json:"index_name,required"`
IndexPermissions param.Field[[]TeamNewParamsAllowedVectorStoreIndexesIndexPermission] `json:"index_permissions,required"`
}
func (TeamNewParamsAllowedVectorStoreIndex) MarshalJSON ¶
func (r TeamNewParamsAllowedVectorStoreIndex) MarshalJSON() (data []byte, err error)
type TeamNewParamsAllowedVectorStoreIndexesIndexPermission ¶
type TeamNewParamsAllowedVectorStoreIndexesIndexPermission string
const ( TeamNewParamsAllowedVectorStoreIndexesIndexPermissionRead TeamNewParamsAllowedVectorStoreIndexesIndexPermission = "read" TeamNewParamsAllowedVectorStoreIndexesIndexPermissionWrite TeamNewParamsAllowedVectorStoreIndexesIndexPermission = "write" )
func (TeamNewParamsAllowedVectorStoreIndexesIndexPermission) IsKnown ¶
func (r TeamNewParamsAllowedVectorStoreIndexesIndexPermission) IsKnown() bool
type TeamNewParamsObjectPermission ¶
type TeamNewParamsObjectPermission struct {
AgentAccessGroups param.Field[[]string] `json:"agent_access_groups"`
Agents param.Field[[]string] `json:"agents"`
McpAccessGroups param.Field[[]string] `json:"mcp_access_groups"`
McpServers param.Field[[]string] `json:"mcp_servers"`
McpToolPermissions param.Field[map[string][]string] `json:"mcp_tool_permissions"`
VectorStores param.Field[[]string] `json:"vector_stores"`
}
func (TeamNewParamsObjectPermission) MarshalJSON ¶
func (r TeamNewParamsObjectPermission) MarshalJSON() (data []byte, err error)
type TeamNewParamsRpmLimitType ¶
type TeamNewParamsRpmLimitType string
const ( TeamNewParamsRpmLimitTypeGuaranteedThroughput TeamNewParamsRpmLimitType = "guaranteed_throughput" TeamNewParamsRpmLimitTypeBestEffortThroughput TeamNewParamsRpmLimitType = "best_effort_throughput" )
func (TeamNewParamsRpmLimitType) IsKnown ¶
func (r TeamNewParamsRpmLimitType) IsKnown() bool
type TeamNewParamsTpmLimitType ¶
type TeamNewParamsTpmLimitType string
const ( TeamNewParamsTpmLimitTypeGuaranteedThroughput TeamNewParamsTpmLimitType = "guaranteed_throughput" TeamNewParamsTpmLimitTypeBestEffortThroughput TeamNewParamsTpmLimitType = "best_effort_throughput" )
func (TeamNewParamsTpmLimitType) IsKnown ¶
func (r TeamNewParamsTpmLimitType) IsKnown() bool
type TeamNewResponse ¶
type TeamNewResponse struct {
TeamID string `json:"team_id,required"`
Admins []interface{} `json:"admins"`
Blocked bool `json:"blocked"`
BudgetDuration string `json:"budget_duration,nullable"`
BudgetResetAt time.Time `json:"budget_reset_at,nullable" format:"date-time"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
LitellmModelTable interface{} `json:"litellm_model_table"`
MaxBudget float64 `json:"max_budget,nullable"`
MaxParallelRequests int64 `json:"max_parallel_requests,nullable"`
Members []interface{} `json:"members"`
MembersWithRoles []Member `json:"members_with_roles"`
Metadata map[string]interface{} `json:"metadata,nullable"`
ModelID int64 `json:"model_id,nullable"`
Models []interface{} `json:"models"`
// Represents a LiteLLM_ObjectPermissionTable record
ObjectPermission TeamNewResponseObjectPermission `json:"object_permission,nullable"`
ObjectPermissionID string `json:"object_permission_id,nullable"`
OrganizationID string `json:"organization_id,nullable"`
RouterSettings map[string]interface{} `json:"router_settings,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
Spend float64 `json:"spend,nullable"`
TeamAlias string `json:"team_alias,nullable"`
TeamMemberPermissions []string `json:"team_member_permissions,nullable"`
TpmLimit int64 `json:"tpm_limit,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
JSON teamNewResponseJSON `json:"-"`
}
func (*TeamNewResponse) UnmarshalJSON ¶
func (r *TeamNewResponse) UnmarshalJSON(data []byte) (err error)
type TeamNewResponseObjectPermission ¶
type TeamNewResponseObjectPermission struct {
ObjectPermissionID string `json:"object_permission_id,required"`
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON teamNewResponseObjectPermissionJSON `json:"-"`
}
Represents a LiteLLM_ObjectPermissionTable record
func (*TeamNewResponseObjectPermission) UnmarshalJSON ¶
func (r *TeamNewResponseObjectPermission) UnmarshalJSON(data []byte) (err error)
type TeamRemoveMemberParams ¶
type TeamRemoveMemberParams struct {
TeamID param.Field[string] `json:"team_id,required"`
UserEmail param.Field[string] `json:"user_email"`
UserID param.Field[string] `json:"user_id"`
}
func (TeamRemoveMemberParams) MarshalJSON ¶
func (r TeamRemoveMemberParams) MarshalJSON() (data []byte, err error)
type TeamRemoveMemberResponse ¶
type TeamRemoveMemberResponse = interface{}
type TeamService ¶
type TeamService struct {
Options []option.RequestOption
Model *TeamModelService
Callback *TeamCallbackService
}
TeamService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTeamService method instead.
func NewTeamService ¶
func NewTeamService(opts ...option.RequestOption) (r *TeamService)
NewTeamService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TeamService) AddMember ¶
func (r *TeamService) AddMember(ctx context.Context, body TeamAddMemberParams, opts ...option.RequestOption) (res *TeamAddMemberResponse, err error)
Add new members (either via user_email or user_id) to a team
If user doesn't exist, new user row will also be added to User Table
Only proxy_admin or admin of team, allowed to access this endpoint.
```
curl -X POST 'http://0.0.0.0:4000/team/member_add' -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{"team_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", "member": {"role": "user", "user_id": "krrish247652@berri.ai"}}'
```
func (*TeamService) Block ¶
func (r *TeamService) Block(ctx context.Context, body TeamBlockParams, opts ...option.RequestOption) (res *TeamBlockResponse, err error)
Blocks all calls from keys with this team id.
Parameters:
- team_id: str - Required. The unique identifier of the team to block.
Example:
```
curl --location 'http://0.0.0.0:4000/team/block' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"team_id": "team-1234"
}'
```
Returns:
- The updated team record with blocked=True
func (*TeamService) Delete ¶
func (r *TeamService) Delete(ctx context.Context, params TeamDeleteParams, opts ...option.RequestOption) (res *TeamDeleteResponse, err error)
delete team and associated team keys
Parameters:
- team_ids: List[str] - Required. List of team IDs to delete. Example: ["team-1234", "team-5678"]
```
curl --location 'http://0.0.0.0:4000/team/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{
"team_ids": ["8d916b1c-510d-4894-a334-1c16a93344f5"]
}'
```
func (*TeamService) DisableLogging ¶
func (r *TeamService) DisableLogging(ctx context.Context, teamID string, opts ...option.RequestOption) (res *TeamDisableLoggingResponse, err error)
Disable all logging callbacks for a team
Parameters:
- team_id (str, required): The unique identifier for the team
Example curl:
``` curl -X POST 'http://localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/disable_logging' -H 'Authorization: Bearer sk-1234' ```
func (*TeamService) GetInfo ¶
func (r *TeamService) GetInfo(ctx context.Context, query TeamGetInfoParams, opts ...option.RequestOption) (res *TeamGetInfoResponse, err error)
get info on team + related keys
Parameters:
- team_id: str - Required. The unique identifier of the team to get info on.
``` curl --location 'http://localhost:4000/team/info?team_id=your_team_id_here' --header 'Authorization: Bearer your_api_key_here' ```
func (*TeamService) List ¶
func (r *TeamService) List(ctx context.Context, query TeamListParams, opts ...option.RequestOption) (res *TeamListResponse, err error)
``` curl --location --request GET 'http://0.0.0.0:4000/team/list' --header 'Authorization: Bearer sk-1234' ```
Parameters:
- user_id: str - Optional. If passed will only return teams that the user_id is a member of.
- organization_id: str - Optional. If passed will only return teams that belong to the organization_id. Pass 'default_organization' to get all teams without organization_id.
func (*TeamService) ListAvailable ¶
func (r *TeamService) ListAvailable(ctx context.Context, query TeamListAvailableParams, opts ...option.RequestOption) (res *TeamListAvailableResponse, err error)
List Available Teams
func (*TeamService) New ¶
func (r *TeamService) New(ctx context.Context, params TeamNewParams, opts ...option.RequestOption) (res *TeamNewResponse, err error)
Allow users to create a new team. Apply user permissions to their team.
👉 [Detailed Doc on setting team budgets](https://docs.litellm.ai/docs/proxy/team_budgets)
Parameters:
- team_alias: Optional[str] - User defined team alias
- team_id: Optional[str] - The team id of the user. If none passed, we'll generate it.
- members_with_roles: List[{"role": "admin" or "user", "user_id": "<user-id>"}] - A list of users and their roles in the team. Get user_id when making a new user via `/user/new`.
- team_member_permissions: Optional[List[str]] - A list of routes that non-admin team members can access. example: ["/key/generate", "/key/update", "/key/delete"]
- metadata: Optional[dict] - Metadata for team, store information for team. Example metadata = {"extra_info": "some info"}
- model_rpm_limit: Optional[Dict[str, int]] - The RPM (Requests Per Minute) limit for this team - applied across all keys for this team.
- model_tpm_limit: Optional[Dict[str, int]] - The TPM (Tokens Per Minute) limit for this team - applied across all keys for this team.
- tpm_limit: Optional[int] - The TPM (Tokens Per Minute) limit for this team - all keys with this team_id will have at max this TPM limit
- rpm_limit: Optional[int] - The RPM (Requests Per Minute) limit for this team - all keys associated with this team_id will have at max this RPM limit
- rpm_limit_type: Optional[Literal["guaranteed_throughput", "best_effort_throughput"]] - The type of RPM limit enforcement. Use "guaranteed_throughput" to raise an error if overallocating RPM, or "best_effort_throughput" for best effort enforcement.
- tpm_limit_type: Optional[Literal["guaranteed_throughput", "best_effort_throughput"]] - The type of TPM limit enforcement. Use "guaranteed_throughput" to raise an error if overallocating TPM, or "best_effort_throughput" for best effort enforcement.
- max_budget: Optional[float] - The maximum budget allocated to the team - all keys for this team_id will have at max this max_budget
- budget_duration: Optional[str] - The duration of the budget for the team. Doc [here](https://docs.litellm.ai/docs/proxy/team_budgets)
- models: Optional[list] - A list of models associated with the team - all keys for this team_id will have at most, these models. If empty, assumes all models are allowed.
- blocked: bool - Flag indicating if the team is blocked or not - will stop all calls from keys with this team_id.
- members: Optional[List] - Control team members via `/team/member/add` and `/team/member/delete`.
- tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing).
- prompts: Optional[List[str]] - List of prompts that the team is allowed to use.
- organization_id: Optional[str] - The organization id of the team. Default is None. Create via `/organization/new`.
- model_aliases: Optional[dict] - Model aliases for the team. [Docs](https://docs.litellm.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
- guardrails: Optional[List[str]] - Guardrails for the team. [Docs](https://docs.litellm.ai/docs/proxy/guardrails)
- disable_global_guardrails: Optional[bool] - Whether to disable global guardrails for the key.
- object_permission: Optional[LiteLLM_ObjectPermissionBase] - team-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"], "agents": ["agent_1", "agent_2"], "agent_access_groups": ["dev_group"]}. IF null or {} then no object permission.
- team_member_budget: Optional[float] - The maximum budget allocated to an individual team member.
- team_member_rpm_limit: Optional[int] - The RPM (Requests Per Minute) limit for individual team members.
- team_member_tpm_limit: Optional[int] - The TPM (Tokens Per Minute) limit for individual team members.
- team_member_key_duration: Optional[str] - The duration for a team member's key. e.g. "1d", "1w", "1mo"
- allowed_passthrough_routes: Optional[List[str]] - List of allowed pass through routes for the team.
- allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{"index_name": "my-index", "index_permissions": ["write", "read"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint.
- secret_manager_settings: Optional[dict] - Secret manager settings for the team. [Docs](https://docs.litellm.ai/docs/secret_managers/overview)
- router_settings: Optional[UpdateRouterConfig] - team-specific router settings. Example - {"model_group_retry_policy": {"max_retries": 5}}. IF null or {} then no router settings.
Returns:
- team_id: (str) Unique team id - used for tracking spend across multiple keys for same team id.
\_deprecated_params:
- admins: list - A list of user_id's for the admin role - users: list - A list of user_id's for the user role
Example Request:
```
curl --location 'http://0.0.0.0:4000/team/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"team_alias": "my-new-team_2",
"members_with_roles": [{"role": "admin", "user_id": "user-1234"},
{"role": "user", "user_id": "user-2434"}]
}'
```
```
curl --location 'http://0.0.0.0:4000/team/new' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"team_alias": "QA Prod Bot",
"max_budget": 0.000000001,
"budget_duration": "1d"
}'
```
func (*TeamService) RemoveMember ¶
func (r *TeamService) RemoveMember(ctx context.Context, body TeamRemoveMemberParams, opts ...option.RequestOption) (res *TeamRemoveMemberResponse, err error)
[BETA]
delete members (either via user_email or user_id) from a team
If user doesn't exist, an exception will be raised
``` curl -X POST 'http://0.0.0.0:8000/team/member_delete' -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json'
-d '{
"team_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849",
"user_id": "krrish247652@berri.ai"
}'
```
func (*TeamService) Unblock ¶
func (r *TeamService) Unblock(ctx context.Context, body TeamUnblockParams, opts ...option.RequestOption) (res *TeamUnblockResponse, err error)
Blocks all calls from keys with this team id.
Parameters:
- team_id: str - Required. The unique identifier of the team to unblock.
Example:
```
curl --location 'http://0.0.0.0:4000/team/unblock' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"team_id": "team-1234"
}'
```
func (*TeamService) Update ¶
func (r *TeamService) Update(ctx context.Context, params TeamUpdateParams, opts ...option.RequestOption) (res *TeamUpdateResponse, err error)
Use `/team/member_add` AND `/team/member/delete` to add/remove new team members
You can now update team budget / rate limits via /team/update
Parameters:
- team_id: str - The team id of the user. Required param.
- team_alias: Optional[str] - User defined team alias
- team_member_permissions: Optional[List[str]] - A list of routes that non-admin team members can access. example: ["/key/generate", "/key/update", "/key/delete"]
- metadata: Optional[dict] - Metadata for team, store information for team. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" }
- tpm_limit: Optional[int] - The TPM (Tokens Per Minute) limit for this team - all keys with this team_id will have at max this TPM limit
- rpm_limit: Optional[int] - The RPM (Requests Per Minute) limit for this team - all keys associated with this team_id will have at max this RPM limit
- max_budget: Optional[float] - The maximum budget allocated to the team - all keys for this team_id will have at max this max_budget
- budget_duration: Optional[str] - The duration of the budget for the team. Doc [here](https://docs.litellm.ai/docs/proxy/team_budgets)
- models: Optional[list] - A list of models associated with the team - all keys for this team_id will have at most, these models. If empty, assumes all models are allowed.
- prompts: Optional[List[str]] - List of prompts that the team is allowed to use.
- blocked: bool - Flag indicating if the team is blocked or not - will stop all calls from keys with this team_id.
- tags: Optional[List[str]] - Tags for [tracking spend](https://litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](https://litellm.vercel.app/docs/proxy/tag_routing).
- organization_id: Optional[str] - The organization id of the team. Default is None. Create via `/organization/new`.
- model_aliases: Optional[dict] - Model aliases for the team. [Docs](https://docs.litellm.ai/docs/proxy/team_based_routing#create-team-with-model-alias)
- guardrails: Optional[List[str]] - Guardrails for the team. [Docs](https://docs.litellm.ai/docs/proxy/guardrails)
- disable_global_guardrails: Optional[bool] - Whether to disable global guardrails for the key.
- object_permission: Optional[LiteLLM_ObjectPermissionBase] - team-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"], "agents": ["agent_1", "agent_2"], "agent_access_groups": ["dev_group"]}. IF null or {} then no object permission.
- team_member_budget: Optional[float] - The maximum budget allocated to an individual team member.
- team_member_budget_duration: Optional[str] - The duration of the budget for the team member. Doc [here](https://docs.litellm.ai/docs/proxy/team_budgets)
- team_member_rpm_limit: Optional[int] - The RPM (Requests Per Minute) limit for individual team members.
- team_member_tpm_limit: Optional[int] - The TPM (Tokens Per Minute) limit for individual team members.
- team_member_key_duration: Optional[str] - The duration for a team member's key. e.g. "1d", "1w", "1mo"
- allowed_passthrough_routes: Optional[List[str]] - List of allowed pass through routes for the team.
- model_rpm_limit: Optional[Dict[str, int]] - The RPM (Requests Per Minute) limit per model for this team. Example: {"gpt-4": 100, "gpt-3.5-turbo": 200}
- model_tpm_limit: Optional[Dict[str, int]] - The TPM (Tokens Per Minute) limit per model for this team. Example: {"gpt-4": 10000, "gpt-3.5-turbo": 20000} Example - update team TPM Limit
- allowed_vector_store_indexes: Optional[List[dict]] - List of allowed vector store indexes for the key. Example - [{"index_name": "my-index", "index_permissions": ["write", "read"]}]. If specified, the key will only be able to use these specific vector store indexes. Create index, using `/v1/indexes` endpoint.
- secret_manager_settings: Optional[dict] - Secret manager settings for the team. [Docs](https://docs.litellm.ai/docs/secret_managers/overview)
- router_settings: Optional[UpdateRouterConfig] - team-specific router settings. Example - {"model_group_retry_policy": {"max_retries": 5}}. IF null or {} then no router settings.
```
curl --location 'http://0.0.0.0:4000/team/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{
"team_id": "8d916b1c-510d-4894-a334-1c16a93344f5",
"tpm_limit": 100
}'
```
Example - Update Team `max_budget` budget
```
curl --location 'http://0.0.0.0:4000/team/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data-raw '{
"team_id": "8d916b1c-510d-4894-a334-1c16a93344f5",
"max_budget": 10
}'
```
func (*TeamService) UpdateMember ¶
func (r *TeamService) UpdateMember(ctx context.Context, body TeamUpdateMemberParams, opts ...option.RequestOption) (res *TeamUpdateMemberResponse, err error)
[BETA]
Update team member budgets and team member role
type TeamUnblockParams ¶
type TeamUnblockParams struct {
BlockTeamRequest BlockTeamRequestParam `json:"block_team_request,required"`
}
func (TeamUnblockParams) MarshalJSON ¶
func (r TeamUnblockParams) MarshalJSON() (data []byte, err error)
type TeamUnblockResponse ¶
type TeamUnblockResponse = interface{}
type TeamUpdateMemberParams ¶
type TeamUpdateMemberParams struct {
TeamID param.Field[string] `json:"team_id,required"`
MaxBudgetInTeam param.Field[float64] `json:"max_budget_in_team"`
Role param.Field[TeamUpdateMemberParamsRole] `json:"role"`
// Requests per minute limit for this team member
RpmLimit param.Field[int64] `json:"rpm_limit"`
// Tokens per minute limit for this team member
TpmLimit param.Field[int64] `json:"tpm_limit"`
UserEmail param.Field[string] `json:"user_email"`
UserID param.Field[string] `json:"user_id"`
}
func (TeamUpdateMemberParams) MarshalJSON ¶
func (r TeamUpdateMemberParams) MarshalJSON() (data []byte, err error)
type TeamUpdateMemberParamsRole ¶
type TeamUpdateMemberParamsRole string
const ( TeamUpdateMemberParamsRoleAdmin TeamUpdateMemberParamsRole = "admin" TeamUpdateMemberParamsRoleUser TeamUpdateMemberParamsRole = "user" )
func (TeamUpdateMemberParamsRole) IsKnown ¶
func (r TeamUpdateMemberParamsRole) IsKnown() bool
type TeamUpdateMemberResponse ¶
type TeamUpdateMemberResponse struct {
TeamID string `json:"team_id,required"`
UserID string `json:"user_id,required"`
MaxBudgetInTeam float64 `json:"max_budget_in_team,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
TpmLimit int64 `json:"tpm_limit,nullable"`
UserEmail string `json:"user_email,nullable"`
JSON teamUpdateMemberResponseJSON `json:"-"`
}
func (*TeamUpdateMemberResponse) UnmarshalJSON ¶
func (r *TeamUpdateMemberResponse) UnmarshalJSON(data []byte) (err error)
type TeamUpdateParams ¶
type TeamUpdateParams struct {
TeamID param.Field[string] `json:"team_id,required"`
AllowedPassthroughRoutes param.Field[[]interface{}] `json:"allowed_passthrough_routes"`
AllowedVectorStoreIndexes param.Field[[]TeamUpdateParamsAllowedVectorStoreIndex] `json:"allowed_vector_store_indexes"`
Blocked param.Field[bool] `json:"blocked"`
BudgetDuration param.Field[string] `json:"budget_duration"`
Guardrails param.Field[[]string] `json:"guardrails"`
MaxBudget param.Field[float64] `json:"max_budget"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
ModelAliases param.Field[map[string]interface{}] `json:"model_aliases"`
ModelRpmLimit param.Field[map[string]int64] `json:"model_rpm_limit"`
ModelTpmLimit param.Field[map[string]int64] `json:"model_tpm_limit"`
Models param.Field[[]interface{}] `json:"models"`
ObjectPermission param.Field[TeamUpdateParamsObjectPermission] `json:"object_permission"`
OrganizationID param.Field[string] `json:"organization_id"`
Prompts param.Field[[]string] `json:"prompts"`
RouterSettings param.Field[map[string]interface{}] `json:"router_settings"`
RpmLimit param.Field[int64] `json:"rpm_limit"`
SecretManagerSettings param.Field[map[string]interface{}] `json:"secret_manager_settings"`
Tags param.Field[[]interface{}] `json:"tags"`
TeamAlias param.Field[string] `json:"team_alias"`
TeamMemberBudget param.Field[float64] `json:"team_member_budget"`
TeamMemberBudgetDuration param.Field[string] `json:"team_member_budget_duration"`
TeamMemberKeyDuration param.Field[string] `json:"team_member_key_duration"`
TeamMemberRpmLimit param.Field[int64] `json:"team_member_rpm_limit"`
TeamMemberTpmLimit param.Field[int64] `json:"team_member_tpm_limit"`
TpmLimit param.Field[int64] `json:"tpm_limit"`
// The litellm-changed-by header enables tracking of actions performed by
// authorized users on behalf of other users, providing an audit trail for
// accountability
LitellmChangedBy param.Field[string] `header:"litellm-changed-by"`
}
func (TeamUpdateParams) MarshalJSON ¶
func (r TeamUpdateParams) MarshalJSON() (data []byte, err error)
type TeamUpdateParamsAllowedVectorStoreIndex ¶
type TeamUpdateParamsAllowedVectorStoreIndex struct {
IndexName param.Field[string] `json:"index_name,required"`
IndexPermissions param.Field[[]TeamUpdateParamsAllowedVectorStoreIndexesIndexPermission] `json:"index_permissions,required"`
}
func (TeamUpdateParamsAllowedVectorStoreIndex) MarshalJSON ¶
func (r TeamUpdateParamsAllowedVectorStoreIndex) MarshalJSON() (data []byte, err error)
type TeamUpdateParamsAllowedVectorStoreIndexesIndexPermission ¶
type TeamUpdateParamsAllowedVectorStoreIndexesIndexPermission string
const ( TeamUpdateParamsAllowedVectorStoreIndexesIndexPermissionRead TeamUpdateParamsAllowedVectorStoreIndexesIndexPermission = "read" TeamUpdateParamsAllowedVectorStoreIndexesIndexPermissionWrite TeamUpdateParamsAllowedVectorStoreIndexesIndexPermission = "write" )
func (TeamUpdateParamsAllowedVectorStoreIndexesIndexPermission) IsKnown ¶
func (r TeamUpdateParamsAllowedVectorStoreIndexesIndexPermission) IsKnown() bool
type TeamUpdateParamsObjectPermission ¶
type TeamUpdateParamsObjectPermission struct {
AgentAccessGroups param.Field[[]string] `json:"agent_access_groups"`
Agents param.Field[[]string] `json:"agents"`
McpAccessGroups param.Field[[]string] `json:"mcp_access_groups"`
McpServers param.Field[[]string] `json:"mcp_servers"`
McpToolPermissions param.Field[map[string][]string] `json:"mcp_tool_permissions"`
VectorStores param.Field[[]string] `json:"vector_stores"`
}
func (TeamUpdateParamsObjectPermission) MarshalJSON ¶
func (r TeamUpdateParamsObjectPermission) MarshalJSON() (data []byte, err error)
type TeamUpdateResponse ¶
type TeamUpdateResponse = interface{}
type TestPingResponse ¶
type TestPingResponse = interface{}
type TestService ¶
type TestService struct {
Options []option.RequestOption
}
TestService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTestService method instead.
func NewTestService ¶
func NewTestService(opts ...option.RequestOption) (r *TestService)
NewTestService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TestService) Ping ¶
func (r *TestService) Ping(ctx context.Context, opts ...option.RequestOption) (res *TestPingResponse, err error)
[DEPRECATED] use `/health/liveliness` instead.
A test endpoint that pings the proxy server to check if it's healthy.
Parameters: request (Request): The incoming request.
Returns: dict: A dictionary containing the route of the request URL.
type ThreadGetResponse ¶
type ThreadGetResponse = interface{}
type ThreadMessageListResponse ¶
type ThreadMessageListResponse = interface{}
type ThreadMessageNewResponse ¶
type ThreadMessageNewResponse = interface{}
type ThreadMessageService ¶
type ThreadMessageService struct {
Options []option.RequestOption
}
ThreadMessageService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewThreadMessageService method instead.
func NewThreadMessageService ¶
func NewThreadMessageService(opts ...option.RequestOption) (r *ThreadMessageService)
NewThreadMessageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ThreadMessageService) List ¶
func (r *ThreadMessageService) List(ctx context.Context, threadID string, opts ...option.RequestOption) (res *ThreadMessageListResponse, err error)
Returns a list of messages for a given thread.
API Reference - https://platform.openai.com/docs/api-reference/messages/listMessages
func (*ThreadMessageService) New ¶
func (r *ThreadMessageService) New(ctx context.Context, threadID string, opts ...option.RequestOption) (res *ThreadMessageNewResponse, err error)
Create a message.
API Reference - https://platform.openai.com/docs/api-reference/messages/createMessage
type ThreadNewResponse ¶
type ThreadNewResponse = interface{}
type ThreadRunNewResponse ¶
type ThreadRunNewResponse = interface{}
type ThreadRunService ¶
type ThreadRunService struct {
Options []option.RequestOption
}
ThreadRunService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewThreadRunService method instead.
func NewThreadRunService ¶
func NewThreadRunService(opts ...option.RequestOption) (r *ThreadRunService)
NewThreadRunService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ThreadRunService) New ¶
func (r *ThreadRunService) New(ctx context.Context, threadID string, opts ...option.RequestOption) (res *ThreadRunNewResponse, err error)
Create a run.
API Reference: https://platform.openai.com/docs/api-reference/runs/createRun
type ThreadService ¶
type ThreadService struct {
Options []option.RequestOption
Messages *ThreadMessageService
Runs *ThreadRunService
}
ThreadService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewThreadService method instead.
func NewThreadService ¶
func NewThreadService(opts ...option.RequestOption) (r *ThreadService)
NewThreadService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ThreadService) Get ¶
func (r *ThreadService) Get(ctx context.Context, threadID string, opts ...option.RequestOption) (res *ThreadGetResponse, err error)
Retrieves a thread.
API Reference - https://platform.openai.com/docs/api-reference/threads/getThread
func (*ThreadService) New ¶
func (r *ThreadService) New(ctx context.Context, opts ...option.RequestOption) (res *ThreadNewResponse, err error)
Create a thread.
API Reference - https://platform.openai.com/docs/api-reference/threads/createThread
type UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsConfigurableClientsideParamsCustomAuthInputParam ¶
type UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsConfigurableClientsideParamsCustomAuthInputParam struct {
APIBase param.Field[string] `json:"api_base,required"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsConfigurableClientsideParamsCustomAuthInputParam) ImplementsUpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsUnionParam ¶
func (r UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsConfigurableClientsideParamsCustomAuthInputParam) ImplementsUpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsUnionParam()
func (UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsConfigurableClientsideParamsCustomAuthInputParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsConfigurableClientsideParamsCustomAuthInputParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsUnionParam ¶
type UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsUnionParam interface {
ImplementsUpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsUnionParam()
}
Satisfied by shared.UnionString, UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsConfigurableClientsideParamsCustomAuthInputParam.
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsContentParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsContentParam struct {
Token param.Field[string] `json:"token,required"`
Logprob param.Field[float64] `json:"logprob,required"`
TopLogprobs param.Field[[]UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsContentTopLogprobParam] `json:"top_logprobs,required"`
Bytes param.Field[[]int64] `json:"bytes"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsContentParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsContentParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsContentTopLogprobParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsContentTopLogprobParam struct {
Token param.Field[string] `json:"token,required"`
Logprob param.Field[float64] `json:"logprob,required"`
Bytes param.Field[[]int64] `json:"bytes"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsContentTopLogprobParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsContentTopLogprobParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsParam struct {
Content param.Field[[]UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsContentParam] `json:"content"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationParam struct {
Type param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationsType] `json:"type"`
URLCitation param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationsURLCitationParam] `json:"url_citation"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationsType ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationsType string
const (
UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationsTypeURLCitation UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationsType = "url_citation"
)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationsURLCitationParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationsURLCitationParam struct {
EndIndex param.Field[int64] `json:"end_index"`
StartIndex param.Field[int64] `json:"start_index"`
Title param.Field[string] `json:"title"`
URL param.Field[string] `json:"url"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationsURLCitationParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationsURLCitationParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAudioParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAudioParam struct {
ID param.Field[string] `json:"id,required"`
Data param.Field[string] `json:"data,required"`
ExpiresAt param.Field[int64] `json:"expires_at,required"`
Transcript param.Field[string] `json:"transcript,required"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAudioParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAudioParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageFunctionCallParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageFunctionCallParam struct {
Arguments param.Field[string] `json:"arguments,required"`
Name param.Field[string] `json:"name"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageFunctionCallParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageFunctionCallParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImageParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImageParam struct {
ImageURL param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImagesImageURLParam] `json:"image_url,required"`
Index param.Field[int64] `json:"index,required"`
Type param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImagesType] `json:"type,required"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImageParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImageParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImagesImageURLParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImagesImageURLParam struct {
URL param.Field[string] `json:"url,required"`
Detail param.Field[string] `json:"detail"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImagesImageURLParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImagesImageURLParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImagesType ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImagesType string
const (
UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImagesTypeImageURL UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImagesType = "image_url"
)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageParam struct {
Content param.Field[string] `json:"content,required"`
FunctionCall param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageFunctionCallParam] `json:"function_call,required"`
Role param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRole] `json:"role,required"`
ToolCalls param.Field[[]map[string]interface{}] `json:"tool_calls,required"`
Annotations param.Field[[]UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAnnotationParam] `json:"annotations"`
Audio param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageAudioParam] `json:"audio"`
Images param.Field[[]UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageImageParam] `json:"images"`
ProviderSpecificFields param.Field[map[string]interface{}] `json:"provider_specific_fields"`
ReasoningContent param.Field[string] `json:"reasoning_content"`
ThinkingBlocks param.Field[[]UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksUnionParam] `json:"thinking_blocks"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRole ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRole string
const ( UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRoleAssistant UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRole = "assistant" UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRoleUser UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRole = "user" UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRoleSystem UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRole = "system" UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRoleTool UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRole = "tool" UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRoleFunction UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageRole = "function" )
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlockParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlockParam struct {
Type param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksType] `json:"type,required"`
CacheControl param.Field[interface{}] `json:"cache_control"`
Data param.Field[string] `json:"data"`
Signature param.Field[string] `json:"signature"`
Thinking param.Field[string] `json:"thinking"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlockParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlockParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentParam struct {
Type param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType] `json:"type,required"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentParam) MarshalJSON ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType string
const (
UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentTypeEphemeral UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentType = "ephemeral"
)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMapParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMapParam map[string]interface{}
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnionParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnionParam interface {
// contains filtered or unexported methods
}
Satisfied by UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlMapParam, UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlChatCompletionCachedContentParam.
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockParam struct {
Type param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockType] `json:"type,required"`
CacheControl param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockCacheControlUnionParam] `json:"cache_control"`
Data param.Field[string] `json:"data"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockType ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockType string
const (
UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockTypeRedactedThinking UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockType = "redacted_thinking"
)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentParam struct {
Type param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType] `json:"type,required"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentParam) MarshalJSON ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType string
const (
UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentTypeEphemeral UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentType = "ephemeral"
)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMapParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMapParam map[string]interface{}
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnionParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnionParam interface {
// contains filtered or unexported methods
}
Satisfied by UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlMapParam, UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlChatCompletionCachedContentParam.
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockParam struct {
Type param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockType] `json:"type,required"`
CacheControl param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockCacheControlUnionParam] `json:"cache_control"`
Signature param.Field[string] `json:"signature"`
Thinking param.Field[string] `json:"thinking"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockType ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockType string
const (
UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockTypeThinking UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockType = "thinking"
)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksType ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksType string
const ( UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksTypeThinking UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksType = "thinking" UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksTypeRedactedThinking UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksType = "redacted_thinking" )
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksUnionParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksUnionParam interface {
// contains filtered or unexported methods
}
Satisfied by UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionThinkingBlockParam, UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlocksChatCompletionRedactedThinkingBlockParam, UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageThinkingBlockParam.
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesParam struct {
FinishReason param.Field[string] `json:"finish_reason,required"`
Index param.Field[int64] `json:"index,required"`
Message param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesMessageParam] `json:"message,required"`
Logprobs param.Field[UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesLogprobsParam] `json:"logprobs"`
ProviderSpecificFields param.Field[map[string]interface{}] `json:"provider_specific_fields"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesStreamingChoicesParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesStreamingChoicesParam map[string]interface{}
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesUnionParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesUnionParam interface {
// contains filtered or unexported methods
}
Satisfied by UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesChoicesParam, UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesStreamingChoicesParam.
type UpdateDeploymentLitellmParamsMockResponseModelResponseParam ¶
type UpdateDeploymentLitellmParamsMockResponseModelResponseParam struct {
ID param.Field[string] `json:"id,required"`
Choices param.Field[[]UpdateDeploymentLitellmParamsMockResponseModelResponseChoicesUnionParam] `json:"choices,required"`
Created param.Field[int64] `json:"created,required"`
Object param.Field[string] `json:"object,required"`
Model param.Field[string] `json:"model"`
SystemFingerprint param.Field[string] `json:"system_fingerprint"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsMockResponseModelResponseParam) ImplementsUpdateDeploymentLitellmParamsMockResponseUnionParam ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseParam) ImplementsUpdateDeploymentLitellmParamsMockResponseUnionParam()
func (UpdateDeploymentLitellmParamsMockResponseModelResponseParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsMockResponseModelResponseParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsMockResponseUnionParam ¶
type UpdateDeploymentLitellmParamsMockResponseUnionParam interface {
ImplementsUpdateDeploymentLitellmParamsMockResponseUnionParam()
}
Satisfied by shared.UnionString, UpdateDeploymentLitellmParamsMockResponseModelResponseParam.
Use [Raw()] to specify an arbitrary value for this param
type UpdateDeploymentLitellmParamsParam ¶
type UpdateDeploymentLitellmParamsParam struct {
APIBase param.Field[string] `json:"api_base"`
APIKey param.Field[string] `json:"api_key"`
APIVersion param.Field[string] `json:"api_version"`
AutoRouterConfig param.Field[string] `json:"auto_router_config"`
AutoRouterConfigPath param.Field[string] `json:"auto_router_config_path"`
AutoRouterDefaultModel param.Field[string] `json:"auto_router_default_model"`
AutoRouterEmbeddingModel param.Field[string] `json:"auto_router_embedding_model"`
AwsAccessKeyID param.Field[string] `json:"aws_access_key_id"`
AwsBedrockRuntimeEndpoint param.Field[string] `json:"aws_bedrock_runtime_endpoint"`
AwsRegionName param.Field[string] `json:"aws_region_name"`
AwsSecretAccessKey param.Field[string] `json:"aws_secret_access_key"`
BudgetDuration param.Field[string] `json:"budget_duration"`
CacheCreationInputAudioTokenCost param.Field[float64] `json:"cache_creation_input_audio_token_cost"`
CacheCreationInputTokenCost param.Field[float64] `json:"cache_creation_input_token_cost"`
CacheCreationInputTokenCostAbove1hr param.Field[float64] `json:"cache_creation_input_token_cost_above_1hr"`
CacheCreationInputTokenCostAbove200kTokens param.Field[float64] `json:"cache_creation_input_token_cost_above_200k_tokens"`
CacheReadInputAudioTokenCost param.Field[float64] `json:"cache_read_input_audio_token_cost"`
CacheReadInputTokenCost param.Field[float64] `json:"cache_read_input_token_cost"`
CacheReadInputTokenCostAbove200kTokens param.Field[float64] `json:"cache_read_input_token_cost_above_200k_tokens"`
CacheReadInputTokenCostFlex param.Field[float64] `json:"cache_read_input_token_cost_flex"`
CacheReadInputTokenCostPriority param.Field[float64] `json:"cache_read_input_token_cost_priority"`
CitationCostPerToken param.Field[float64] `json:"citation_cost_per_token"`
ConfigurableClientsideAuthParams param.Field[[]UpdateDeploymentLitellmParamsConfigurableClientsideAuthParamsUnionParam] `json:"configurable_clientside_auth_params"`
CustomLlmProvider param.Field[string] `json:"custom_llm_provider"`
GcsBucketName param.Field[string] `json:"gcs_bucket_name"`
InputCostPerAudioPerSecond param.Field[float64] `json:"input_cost_per_audio_per_second"`
InputCostPerAudioPerSecondAbove128kTokens param.Field[float64] `json:"input_cost_per_audio_per_second_above_128k_tokens"`
InputCostPerAudioToken param.Field[float64] `json:"input_cost_per_audio_token"`
InputCostPerCharacter param.Field[float64] `json:"input_cost_per_character"`
InputCostPerCharacterAbove128kTokens param.Field[float64] `json:"input_cost_per_character_above_128k_tokens"`
InputCostPerImage param.Field[float64] `json:"input_cost_per_image"`
InputCostPerImageAbove128kTokens param.Field[float64] `json:"input_cost_per_image_above_128k_tokens"`
InputCostPerPixel param.Field[float64] `json:"input_cost_per_pixel"`
InputCostPerQuery param.Field[float64] `json:"input_cost_per_query"`
InputCostPerSecond param.Field[float64] `json:"input_cost_per_second"`
InputCostPerToken param.Field[float64] `json:"input_cost_per_token"`
InputCostPerTokenAbove128kTokens param.Field[float64] `json:"input_cost_per_token_above_128k_tokens"`
InputCostPerTokenAbove200kTokens param.Field[float64] `json:"input_cost_per_token_above_200k_tokens"`
InputCostPerTokenBatches param.Field[float64] `json:"input_cost_per_token_batches"`
InputCostPerTokenCacheHit param.Field[float64] `json:"input_cost_per_token_cache_hit"`
InputCostPerTokenFlex param.Field[float64] `json:"input_cost_per_token_flex"`
InputCostPerTokenPriority param.Field[float64] `json:"input_cost_per_token_priority"`
InputCostPerVideoPerSecond param.Field[float64] `json:"input_cost_per_video_per_second"`
InputCostPerVideoPerSecondAbove128kTokens param.Field[float64] `json:"input_cost_per_video_per_second_above_128k_tokens"`
InputCostPerVideoPerSecondAbove15sInterval param.Field[float64] `json:"input_cost_per_video_per_second_above_15s_interval"`
InputCostPerVideoPerSecondAbove8sInterval param.Field[float64] `json:"input_cost_per_video_per_second_above_8s_interval"`
LitellmCredentialName param.Field[string] `json:"litellm_credential_name"`
LitellmTraceID param.Field[string] `json:"litellm_trace_id"`
MaxBudget param.Field[float64] `json:"max_budget"`
MaxFileSizeMB param.Field[float64] `json:"max_file_size_mb"`
MaxRetries param.Field[int64] `json:"max_retries"`
MergeReasoningContentInChoices param.Field[bool] `json:"merge_reasoning_content_in_choices"`
MilvusTextField param.Field[string] `json:"milvus_text_field"`
MockResponse param.Field[UpdateDeploymentLitellmParamsMockResponseUnionParam] `json:"mock_response"`
Model param.Field[string] `json:"model"`
ModelInfo param.Field[map[string]interface{}] `json:"model_info"`
Organization param.Field[string] `json:"organization"`
OutputCostPerAudioPerSecond param.Field[float64] `json:"output_cost_per_audio_per_second"`
OutputCostPerAudioToken param.Field[float64] `json:"output_cost_per_audio_token"`
OutputCostPerCharacter param.Field[float64] `json:"output_cost_per_character"`
OutputCostPerCharacterAbove128kTokens param.Field[float64] `json:"output_cost_per_character_above_128k_tokens"`
OutputCostPerImage param.Field[float64] `json:"output_cost_per_image"`
OutputCostPerImageToken param.Field[float64] `json:"output_cost_per_image_token"`
OutputCostPerPixel param.Field[float64] `json:"output_cost_per_pixel"`
OutputCostPerReasoningToken param.Field[float64] `json:"output_cost_per_reasoning_token"`
OutputCostPerSecond param.Field[float64] `json:"output_cost_per_second"`
OutputCostPerToken param.Field[float64] `json:"output_cost_per_token"`
OutputCostPerTokenAbove128kTokens param.Field[float64] `json:"output_cost_per_token_above_128k_tokens"`
OutputCostPerTokenAbove200kTokens param.Field[float64] `json:"output_cost_per_token_above_200k_tokens"`
OutputCostPerTokenBatches param.Field[float64] `json:"output_cost_per_token_batches"`
OutputCostPerTokenFlex param.Field[float64] `json:"output_cost_per_token_flex"`
OutputCostPerTokenPriority param.Field[float64] `json:"output_cost_per_token_priority"`
OutputCostPerVideoPerSecond param.Field[float64] `json:"output_cost_per_video_per_second"`
RegionName param.Field[string] `json:"region_name"`
Rpm param.Field[int64] `json:"rpm"`
S3BucketName param.Field[string] `json:"s3_bucket_name"`
S3EncryptionKeyID param.Field[string] `json:"s3_encryption_key_id"`
SearchContextCostPerQuery param.Field[map[string]interface{}] `json:"search_context_cost_per_query"`
StreamTimeout param.Field[UpdateDeploymentLitellmParamsStreamTimeoutUnionParam] `json:"stream_timeout"`
TieredPricing param.Field[[]map[string]interface{}] `json:"tiered_pricing"`
Timeout param.Field[UpdateDeploymentLitellmParamsTimeoutUnionParam] `json:"timeout"`
Tpm param.Field[int64] `json:"tpm"`
UseInPassThrough param.Field[bool] `json:"use_in_pass_through"`
UseLitellmProxy param.Field[bool] `json:"use_litellm_proxy"`
VectorStoreID param.Field[string] `json:"vector_store_id"`
VertexCredentials param.Field[UpdateDeploymentLitellmParamsVertexCredentialsUnionParam] `json:"vertex_credentials"`
VertexLocation param.Field[string] `json:"vertex_location"`
VertexProject param.Field[string] `json:"vertex_project"`
WatsonxRegionName param.Field[string] `json:"watsonx_region_name"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
func (UpdateDeploymentLitellmParamsParam) MarshalJSON ¶
func (r UpdateDeploymentLitellmParamsParam) MarshalJSON() (data []byte, err error)
type UpdateDeploymentLitellmParamsStreamTimeoutUnionParam ¶
type UpdateDeploymentLitellmParamsStreamTimeoutUnionParam interface {
ImplementsUpdateDeploymentLitellmParamsStreamTimeoutUnionParam()
}
Satisfied by shared.UnionFloat, shared.UnionString.
type UpdateDeploymentLitellmParamsTimeoutUnionParam ¶
type UpdateDeploymentLitellmParamsTimeoutUnionParam interface {
ImplementsUpdateDeploymentLitellmParamsTimeoutUnionParam()
}
Satisfied by shared.UnionFloat, shared.UnionString.
type UpdateDeploymentLitellmParamsVertexCredentialsMapParam ¶
type UpdateDeploymentLitellmParamsVertexCredentialsMapParam map[string]interface{}
func (UpdateDeploymentLitellmParamsVertexCredentialsMapParam) ImplementsUpdateDeploymentLitellmParamsVertexCredentialsUnionParam ¶
func (r UpdateDeploymentLitellmParamsVertexCredentialsMapParam) ImplementsUpdateDeploymentLitellmParamsVertexCredentialsUnionParam()
type UpdateDeploymentLitellmParamsVertexCredentialsUnionParam ¶
type UpdateDeploymentLitellmParamsVertexCredentialsUnionParam interface {
ImplementsUpdateDeploymentLitellmParamsVertexCredentialsUnionParam()
}
Satisfied by shared.UnionString, UpdateDeploymentLitellmParamsVertexCredentialsMapParam.
type UpdateDeploymentParam ¶
type UpdateDeploymentParam struct {
LitellmParams param.Field[UpdateDeploymentLitellmParamsParam] `json:"litellm_params"`
ModelInfo param.Field[ModelInfoParam] `json:"model_info"`
ModelName param.Field[string] `json:"model_name"`
}
func (UpdateDeploymentParam) MarshalJSON ¶
func (r UpdateDeploymentParam) MarshalJSON() (data []byte, err error)
type UserDeleteParams ¶
type UserDeleteParams struct {
UserIDs param.Field[[]string] `json:"user_ids,required"`
// The litellm-changed-by header enables tracking of actions performed by
// authorized users on behalf of other users, providing an audit trail for
// accountability
LitellmChangedBy param.Field[string] `header:"litellm-changed-by"`
}
func (UserDeleteParams) MarshalJSON ¶
func (r UserDeleteParams) MarshalJSON() (data []byte, err error)
type UserDeleteResponse ¶
type UserDeleteResponse = interface{}
type UserGetInfoParams ¶
type UserGetInfoParams struct {
// User ID in the request parameters
UserID param.Field[string] `query:"user_id"`
}
func (UserGetInfoParams) URLQuery ¶
func (r UserGetInfoParams) URLQuery() (v url.Values)
URLQuery serializes UserGetInfoParams's query parameters as `url.Values`.
type UserGetInfoResponse ¶
type UserGetInfoResponse = interface{}
type UserNewParams ¶
type UserNewParams struct {
Aliases param.Field[map[string]interface{}] `json:"aliases"`
AllowedCacheControls param.Field[[]interface{}] `json:"allowed_cache_controls"`
AutoCreateKey param.Field[bool] `json:"auto_create_key"`
Blocked param.Field[bool] `json:"blocked"`
BudgetDuration param.Field[string] `json:"budget_duration"`
Config param.Field[map[string]interface{}] `json:"config"`
Duration param.Field[string] `json:"duration"`
Guardrails param.Field[[]string] `json:"guardrails"`
KeyAlias param.Field[string] `json:"key_alias"`
MaxBudget param.Field[float64] `json:"max_budget"`
MaxParallelRequests param.Field[int64] `json:"max_parallel_requests"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
ModelMaxBudget param.Field[map[string]interface{}] `json:"model_max_budget"`
ModelRpmLimit param.Field[map[string]interface{}] `json:"model_rpm_limit"`
ModelTpmLimit param.Field[map[string]interface{}] `json:"model_tpm_limit"`
Models param.Field[[]interface{}] `json:"models"`
ObjectPermission param.Field[UserNewParamsObjectPermission] `json:"object_permission"`
Organizations param.Field[[]string] `json:"organizations"`
Permissions param.Field[map[string]interface{}] `json:"permissions"`
Prompts param.Field[[]string] `json:"prompts"`
RpmLimit param.Field[int64] `json:"rpm_limit"`
SendInviteEmail param.Field[bool] `json:"send_invite_email"`
Spend param.Field[float64] `json:"spend"`
SSOUserID param.Field[string] `json:"sso_user_id"`
TeamID param.Field[string] `json:"team_id"`
Teams param.Field[UserNewParamsTeamsUnion] `json:"teams"`
TpmLimit param.Field[int64] `json:"tpm_limit"`
UserAlias param.Field[string] `json:"user_alias"`
UserEmail param.Field[string] `json:"user_email"`
UserID param.Field[string] `json:"user_id"`
UserRole param.Field[UserNewParamsUserRole] `json:"user_role"`
}
func (UserNewParams) MarshalJSON ¶
func (r UserNewParams) MarshalJSON() (data []byte, err error)
type UserNewParamsObjectPermission ¶
type UserNewParamsObjectPermission struct {
AgentAccessGroups param.Field[[]string] `json:"agent_access_groups"`
Agents param.Field[[]string] `json:"agents"`
McpAccessGroups param.Field[[]string] `json:"mcp_access_groups"`
McpServers param.Field[[]string] `json:"mcp_servers"`
McpToolPermissions param.Field[map[string][]string] `json:"mcp_tool_permissions"`
VectorStores param.Field[[]string] `json:"vector_stores"`
}
func (UserNewParamsObjectPermission) MarshalJSON ¶
func (r UserNewParamsObjectPermission) MarshalJSON() (data []byte, err error)
type UserNewParamsTeamsArray ¶
type UserNewParamsTeamsArray []string
type UserNewParamsTeamsUnion ¶
type UserNewParamsTeamsUnion interface {
// contains filtered or unexported methods
}
Satisfied by UserNewParamsTeamsArray, UserNewParamsTeamsArray.
type UserNewParamsUserRole ¶
type UserNewParamsUserRole string
const ( UserNewParamsUserRoleProxyAdmin UserNewParamsUserRole = "proxy_admin" UserNewParamsUserRoleProxyAdminViewer UserNewParamsUserRole = "proxy_admin_viewer" UserNewParamsUserRoleInternalUser UserNewParamsUserRole = "internal_user" UserNewParamsUserRoleInternalUserViewer UserNewParamsUserRole = "internal_user_viewer" )
func (UserNewParamsUserRole) IsKnown ¶
func (r UserNewParamsUserRole) IsKnown() bool
type UserNewResponse ¶
type UserNewResponse struct {
Key string `json:"key,required"`
Token string `json:"token,nullable"`
Aliases map[string]interface{} `json:"aliases,nullable"`
AllowedCacheControls []interface{} `json:"allowed_cache_controls,nullable"`
AllowedPassthroughRoutes []interface{} `json:"allowed_passthrough_routes,nullable"`
AllowedRoutes []interface{} `json:"allowed_routes,nullable"`
AllowedVectorStoreIndexes []UserNewResponseAllowedVectorStoreIndex `json:"allowed_vector_store_indexes,nullable"`
Blocked bool `json:"blocked,nullable"`
BudgetDuration string `json:"budget_duration,nullable"`
BudgetID string `json:"budget_id,nullable"`
Config map[string]interface{} `json:"config,nullable"`
CreatedAt time.Time `json:"created_at,nullable" format:"date-time"`
CreatedBy string `json:"created_by,nullable"`
Duration string `json:"duration,nullable"`
EnforcedParams []string `json:"enforced_params,nullable"`
Expires time.Time `json:"expires,nullable" format:"date-time"`
Guardrails []string `json:"guardrails,nullable"`
KeyAlias string `json:"key_alias,nullable"`
KeyName string `json:"key_name,nullable"`
LitellmBudgetTable interface{} `json:"litellm_budget_table"`
MaxBudget float64 `json:"max_budget,nullable"`
MaxParallelRequests int64 `json:"max_parallel_requests,nullable"`
Metadata map[string]interface{} `json:"metadata,nullable"`
ModelMaxBudget map[string]interface{} `json:"model_max_budget,nullable"`
ModelRpmLimit map[string]interface{} `json:"model_rpm_limit,nullable"`
ModelTpmLimit map[string]interface{} `json:"model_tpm_limit,nullable"`
Models []interface{} `json:"models,nullable"`
ObjectPermission UserNewResponseObjectPermission `json:"object_permission,nullable"`
OrganizationID string `json:"organization_id,nullable"`
Permissions map[string]interface{} `json:"permissions,nullable"`
Prompts []string `json:"prompts,nullable"`
// Set of params that you can modify via `router.update_settings()`.
RouterSettings UserNewResponseRouterSettings `json:"router_settings,nullable"`
RpmLimit int64 `json:"rpm_limit,nullable"`
RpmLimitType UserNewResponseRpmLimitType `json:"rpm_limit_type,nullable"`
Spend float64 `json:"spend,nullable"`
Tags []string `json:"tags,nullable"`
TeamID string `json:"team_id,nullable"`
Teams []interface{} `json:"teams,nullable"`
TokenID string `json:"token_id,nullable"`
TpmLimit int64 `json:"tpm_limit,nullable"`
TpmLimitType UserNewResponseTpmLimitType `json:"tpm_limit_type,nullable"`
UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
UpdatedBy string `json:"updated_by,nullable"`
UserAlias string `json:"user_alias,nullable"`
UserEmail string `json:"user_email,nullable"`
UserID string `json:"user_id,nullable"`
UserRole UserNewResponseUserRole `json:"user_role,nullable"`
JSON userNewResponseJSON `json:"-"`
}
func (*UserNewResponse) UnmarshalJSON ¶
func (r *UserNewResponse) UnmarshalJSON(data []byte) (err error)
type UserNewResponseAllowedVectorStoreIndex ¶
type UserNewResponseAllowedVectorStoreIndex struct {
IndexName string `json:"index_name,required"`
IndexPermissions []UserNewResponseAllowedVectorStoreIndexesIndexPermission `json:"index_permissions,required"`
JSON userNewResponseAllowedVectorStoreIndexJSON `json:"-"`
}
func (*UserNewResponseAllowedVectorStoreIndex) UnmarshalJSON ¶
func (r *UserNewResponseAllowedVectorStoreIndex) UnmarshalJSON(data []byte) (err error)
type UserNewResponseAllowedVectorStoreIndexesIndexPermission ¶
type UserNewResponseAllowedVectorStoreIndexesIndexPermission string
const ( UserNewResponseAllowedVectorStoreIndexesIndexPermissionRead UserNewResponseAllowedVectorStoreIndexesIndexPermission = "read" UserNewResponseAllowedVectorStoreIndexesIndexPermissionWrite UserNewResponseAllowedVectorStoreIndexesIndexPermission = "write" )
func (UserNewResponseAllowedVectorStoreIndexesIndexPermission) IsKnown ¶
func (r UserNewResponseAllowedVectorStoreIndexesIndexPermission) IsKnown() bool
type UserNewResponseObjectPermission ¶
type UserNewResponseObjectPermission struct {
AgentAccessGroups []string `json:"agent_access_groups,nullable"`
Agents []string `json:"agents,nullable"`
McpAccessGroups []string `json:"mcp_access_groups,nullable"`
McpServers []string `json:"mcp_servers,nullable"`
McpToolPermissions map[string][]string `json:"mcp_tool_permissions,nullable"`
VectorStores []string `json:"vector_stores,nullable"`
JSON userNewResponseObjectPermissionJSON `json:"-"`
}
func (*UserNewResponseObjectPermission) UnmarshalJSON ¶
func (r *UserNewResponseObjectPermission) UnmarshalJSON(data []byte) (err error)
type UserNewResponseRouterSettings ¶
type UserNewResponseRouterSettings struct {
AllowedFails int64 `json:"allowed_fails,nullable"`
ContextWindowFallbacks []map[string]interface{} `json:"context_window_fallbacks,nullable"`
CooldownTime float64 `json:"cooldown_time,nullable"`
Fallbacks []map[string]interface{} `json:"fallbacks,nullable"`
MaxRetries int64 `json:"max_retries,nullable"`
ModelGroupAlias map[string]UserNewResponseRouterSettingsModelGroupAliasUnion `json:"model_group_alias,nullable"`
ModelGroupRetryPolicy map[string]interface{} `json:"model_group_retry_policy,nullable"`
NumRetries int64 `json:"num_retries,nullable"`
RetryAfter float64 `json:"retry_after,nullable"`
RoutingStrategy string `json:"routing_strategy,nullable"`
RoutingStrategyArgs map[string]interface{} `json:"routing_strategy_args,nullable"`
Timeout float64 `json:"timeout,nullable"`
JSON userNewResponseRouterSettingsJSON `json:"-"`
}
Set of params that you can modify via `router.update_settings()`.
func (*UserNewResponseRouterSettings) UnmarshalJSON ¶
func (r *UserNewResponseRouterSettings) UnmarshalJSON(data []byte) (err error)
type UserNewResponseRouterSettingsModelGroupAliasMap ¶
type UserNewResponseRouterSettingsModelGroupAliasMap map[string]interface{}
func (UserNewResponseRouterSettingsModelGroupAliasMap) ImplementsUserNewResponseRouterSettingsModelGroupAliasUnion ¶
func (r UserNewResponseRouterSettingsModelGroupAliasMap) ImplementsUserNewResponseRouterSettingsModelGroupAliasUnion()
type UserNewResponseRouterSettingsModelGroupAliasUnion ¶
type UserNewResponseRouterSettingsModelGroupAliasUnion interface {
ImplementsUserNewResponseRouterSettingsModelGroupAliasUnion()
}
Union satisfied by shared.UnionString or UserNewResponseRouterSettingsModelGroupAliasMap.
type UserNewResponseRpmLimitType ¶
type UserNewResponseRpmLimitType string
const ( UserNewResponseRpmLimitTypeGuaranteedThroughput UserNewResponseRpmLimitType = "guaranteed_throughput" UserNewResponseRpmLimitTypeBestEffortThroughput UserNewResponseRpmLimitType = "best_effort_throughput" UserNewResponseRpmLimitTypeDynamic UserNewResponseRpmLimitType = "dynamic" )
func (UserNewResponseRpmLimitType) IsKnown ¶
func (r UserNewResponseRpmLimitType) IsKnown() bool
type UserNewResponseTpmLimitType ¶
type UserNewResponseTpmLimitType string
const ( UserNewResponseTpmLimitTypeGuaranteedThroughput UserNewResponseTpmLimitType = "guaranteed_throughput" UserNewResponseTpmLimitTypeBestEffortThroughput UserNewResponseTpmLimitType = "best_effort_throughput" UserNewResponseTpmLimitTypeDynamic UserNewResponseTpmLimitType = "dynamic" )
func (UserNewResponseTpmLimitType) IsKnown ¶
func (r UserNewResponseTpmLimitType) IsKnown() bool
type UserNewResponseUserRole ¶
type UserNewResponseUserRole string
const ( UserNewResponseUserRoleProxyAdmin UserNewResponseUserRole = "proxy_admin" UserNewResponseUserRoleProxyAdminViewer UserNewResponseUserRole = "proxy_admin_viewer" UserNewResponseUserRoleInternalUser UserNewResponseUserRole = "internal_user" UserNewResponseUserRoleInternalUserViewer UserNewResponseUserRole = "internal_user_viewer" )
func (UserNewResponseUserRole) IsKnown ¶
func (r UserNewResponseUserRole) IsKnown() bool
type UserRoles ¶
type UserRoles string
Admin Roles: PROXY_ADMIN: admin over the platform PROXY_ADMIN_VIEW_ONLY: can login, view all own keys, view all spend ORG_ADMIN: admin over a specific organization, can create teams, users only within their organization
Internal User Roles: INTERNAL_USER: can login, view/create/delete their own keys, view their spend INTERNAL_USER_VIEW_ONLY: can login, view their own keys, view their own spend
Team Roles: TEAM: used for JWT auth
Customer Roles: CUSTOMER: External users -> these are customers
const ( UserRolesProxyAdmin UserRoles = "proxy_admin" UserRolesProxyAdminViewer UserRoles = "proxy_admin_viewer" UserRolesOrgAdmin UserRoles = "org_admin" UserRolesInternalUser UserRoles = "internal_user" UserRolesInternalUserViewer UserRoles = "internal_user_viewer" UserRolesTeam UserRoles = "team" UserRolesCustomer UserRoles = "customer" )
type UserService ¶
type UserService struct {
Options []option.RequestOption
}
UserService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserService method instead.
func NewUserService ¶
func NewUserService(opts ...option.RequestOption) (r *UserService)
NewUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UserService) Delete ¶
func (r *UserService) Delete(ctx context.Context, params UserDeleteParams, opts ...option.RequestOption) (res *UserDeleteResponse, err error)
delete user and associated user keys
``` curl --location 'http://0.0.0.0:4000/user/delete' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json'
--data-raw '{
"user_ids": ["45e3e396-ee08-4a61-a88e-16b3ce7e0849"]
}'
```
Parameters:
- user_ids: List[str] - The list of user id's to be deleted.
func (*UserService) GetInfo ¶
func (r *UserService) GetInfo(ctx context.Context, query UserGetInfoParams, opts ...option.RequestOption) (res *UserGetInfoResponse, err error)
10/07/2024 Note: To get all users (+pagination), use `/user/list` endpoint.
Use this to get user information. (user row + all user key info)
Example request ¶
``` curl -X GET 'http://localhost:4000/user/info?user_id=krrish7%40berri.ai' --header 'Authorization: Bearer sk-1234' ```
func (*UserService) New ¶
func (r *UserService) New(ctx context.Context, body UserNewParams, opts ...option.RequestOption) (res *UserNewResponse, err error)
Use this to create a new INTERNAL user with a budget. Internal Users can access LiteLLM Admin UI to make keys, request access to models. This creates a new user and generates a new api key for the new user. The new api key is returned.
Returns user id, budget + new key.
Parameters:
- user_id: Optional[str] - Specify a user id. If not set, a unique id will be generated.
- user_alias: Optional[str] - A descriptive name for you to know who this user id refers to.
- teams: Optional[list] - specify a list of team id's a user belongs to.
- user_email: Optional[str] - Specify a user email.
- send_invite_email: Optional[bool] - Specify if an invite email should be sent.
- user_role: Optional[str] - Specify a user role - "proxy_admin", "proxy_admin_viewer", "internal_user", "internal_user_viewer", "team", "customer". Info about each role here: `https://github.com/BerriAI/litellm/litellm/proxy/_types.py#L20`
- max_budget: Optional[float] - Specify max budget for a given user.
- budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo").
- models: Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models). Set to ['no-default-models'] to block all model access. Restricting user to only team-based model access.
- tpm_limit: Optional[int] - Specify tpm limit for a given user (Tokens per minute)
- rpm_limit: Optional[int] - Specify rpm limit for a given user (Requests per minute)
- auto_create_key: bool - Default=True. Flag used for returning a key as part of the /user/new response
- aliases: Optional[dict] - Model aliases for the user - [Docs](https://litellm.vercel.app/docs/proxy/virtual_keys#model-aliases)
- config: Optional[dict] - [DEPRECATED PARAM] User-specific config.
- allowed_cache_controls: Optional[list] - List of allowed cache control values. Example - ["no-cache", "no-store"]. See all values - https://docs.litellm.ai/docs/proxy/caching#turn-on--off-caching-per-request-
- blocked: Optional[bool] - [Not Implemented Yet] Whether the user is blocked.
- guardrails: Optional[List[str]] - [Not Implemented Yet] List of active guardrails for the user
- permissions: Optional[dict] - [Not Implemented Yet] User-specific permissions, eg. turning off pii masking.
- metadata: Optional[dict] - Metadata for user, store information for user. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" }
- max_parallel_requests: Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x.
- soft_budget: Optional[float] - Get alerts when user crosses given budget, doesn't block requests.
- model_max_budget: Optional[dict] - Model-specific max budget for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-budgets-to-keys)
- model_rpm_limit: Optional[float] - Model-specific rpm limit for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-limits-to-keys)
- model_tpm_limit: Optional[float] - Model-specific tpm limit for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-limits-to-keys)
- spend: Optional[float] - Amount spent by user. Default is 0. Will be updated by proxy whenever user is used. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo").
- team_id: Optional[str] - [DEPRECATED PARAM] The team id of the user. Default is None.
- duration: Optional[str] - Duration for the key auto-created on `/user/new`. Default is None.
- key_alias: Optional[str] - Alias for the key auto-created on `/user/new`. Default is None.
- sso_user_id: Optional[str] - The id of the user in the SSO provider.
- object_permission: Optional[LiteLLM_ObjectPermissionBase] - internal user-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"]}. IF null or {} then no object permission.
- prompts: Optional[List[str]] - List of allowed prompts for the user. If specified, the user will only be able to use these specific prompts.
- organizations: List[str] - List of organization id's the user is a member of Returns:
- key: (str) The generated api key for the user
- expires: (datetime) Datetime object for when key expires.
- user_id: (str) Unique user id - used for tracking spend across multiple keys for same user id.
- max_budget: (float|None) Max budget for given user.
Usage Example ¶
```shell
curl -X POST "http://localhost:4000/user/new" -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{
"username": "new_user",
"email": "new_user@example.com"
}'
```
func (*UserService) Update ¶
func (r *UserService) Update(ctx context.Context, body UserUpdateParams, opts ...option.RequestOption) (res *UserUpdateResponse, err error)
Example curl
```
curl --location 'http://0.0.0.0:4000/user/update' --header 'Authorization: Bearer sk-1234' --header 'Content-Type: application/json' --data '{
"user_id": "test-litellm-user-4",
"user_role": "proxy_admin_viewer"
}'
```
Parameters: - user_id: Optional[str] - Specify a user id. If not set, a unique id will be generated. - user_email: Optional[str] - Specify a user email. - password: Optional[str] - Specify a user password. - user_alias: Optional[str] - A descriptive name for you to know who this user id refers to. - teams: Optional[list] - specify a list of team id's a user belongs to. - send_invite_email: Optional[bool] - Specify if an invite email should be sent. - user_role: Optional[str] - Specify a user role - "proxy_admin", "proxy_admin_viewer", "internal_user", "internal_user_viewer", "team", "customer". Info about each role here: `https://github.com/BerriAI/litellm/litellm/proxy/_types.py#L20` - max_budget: Optional[float] - Specify max budget for a given user. - budget_duration: Optional[str] - Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo"). - models: Optional[list] - Model_name's a user is allowed to call. (if empty, key is allowed to call all models) - tpm_limit: Optional[int] - Specify tpm limit for a given user (Tokens per minute) - rpm_limit: Optional[int] - Specify rpm limit for a given user (Requests per minute) - auto_create_key: bool - Default=True. Flag used for returning a key as part of the /user/new response - aliases: Optional[dict] - Model aliases for the user - [Docs](https://litellm.vercel.app/docs/proxy/virtual_keys#model-aliases) - config: Optional[dict] - [DEPRECATED PARAM] User-specific config. - allowed_cache_controls: Optional[list] - List of allowed cache control values. Example - ["no-cache", "no-store"]. See all values - https://docs.litellm.ai/docs/proxy/caching#turn-on--off-caching-per-request- - blocked: Optional[bool] - [Not Implemented Yet] Whether the user is blocked. - guardrails: Optional[List[str]] - [Not Implemented Yet] List of active guardrails for the user - permissions: Optional[dict] - [Not Implemented Yet] User-specific permissions, eg. turning off pii masking. - metadata: Optional[dict] - Metadata for user, store information for user. Example metadata = {"team": "core-infra", "app": "app2", "email": "ishaan@berri.ai" } - max_parallel_requests: Optional[int] - Rate limit a user based on the number of parallel requests. Raises 429 error, if user's parallel requests > x. - soft_budget: Optional[float] - Get alerts when user crosses given budget, doesn't block requests. - model_max_budget: Optional[dict] - Model-specific max budget for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-budgets-to-keys) - model_rpm_limit: Optional[float] - Model-specific rpm limit for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-limits-to-keys) - model_tpm_limit: Optional[float] - Model-specific tpm limit for user. [Docs](https://docs.litellm.ai/docs/proxy/users#add-model-specific-limits-to-keys) - spend: Optional[float] - Amount spent by user. Default is 0. Will be updated by proxy whenever user is used. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d"), months ("1mo"). - team_id: Optional[str] - [DEPRECATED PARAM] The team id of the user. Default is None. - duration: Optional[str] - [NOT IMPLEMENTED]. - key_alias: Optional[str] - [NOT IMPLEMENTED]. - object_permission: Optional[LiteLLM_ObjectPermissionBase] - internal user-specific object permission. Example - {"vector_stores": ["vector_store_1", "vector_store_2"]}. IF null or {} then no object permission. - prompts: Optional[List[str]] - List of allowed prompts for the user. If specified, the user will only be able to use these specific prompts.
type UserUpdateParams ¶
type UserUpdateParams struct {
Aliases param.Field[map[string]interface{}] `json:"aliases"`
AllowedCacheControls param.Field[[]interface{}] `json:"allowed_cache_controls"`
Blocked param.Field[bool] `json:"blocked"`
BudgetDuration param.Field[string] `json:"budget_duration"`
Config param.Field[map[string]interface{}] `json:"config"`
Duration param.Field[string] `json:"duration"`
Guardrails param.Field[[]string] `json:"guardrails"`
KeyAlias param.Field[string] `json:"key_alias"`
MaxBudget param.Field[float64] `json:"max_budget"`
MaxParallelRequests param.Field[int64] `json:"max_parallel_requests"`
Metadata param.Field[map[string]interface{}] `json:"metadata"`
ModelMaxBudget param.Field[map[string]interface{}] `json:"model_max_budget"`
ModelRpmLimit param.Field[map[string]interface{}] `json:"model_rpm_limit"`
ModelTpmLimit param.Field[map[string]interface{}] `json:"model_tpm_limit"`
Models param.Field[[]interface{}] `json:"models"`
ObjectPermission param.Field[UserUpdateParamsObjectPermission] `json:"object_permission"`
Password param.Field[string] `json:"password"`
Permissions param.Field[map[string]interface{}] `json:"permissions"`
Prompts param.Field[[]string] `json:"prompts"`
RpmLimit param.Field[int64] `json:"rpm_limit"`
Spend param.Field[float64] `json:"spend"`
TeamID param.Field[string] `json:"team_id"`
TpmLimit param.Field[int64] `json:"tpm_limit"`
UserAlias param.Field[string] `json:"user_alias"`
UserEmail param.Field[string] `json:"user_email"`
UserID param.Field[string] `json:"user_id"`
UserRole param.Field[UserUpdateParamsUserRole] `json:"user_role"`
}
func (UserUpdateParams) MarshalJSON ¶
func (r UserUpdateParams) MarshalJSON() (data []byte, err error)
type UserUpdateParamsObjectPermission ¶
type UserUpdateParamsObjectPermission struct {
AgentAccessGroups param.Field[[]string] `json:"agent_access_groups"`
Agents param.Field[[]string] `json:"agents"`
McpAccessGroups param.Field[[]string] `json:"mcp_access_groups"`
McpServers param.Field[[]string] `json:"mcp_servers"`
McpToolPermissions param.Field[map[string][]string] `json:"mcp_tool_permissions"`
VectorStores param.Field[[]string] `json:"vector_stores"`
}
func (UserUpdateParamsObjectPermission) MarshalJSON ¶
func (r UserUpdateParamsObjectPermission) MarshalJSON() (data []byte, err error)
type UserUpdateParamsUserRole ¶
type UserUpdateParamsUserRole string
const ( UserUpdateParamsUserRoleProxyAdmin UserUpdateParamsUserRole = "proxy_admin" UserUpdateParamsUserRoleProxyAdminViewer UserUpdateParamsUserRole = "proxy_admin_viewer" UserUpdateParamsUserRoleInternalUser UserUpdateParamsUserRole = "internal_user" UserUpdateParamsUserRoleInternalUserViewer UserUpdateParamsUserRole = "internal_user_viewer" )
func (UserUpdateParamsUserRole) IsKnown ¶
func (r UserUpdateParamsUserRole) IsKnown() bool
type UserUpdateResponse ¶
type UserUpdateResponse = interface{}
type UtilGetSupportedOpenAIParamsParams ¶
type UtilGetSupportedOpenAIParamsParams struct {
Model param.Field[string] `query:"model,required"`
}
func (UtilGetSupportedOpenAIParamsParams) URLQuery ¶
func (r UtilGetSupportedOpenAIParamsParams) URLQuery() (v url.Values)
URLQuery serializes UtilGetSupportedOpenAIParamsParams's query parameters as `url.Values`.
type UtilGetSupportedOpenAIParamsResponse ¶
type UtilGetSupportedOpenAIParamsResponse = interface{}
type UtilService ¶
type UtilService struct {
Options []option.RequestOption
}
UtilService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUtilService method instead.
func NewUtilService ¶
func NewUtilService(opts ...option.RequestOption) (r *UtilService)
NewUtilService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*UtilService) GetSupportedOpenAIParams ¶
func (r *UtilService) GetSupportedOpenAIParams(ctx context.Context, query UtilGetSupportedOpenAIParamsParams, opts ...option.RequestOption) (res *UtilGetSupportedOpenAIParamsResponse, err error)
Returns supported openai params for a given litellm model name
e.g. `gpt-4` vs `gpt-3.5-turbo`
Example curl:
``` curl -X GET --location 'http://localhost:4000/utils/supported_openai_params?model=gpt-3.5-turbo-16k' --header 'Authorization: Bearer sk-1234' ```
func (*UtilService) TokenCounter ¶
func (r *UtilService) TokenCounter(ctx context.Context, params UtilTokenCounterParams, opts ...option.RequestOption) (res *UtilTokenCounterResponse, err error)
Args: request: TokenCountRequest call_endpoint: bool - When set to "True" it will call the token counting endpoint - e.g Anthropic or Google AI Studio Token Counting APIs.
Returns: TokenCountResponse
func (*UtilService) TransformRequest ¶
func (r *UtilService) TransformRequest(ctx context.Context, body UtilTransformRequestParams, opts ...option.RequestOption) (res *UtilTransformRequestResponse, err error)
Transform Request
type UtilTokenCounterParams ¶
type UtilTokenCounterParams struct {
Model param.Field[string] `json:"model,required"`
CallEndpoint param.Field[bool] `query:"call_endpoint"`
Contents param.Field[[]map[string]interface{}] `json:"contents"`
Messages param.Field[[]map[string]interface{}] `json:"messages"`
Prompt param.Field[string] `json:"prompt"`
}
func (UtilTokenCounterParams) MarshalJSON ¶
func (r UtilTokenCounterParams) MarshalJSON() (data []byte, err error)
func (UtilTokenCounterParams) URLQuery ¶
func (r UtilTokenCounterParams) URLQuery() (v url.Values)
URLQuery serializes UtilTokenCounterParams's query parameters as `url.Values`.
type UtilTokenCounterResponse ¶
type UtilTokenCounterResponse struct {
ModelUsed string `json:"model_used,required"`
RequestModel string `json:"request_model,required"`
TokenizerType string `json:"tokenizer_type,required"`
TotalTokens int64 `json:"total_tokens,required"`
Error bool `json:"error"`
ErrorMessage string `json:"error_message,nullable"`
OriginalResponse map[string]interface{} `json:"original_response,nullable"`
StatusCode int64 `json:"status_code,nullable"`
JSON utilTokenCounterResponseJSON `json:"-"`
}
func (*UtilTokenCounterResponse) UnmarshalJSON ¶
func (r *UtilTokenCounterResponse) UnmarshalJSON(data []byte) (err error)
type UtilTransformRequestParams ¶
type UtilTransformRequestParams struct {
CallType param.Field[UtilTransformRequestParamsCallType] `json:"call_type,required"`
RequestBody param.Field[map[string]interface{}] `json:"request_body,required"`
}
func (UtilTransformRequestParams) MarshalJSON ¶
func (r UtilTransformRequestParams) MarshalJSON() (data []byte, err error)
type UtilTransformRequestParamsCallType ¶
type UtilTransformRequestParamsCallType string
const ( UtilTransformRequestParamsCallTypeEmbedding UtilTransformRequestParamsCallType = "embedding" UtilTransformRequestParamsCallTypeAembedding UtilTransformRequestParamsCallType = "aembedding" UtilTransformRequestParamsCallTypeCompletion UtilTransformRequestParamsCallType = "completion" UtilTransformRequestParamsCallTypeAcompletion UtilTransformRequestParamsCallType = "acompletion" UtilTransformRequestParamsCallTypeAtextCompletion UtilTransformRequestParamsCallType = "atext_completion" UtilTransformRequestParamsCallTypeTextCompletion UtilTransformRequestParamsCallType = "text_completion" UtilTransformRequestParamsCallTypeImageGeneration UtilTransformRequestParamsCallType = "image_generation" UtilTransformRequestParamsCallTypeAimageGeneration UtilTransformRequestParamsCallType = "aimage_generation" UtilTransformRequestParamsCallTypeImageEdit UtilTransformRequestParamsCallType = "image_edit" UtilTransformRequestParamsCallTypeAimageEdit UtilTransformRequestParamsCallType = "aimage_edit" UtilTransformRequestParamsCallTypeModeration UtilTransformRequestParamsCallType = "moderation" UtilTransformRequestParamsCallTypeAmoderation UtilTransformRequestParamsCallType = "amoderation" UtilTransformRequestParamsCallTypeAtranscription UtilTransformRequestParamsCallType = "atranscription" UtilTransformRequestParamsCallTypeTranscription UtilTransformRequestParamsCallType = "transcription" UtilTransformRequestParamsCallTypeAspeech UtilTransformRequestParamsCallType = "aspeech" UtilTransformRequestParamsCallTypeSpeech UtilTransformRequestParamsCallType = "speech" UtilTransformRequestParamsCallTypeRerank UtilTransformRequestParamsCallType = "rerank" UtilTransformRequestParamsCallTypeArerank UtilTransformRequestParamsCallType = "arerank" UtilTransformRequestParamsCallTypeSearch UtilTransformRequestParamsCallType = "search" UtilTransformRequestParamsCallTypeAsearch UtilTransformRequestParamsCallType = "asearch" UtilTransformRequestParamsCallType_Arealtime UtilTransformRequestParamsCallType = "_arealtime" UtilTransformRequestParamsCallTypeCreateBatch UtilTransformRequestParamsCallType = "create_batch" UtilTransformRequestParamsCallTypeAcreateBatch UtilTransformRequestParamsCallType = "acreate_batch" UtilTransformRequestParamsCallTypeAretrieveBatch UtilTransformRequestParamsCallType = "aretrieve_batch" UtilTransformRequestParamsCallTypeRetrieveBatch UtilTransformRequestParamsCallType = "retrieve_batch" UtilTransformRequestParamsCallTypePassThroughEndpoint UtilTransformRequestParamsCallType = "pass_through_endpoint" UtilTransformRequestParamsCallTypeAnthropicMessages UtilTransformRequestParamsCallType = "anthropic_messages" UtilTransformRequestParamsCallTypeGetAssistants UtilTransformRequestParamsCallType = "get_assistants" UtilTransformRequestParamsCallTypeAgetAssistants UtilTransformRequestParamsCallType = "aget_assistants" UtilTransformRequestParamsCallTypeCreateAssistants UtilTransformRequestParamsCallType = "create_assistants" UtilTransformRequestParamsCallTypeAcreateAssistants UtilTransformRequestParamsCallType = "acreate_assistants" UtilTransformRequestParamsCallTypeDeleteAssistant UtilTransformRequestParamsCallType = "delete_assistant" UtilTransformRequestParamsCallTypeAdeleteAssistant UtilTransformRequestParamsCallType = "adelete_assistant" UtilTransformRequestParamsCallTypeAcreateThread UtilTransformRequestParamsCallType = "acreate_thread" UtilTransformRequestParamsCallTypeCreateThread UtilTransformRequestParamsCallType = "create_thread" UtilTransformRequestParamsCallTypeAgetThread UtilTransformRequestParamsCallType = "aget_thread" UtilTransformRequestParamsCallTypeGetThread UtilTransformRequestParamsCallType = "get_thread" UtilTransformRequestParamsCallTypeAAddMessage UtilTransformRequestParamsCallType = "a_add_message" UtilTransformRequestParamsCallTypeAddMessage UtilTransformRequestParamsCallType = "add_message" UtilTransformRequestParamsCallTypeAgetMessages UtilTransformRequestParamsCallType = "aget_messages" UtilTransformRequestParamsCallTypeGetMessages UtilTransformRequestParamsCallType = "get_messages" UtilTransformRequestParamsCallTypeArunThread UtilTransformRequestParamsCallType = "arun_thread" UtilTransformRequestParamsCallTypeRunThread UtilTransformRequestParamsCallType = "run_thread" UtilTransformRequestParamsCallTypeArunThreadStream UtilTransformRequestParamsCallType = "arun_thread_stream" UtilTransformRequestParamsCallTypeRunThreadStream UtilTransformRequestParamsCallType = "run_thread_stream" UtilTransformRequestParamsCallTypeAfileRetrieve UtilTransformRequestParamsCallType = "afile_retrieve" UtilTransformRequestParamsCallTypeFileRetrieve UtilTransformRequestParamsCallType = "file_retrieve" UtilTransformRequestParamsCallTypeAfileDelete UtilTransformRequestParamsCallType = "afile_delete" UtilTransformRequestParamsCallTypeFileDelete UtilTransformRequestParamsCallType = "file_delete" UtilTransformRequestParamsCallTypeAfileList UtilTransformRequestParamsCallType = "afile_list" UtilTransformRequestParamsCallTypeFileList UtilTransformRequestParamsCallType = "file_list" UtilTransformRequestParamsCallTypeAcreateFile UtilTransformRequestParamsCallType = "acreate_file" UtilTransformRequestParamsCallTypeCreateFile UtilTransformRequestParamsCallType = "create_file" UtilTransformRequestParamsCallTypeAfileContent UtilTransformRequestParamsCallType = "afile_content" UtilTransformRequestParamsCallTypeFileContent UtilTransformRequestParamsCallType = "file_content" UtilTransformRequestParamsCallTypeCreateFineTuningJob UtilTransformRequestParamsCallType = "create_fine_tuning_job" UtilTransformRequestParamsCallTypeAcreateFineTuningJob UtilTransformRequestParamsCallType = "acreate_fine_tuning_job" UtilTransformRequestParamsCallTypeCreateVideo UtilTransformRequestParamsCallType = "create_video" UtilTransformRequestParamsCallTypeAcreateVideo UtilTransformRequestParamsCallType = "acreate_video" UtilTransformRequestParamsCallTypeAvideoRetrieve UtilTransformRequestParamsCallType = "avideo_retrieve" UtilTransformRequestParamsCallTypeVideoRetrieve UtilTransformRequestParamsCallType = "video_retrieve" UtilTransformRequestParamsCallTypeAvideoContent UtilTransformRequestParamsCallType = "avideo_content" UtilTransformRequestParamsCallTypeVideoContent UtilTransformRequestParamsCallType = "video_content" UtilTransformRequestParamsCallTypeVideoRemix UtilTransformRequestParamsCallType = "video_remix" UtilTransformRequestParamsCallTypeAvideoRemix UtilTransformRequestParamsCallType = "avideo_remix" UtilTransformRequestParamsCallTypeVideoList UtilTransformRequestParamsCallType = "video_list" UtilTransformRequestParamsCallTypeAvideoList UtilTransformRequestParamsCallType = "avideo_list" UtilTransformRequestParamsCallTypeVideoRetrieveJob UtilTransformRequestParamsCallType = "video_retrieve_job" UtilTransformRequestParamsCallTypeAvideoRetrieveJob UtilTransformRequestParamsCallType = "avideo_retrieve_job" UtilTransformRequestParamsCallTypeVideoDelete UtilTransformRequestParamsCallType = "video_delete" UtilTransformRequestParamsCallTypeAvideoDelete UtilTransformRequestParamsCallType = "avideo_delete" UtilTransformRequestParamsCallTypeVectorStoreFileCreate UtilTransformRequestParamsCallType = "vector_store_file_create" UtilTransformRequestParamsCallTypeAvectorStoreFileCreate UtilTransformRequestParamsCallType = "avector_store_file_create" UtilTransformRequestParamsCallTypeVectorStoreFileList UtilTransformRequestParamsCallType = "vector_store_file_list" UtilTransformRequestParamsCallTypeAvectorStoreFileList UtilTransformRequestParamsCallType = "avector_store_file_list" UtilTransformRequestParamsCallTypeVectorStoreFileRetrieve UtilTransformRequestParamsCallType = "vector_store_file_retrieve" UtilTransformRequestParamsCallTypeAvectorStoreFileRetrieve UtilTransformRequestParamsCallType = "avector_store_file_retrieve" UtilTransformRequestParamsCallTypeVectorStoreFileContent UtilTransformRequestParamsCallType = "vector_store_file_content" UtilTransformRequestParamsCallTypeAvectorStoreFileContent UtilTransformRequestParamsCallType = "avector_store_file_content" UtilTransformRequestParamsCallTypeVectorStoreFileUpdate UtilTransformRequestParamsCallType = "vector_store_file_update" UtilTransformRequestParamsCallTypeAvectorStoreFileUpdate UtilTransformRequestParamsCallType = "avector_store_file_update" UtilTransformRequestParamsCallTypeVectorStoreFileDelete UtilTransformRequestParamsCallType = "vector_store_file_delete" UtilTransformRequestParamsCallTypeAvectorStoreFileDelete UtilTransformRequestParamsCallType = "avector_store_file_delete" UtilTransformRequestParamsCallTypeVectorStoreCreate UtilTransformRequestParamsCallType = "vector_store_create" UtilTransformRequestParamsCallTypeAvectorStoreCreate UtilTransformRequestParamsCallType = "avector_store_create" UtilTransformRequestParamsCallTypeVectorStoreSearch UtilTransformRequestParamsCallType = "vector_store_search" UtilTransformRequestParamsCallTypeAvectorStoreSearch UtilTransformRequestParamsCallType = "avector_store_search" UtilTransformRequestParamsCallTypeCreateContainer UtilTransformRequestParamsCallType = "create_container" UtilTransformRequestParamsCallTypeAcreateContainer UtilTransformRequestParamsCallType = "acreate_container" UtilTransformRequestParamsCallTypeListContainers UtilTransformRequestParamsCallType = "list_containers" UtilTransformRequestParamsCallTypeAlistContainers UtilTransformRequestParamsCallType = "alist_containers" UtilTransformRequestParamsCallTypeRetrieveContainer UtilTransformRequestParamsCallType = "retrieve_container" UtilTransformRequestParamsCallTypeAretrieveContainer UtilTransformRequestParamsCallType = "aretrieve_container" UtilTransformRequestParamsCallTypeDeleteContainer UtilTransformRequestParamsCallType = "delete_container" UtilTransformRequestParamsCallTypeAdeleteContainer UtilTransformRequestParamsCallType = "adelete_container" UtilTransformRequestParamsCallTypeListContainerFiles UtilTransformRequestParamsCallType = "list_container_files" UtilTransformRequestParamsCallTypeAlistContainerFiles UtilTransformRequestParamsCallType = "alist_container_files" UtilTransformRequestParamsCallTypeUploadContainerFile UtilTransformRequestParamsCallType = "upload_container_file" UtilTransformRequestParamsCallTypeAuploadContainerFile UtilTransformRequestParamsCallType = "aupload_container_file" UtilTransformRequestParamsCallTypeAcancelFineTuningJob UtilTransformRequestParamsCallType = "acancel_fine_tuning_job" UtilTransformRequestParamsCallTypeCancelFineTuningJob UtilTransformRequestParamsCallType = "cancel_fine_tuning_job" UtilTransformRequestParamsCallTypeAlistFineTuningJobs UtilTransformRequestParamsCallType = "alist_fine_tuning_jobs" UtilTransformRequestParamsCallTypeListFineTuningJobs UtilTransformRequestParamsCallType = "list_fine_tuning_jobs" UtilTransformRequestParamsCallTypeAretrieveFineTuningJob UtilTransformRequestParamsCallType = "aretrieve_fine_tuning_job" UtilTransformRequestParamsCallTypeRetrieveFineTuningJob UtilTransformRequestParamsCallType = "retrieve_fine_tuning_job" UtilTransformRequestParamsCallTypeResponses UtilTransformRequestParamsCallType = "responses" UtilTransformRequestParamsCallTypeAresponses UtilTransformRequestParamsCallType = "aresponses" UtilTransformRequestParamsCallTypeAlistInputItems UtilTransformRequestParamsCallType = "alist_input_items" UtilTransformRequestParamsCallTypeLlmPassthroughRoute UtilTransformRequestParamsCallType = "llm_passthrough_route" UtilTransformRequestParamsCallTypeAllmPassthroughRoute UtilTransformRequestParamsCallType = "allm_passthrough_route" UtilTransformRequestParamsCallTypeGenerateContent UtilTransformRequestParamsCallType = "generate_content" UtilTransformRequestParamsCallTypeAgenerateContent UtilTransformRequestParamsCallType = "agenerate_content" UtilTransformRequestParamsCallTypeGenerateContentStream UtilTransformRequestParamsCallType = "generate_content_stream" UtilTransformRequestParamsCallTypeAgenerateContentStream UtilTransformRequestParamsCallType = "agenerate_content_stream" UtilTransformRequestParamsCallTypeOcr UtilTransformRequestParamsCallType = "ocr" UtilTransformRequestParamsCallTypeAocr UtilTransformRequestParamsCallType = "aocr" UtilTransformRequestParamsCallTypeCallMcpTool UtilTransformRequestParamsCallType = "call_mcp_tool" UtilTransformRequestParamsCallTypeAsendMessage UtilTransformRequestParamsCallType = "asend_message" UtilTransformRequestParamsCallTypeSendMessage UtilTransformRequestParamsCallType = "send_message" UtilTransformRequestParamsCallTypeAcreateSkill UtilTransformRequestParamsCallType = "acreate_skill" )
func (UtilTransformRequestParamsCallType) IsKnown ¶
func (r UtilTransformRequestParamsCallType) IsKnown() bool
type UtilTransformRequestResponse ¶
type UtilTransformRequestResponse struct {
Error string `json:"error,nullable"`
RawRequestAPIBase string `json:"raw_request_api_base,nullable"`
RawRequestBody map[string]interface{} `json:"raw_request_body,nullable"`
RawRequestHeaders map[string]interface{} `json:"raw_request_headers,nullable"`
JSON utilTransformRequestResponseJSON `json:"-"`
}
func (*UtilTransformRequestResponse) UnmarshalJSON ¶
func (r *UtilTransformRequestResponse) UnmarshalJSON(data []byte) (err error)
type VertexAIDeleteResponse ¶
type VertexAIDeleteResponse = interface{}
type VertexAIGetResponse ¶
type VertexAIGetResponse = interface{}
type VertexAINewResponse ¶
type VertexAINewResponse = interface{}
type VertexAIPatchResponse ¶
type VertexAIPatchResponse = interface{}
type VertexAIService ¶
type VertexAIService struct {
Options []option.RequestOption
}
VertexAIService contains methods and other services that help with interacting with the Hanzo API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVertexAIService method instead.
func NewVertexAIService ¶
func NewVertexAIService(opts ...option.RequestOption) (r *VertexAIService)
NewVertexAIService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VertexAIService) Delete ¶
func (r *VertexAIService) Delete(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *VertexAIDeleteResponse, err error)
Call LiteLLM proxy via Vertex AI SDK.
func (*VertexAIService) Get ¶
func (r *VertexAIService) Get(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *VertexAIGetResponse, err error)
Call LiteLLM proxy via Vertex AI SDK.
func (*VertexAIService) New ¶
func (r *VertexAIService) New(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *VertexAINewResponse, err error)
Call LiteLLM proxy via Vertex AI SDK.
func (*VertexAIService) Patch ¶
func (r *VertexAIService) Patch(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *VertexAIPatchResponse, err error)
Call LiteLLM proxy via Vertex AI SDK.
func (*VertexAIService) Update ¶
func (r *VertexAIService) Update(ctx context.Context, endpoint string, opts ...option.RequestOption) (res *VertexAIUpdateResponse, err error)
Call LiteLLM proxy via Vertex AI SDK.
type VertexAIUpdateResponse ¶
type VertexAIUpdateResponse = interface{}
Source Files
¶
- active.go
- add.go
- aliases.go
- anthropic.go
- assemblyai.go
- assistant.go
- audio.go
- audiospeech.go
- audiotranscription.go
- azure.go
- batch.go
- batchcancel.go
- bedrock.go
- budget.go
- cache.go
- cacheredi.go
- chat.go
- chatcompletion.go
- client.go
- cohere.go
- completion.go
- config.go
- configpassthroughendpoint.go
- credential.go
- customer.go
- delete.go
- embedding.go
- engine.go
- enginechat.go
- euassemblyai.go
- field.go
- file.go
- filecontent.go
- finetuning.go
- finetuningjob.go
- finetuningjobcancel.go
- gemini.go
- global.go
- globalspend.go
- guardrail.go
- hanzoai.go
- health.go
- image.go
- imagegeneration.go
- key.go
- keyregenerate.go
- langfuse.go
- model.go
- modelgroup.go
- modelinfo.go
- modelupdate.go
- moderation.go
- openai.go
- openaideployment.go
- openaideploymentchat.go
- organization.go
- organizationinfo.go
- provider.go
- rerank.go
- response.go
- responseinputitem.go
- route.go
- setting.go
- spend.go
- team.go
- teamcallback.go
- teammodel.go
- test.go
- thread.go
- threadmessage.go
- threadrun.go
- user.go
- util.go
- vertexai.go