Documentation
¶
Index ¶
- Constants
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func NewFile(rdr io.Reader, filename string, contentType string) file
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type AgentConfig
- type AgentConfigParam
- type AgentConfigToolChoice
- type AgentConfigToolConfig
- type AgentConfigToolConfigParam
- type AgentConfigToolPromptFormat
- type AgentConfigToolgroupAgentToolGroupWithArgs
- type AgentConfigToolgroupAgentToolGroupWithArgsArgUnion
- type AgentConfigToolgroupAgentToolGroupWithArgsArgUnionParam
- type AgentConfigToolgroupAgentToolGroupWithArgsParam
- type AgentConfigToolgroupUnion
- type AgentConfigToolgroupUnionParam
- type AgentGetResponse
- type AgentListParams
- type AgentListResponse
- type AgentListResponseDataUnion
- func (u AgentListResponseDataUnion) AsAnyArray() (v []any)
- func (u AgentListResponseDataUnion) AsBool() (v bool)
- func (u AgentListResponseDataUnion) AsFloat() (v float64)
- func (u AgentListResponseDataUnion) AsString() (v string)
- func (u AgentListResponseDataUnion) RawJSON() string
- func (r *AgentListResponseDataUnion) UnmarshalJSON(data []byte) error
- type AgentNewParams
- type AgentNewResponse
- type AgentService
- func (r *AgentService) Delete(ctx context.Context, agentID string, opts ...option.RequestOption) (err error)
- func (r *AgentService) Get(ctx context.Context, agentID string, opts ...option.RequestOption) (res *AgentGetResponse, err error)
- func (r *AgentService) List(ctx context.Context, query AgentListParams, opts ...option.RequestOption) (res *AgentListResponse, err error)
- func (r *AgentService) New(ctx context.Context, body AgentNewParams, opts ...option.RequestOption) (res *AgentNewResponse, err error)
- type AgentSessionDeleteParams
- type AgentSessionGetParams
- type AgentSessionListParams
- type AgentSessionListResponse
- type AgentSessionListResponseDataUnion
- func (u AgentSessionListResponseDataUnion) AsAnyArray() (v []any)
- func (u AgentSessionListResponseDataUnion) AsBool() (v bool)
- func (u AgentSessionListResponseDataUnion) AsFloat() (v float64)
- func (u AgentSessionListResponseDataUnion) AsString() (v string)
- func (u AgentSessionListResponseDataUnion) RawJSON() string
- func (r *AgentSessionListResponseDataUnion) UnmarshalJSON(data []byte) error
- type AgentSessionNewParams
- type AgentSessionNewResponse
- type AgentSessionService
- func (r *AgentSessionService) Delete(ctx context.Context, sessionID string, body AgentSessionDeleteParams, ...) (err error)
- func (r *AgentSessionService) Get(ctx context.Context, sessionID string, params AgentSessionGetParams, ...) (res *Session, err error)
- func (r *AgentSessionService) List(ctx context.Context, agentID string, query AgentSessionListParams, ...) (res *AgentSessionListResponse, err error)
- func (r *AgentSessionService) New(ctx context.Context, agentID string, body AgentSessionNewParams, ...) (res *AgentSessionNewResponse, err error)
- type AgentStepGetParams
- type AgentStepGetResponse
- type AgentStepGetResponseStepUnion
- func (u AgentStepGetResponseStepUnion) AsAny() anyAgentStepGetResponseStep
- func (u AgentStepGetResponseStepUnion) AsInference() (v InferenceStep)
- func (u AgentStepGetResponseStepUnion) AsMemoryRetrieval() (v MemoryRetrievalStep)
- func (u AgentStepGetResponseStepUnion) AsShieldCall() (v ShieldCallStep)
- func (u AgentStepGetResponseStepUnion) AsToolExecution() (v ToolExecutionStep)
- func (u AgentStepGetResponseStepUnion) RawJSON() string
- func (r *AgentStepGetResponseStepUnion) UnmarshalJSON(data []byte) error
- type AgentStepService
- type AgentTurnGetParams
- type AgentTurnNewParams
- type AgentTurnNewParamsDocument
- type AgentTurnNewParamsDocumentContentImageContentItem
- type AgentTurnNewParamsDocumentContentImageContentItemImage
- type AgentTurnNewParamsDocumentContentImageContentItemImageURL
- type AgentTurnNewParamsDocumentContentTextContentItem
- type AgentTurnNewParamsDocumentContentURL
- type AgentTurnNewParamsDocumentContentUnion
- func (u AgentTurnNewParamsDocumentContentUnion) GetImage() *AgentTurnNewParamsDocumentContentImageContentItemImage
- func (u AgentTurnNewParamsDocumentContentUnion) GetText() *string
- func (u AgentTurnNewParamsDocumentContentUnion) GetType() *string
- func (u AgentTurnNewParamsDocumentContentUnion) GetUri() *string
- func (u AgentTurnNewParamsDocumentContentUnion) MarshalJSON() ([]byte, error)
- func (u *AgentTurnNewParamsDocumentContentUnion) UnmarshalJSON(data []byte) error
- type AgentTurnNewParamsMessageUnion
- func (u AgentTurnNewParamsMessageUnion) GetCallID() *string
- func (u AgentTurnNewParamsMessageUnion) GetContent() *shared.InterleavedContentUnionParam
- func (u AgentTurnNewParamsMessageUnion) GetContext() *shared.InterleavedContentUnionParam
- func (u AgentTurnNewParamsMessageUnion) GetRole() *string
- func (u AgentTurnNewParamsMessageUnion) MarshalJSON() ([]byte, error)
- func (u *AgentTurnNewParamsMessageUnion) UnmarshalJSON(data []byte) error
- type AgentTurnNewParamsToolConfig
- type AgentTurnNewParamsToolgroupAgentToolGroupWithArgs
- type AgentTurnNewParamsToolgroupAgentToolGroupWithArgsArgUnion
- type AgentTurnNewParamsToolgroupUnion
- type AgentTurnResponseStreamChunk
- type AgentTurnResumeParams
- type AgentTurnService
- func (r *AgentTurnService) Get(ctx context.Context, turnID string, query AgentTurnGetParams, ...) (res *Turn, err error)
- func (r *AgentTurnService) New(ctx context.Context, sessionID string, params AgentTurnNewParams, ...) (res *Turn, err error)
- func (r *AgentTurnService) NewStreaming(ctx context.Context, sessionID string, params AgentTurnNewParams, ...) (stream *ssestream.Stream[AgentTurnResponseStreamChunk])
- func (r *AgentTurnService) Resume(ctx context.Context, turnID string, params AgentTurnResumeParams, ...) (res *Turn, err error)
- func (r *AgentTurnService) ResumeStreaming(ctx context.Context, turnID string, params AgentTurnResumeParams, ...) (stream *ssestream.Stream[AgentTurnResponseStreamChunk])
- type AlgorithmConfigLoRaParam
- type AlgorithmConfigQatParam
- type AlgorithmConfigUnionParam
- func (u AlgorithmConfigUnionParam) GetAlpha() *int64
- func (u AlgorithmConfigUnionParam) GetApplyLoraToMlp() *bool
- func (u AlgorithmConfigUnionParam) GetApplyLoraToOutput() *bool
- func (u AlgorithmConfigUnionParam) GetGroupSize() *int64
- func (u AlgorithmConfigUnionParam) GetLoraAttnModules() []string
- func (u AlgorithmConfigUnionParam) GetQuantizeBase() *bool
- func (u AlgorithmConfigUnionParam) GetQuantizerName() *string
- func (u AlgorithmConfigUnionParam) GetRank() *int64
- func (u AlgorithmConfigUnionParam) GetType() *string
- func (u AlgorithmConfigUnionParam) GetUseDora() *bool
- func (u AlgorithmConfigUnionParam) MarshalJSON() ([]byte, error)
- func (u *AlgorithmConfigUnionParam) UnmarshalJSON(data []byte) error
- type BatchCompletion
- type Benchmark
- type BenchmarkConfigParam
- type BenchmarkMetadataUnion
- func (u BenchmarkMetadataUnion) AsAnyArray() (v []any)
- func (u BenchmarkMetadataUnion) AsBool() (v bool)
- func (u BenchmarkMetadataUnion) AsFloat() (v float64)
- func (u BenchmarkMetadataUnion) AsString() (v string)
- func (u BenchmarkMetadataUnion) RawJSON() string
- func (r *BenchmarkMetadataUnion) UnmarshalJSON(data []byte) error
- type BenchmarkRegisterParams
- type BenchmarkRegisterParamsMetadataUnion
- type BenchmarkService
- func (r *BenchmarkService) Get(ctx context.Context, benchmarkID string, opts ...option.RequestOption) (res *Benchmark, err error)
- func (r *BenchmarkService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Benchmark, err error)
- func (r *BenchmarkService) Register(ctx context.Context, body BenchmarkRegisterParams, ...) (err error)
- type ChatCompletionChunk
- type ChatCompletionChunkChoice
- type ChatCompletionChunkChoiceDelta
- type ChatCompletionChunkChoiceDeltaToolCall
- type ChatCompletionChunkChoiceDeltaToolCallFunction
- type ChatCompletionChunkChoiceLogprobs
- type ChatCompletionChunkChoiceLogprobsContent
- type ChatCompletionChunkChoiceLogprobsContentTopLogprob
- type ChatCompletionChunkChoiceLogprobsRefusal
- type ChatCompletionChunkChoiceLogprobsRefusalTopLogprob
- type ChatCompletionGetResponse
- type ChatCompletionGetResponseChoice
- type ChatCompletionGetResponseChoiceLogprobs
- type ChatCompletionGetResponseChoiceLogprobsContent
- type ChatCompletionGetResponseChoiceLogprobsContentTopLogprob
- type ChatCompletionGetResponseChoiceLogprobsRefusal
- type ChatCompletionGetResponseChoiceLogprobsRefusalTopLogprob
- type ChatCompletionGetResponseChoiceMessageAssistant
- type ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem
- type ChatCompletionGetResponseChoiceMessageAssistantContentUnion
- func (u ChatCompletionGetResponseChoiceMessageAssistantContentUnion) AsChatCompletionGetResponseChoiceMessageAssistantContentArray() (v []ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem)
- func (u ChatCompletionGetResponseChoiceMessageAssistantContentUnion) AsString() (v string)
- func (u ChatCompletionGetResponseChoiceMessageAssistantContentUnion) RawJSON() string
- func (r *ChatCompletionGetResponseChoiceMessageAssistantContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseChoiceMessageAssistantToolCall
- type ChatCompletionGetResponseChoiceMessageAssistantToolCallFunction
- type ChatCompletionGetResponseChoiceMessageDeveloper
- type ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem
- type ChatCompletionGetResponseChoiceMessageDeveloperContentUnion
- func (u ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) AsChatCompletionGetResponseChoiceMessageDeveloperContentArray() (v []ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem)
- func (u ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) AsString() (v string)
- func (u ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) RawJSON() string
- func (r *ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseChoiceMessageSystem
- type ChatCompletionGetResponseChoiceMessageSystemContentArrayItem
- type ChatCompletionGetResponseChoiceMessageSystemContentUnion
- func (u ChatCompletionGetResponseChoiceMessageSystemContentUnion) AsChatCompletionGetResponseChoiceMessageSystemContentArray() (v []ChatCompletionGetResponseChoiceMessageSystemContentArrayItem)
- func (u ChatCompletionGetResponseChoiceMessageSystemContentUnion) AsString() (v string)
- func (u ChatCompletionGetResponseChoiceMessageSystemContentUnion) RawJSON() string
- func (r *ChatCompletionGetResponseChoiceMessageSystemContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseChoiceMessageTool
- type ChatCompletionGetResponseChoiceMessageToolContentArrayItem
- type ChatCompletionGetResponseChoiceMessageToolContentUnion
- func (u ChatCompletionGetResponseChoiceMessageToolContentUnion) AsChatCompletionGetResponseChoiceMessageToolContentArray() (v []ChatCompletionGetResponseChoiceMessageToolContentArrayItem)
- func (u ChatCompletionGetResponseChoiceMessageToolContentUnion) AsString() (v string)
- func (u ChatCompletionGetResponseChoiceMessageToolContentUnion) RawJSON() string
- func (r *ChatCompletionGetResponseChoiceMessageToolContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseChoiceMessageUnion
- func (u ChatCompletionGetResponseChoiceMessageUnion) AsAny() anyChatCompletionGetResponseChoiceMessage
- func (u ChatCompletionGetResponseChoiceMessageUnion) AsAssistant() (v ChatCompletionGetResponseChoiceMessageAssistant)
- func (u ChatCompletionGetResponseChoiceMessageUnion) AsDeveloper() (v ChatCompletionGetResponseChoiceMessageDeveloper)
- func (u ChatCompletionGetResponseChoiceMessageUnion) AsSystem() (v ChatCompletionGetResponseChoiceMessageSystem)
- func (u ChatCompletionGetResponseChoiceMessageUnion) AsTool() (v ChatCompletionGetResponseChoiceMessageTool)
- func (u ChatCompletionGetResponseChoiceMessageUnion) AsUser() (v ChatCompletionGetResponseChoiceMessageUser)
- func (u ChatCompletionGetResponseChoiceMessageUnion) RawJSON() string
- func (r *ChatCompletionGetResponseChoiceMessageUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseChoiceMessageUnionContent
- type ChatCompletionGetResponseChoiceMessageUser
- type ChatCompletionGetResponseChoiceMessageUserContentArrayItemFile
- type ChatCompletionGetResponseChoiceMessageUserContentArrayItemFileFile
- type ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURL
- type ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURLImageURL
- type ChatCompletionGetResponseChoiceMessageUserContentArrayItemText
- type ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion
- func (u ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) AsAny() anyChatCompletionGetResponseChoiceMessageUserContentArrayItem
- func (u ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) AsFile() (v ChatCompletionGetResponseChoiceMessageUserContentArrayItemFile)
- func (u ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) AsImageURL() (v ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURL)
- func (u ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) AsText() (v ChatCompletionGetResponseChoiceMessageUserContentArrayItemText)
- func (u ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) RawJSON() string
- func (r *ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseChoiceMessageUserContentUnion
- func (u ChatCompletionGetResponseChoiceMessageUserContentUnion) AsChatCompletionGetResponseChoiceMessageUserContentArray() (v []ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion)
- func (u ChatCompletionGetResponseChoiceMessageUserContentUnion) AsString() (v string)
- func (u ChatCompletionGetResponseChoiceMessageUserContentUnion) RawJSON() string
- func (r *ChatCompletionGetResponseChoiceMessageUserContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseInputMessageAssistant
- type ChatCompletionGetResponseInputMessageAssistantContentArrayItem
- type ChatCompletionGetResponseInputMessageAssistantContentUnion
- func (u ChatCompletionGetResponseInputMessageAssistantContentUnion) AsChatCompletionGetResponseInputMessageAssistantContentArray() (v []ChatCompletionGetResponseInputMessageAssistantContentArrayItem)
- func (u ChatCompletionGetResponseInputMessageAssistantContentUnion) AsString() (v string)
- func (u ChatCompletionGetResponseInputMessageAssistantContentUnion) RawJSON() string
- func (r *ChatCompletionGetResponseInputMessageAssistantContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseInputMessageAssistantToolCall
- type ChatCompletionGetResponseInputMessageAssistantToolCallFunction
- type ChatCompletionGetResponseInputMessageDeveloper
- type ChatCompletionGetResponseInputMessageDeveloperContentArrayItem
- type ChatCompletionGetResponseInputMessageDeveloperContentUnion
- func (u ChatCompletionGetResponseInputMessageDeveloperContentUnion) AsChatCompletionGetResponseInputMessageDeveloperContentArray() (v []ChatCompletionGetResponseInputMessageDeveloperContentArrayItem)
- func (u ChatCompletionGetResponseInputMessageDeveloperContentUnion) AsString() (v string)
- func (u ChatCompletionGetResponseInputMessageDeveloperContentUnion) RawJSON() string
- func (r *ChatCompletionGetResponseInputMessageDeveloperContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseInputMessageSystem
- type ChatCompletionGetResponseInputMessageSystemContentArrayItem
- type ChatCompletionGetResponseInputMessageSystemContentUnion
- func (u ChatCompletionGetResponseInputMessageSystemContentUnion) AsChatCompletionGetResponseInputMessageSystemContentArray() (v []ChatCompletionGetResponseInputMessageSystemContentArrayItem)
- func (u ChatCompletionGetResponseInputMessageSystemContentUnion) AsString() (v string)
- func (u ChatCompletionGetResponseInputMessageSystemContentUnion) RawJSON() string
- func (r *ChatCompletionGetResponseInputMessageSystemContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseInputMessageTool
- type ChatCompletionGetResponseInputMessageToolContentArrayItem
- type ChatCompletionGetResponseInputMessageToolContentUnion
- func (u ChatCompletionGetResponseInputMessageToolContentUnion) AsChatCompletionGetResponseInputMessageToolContentArray() (v []ChatCompletionGetResponseInputMessageToolContentArrayItem)
- func (u ChatCompletionGetResponseInputMessageToolContentUnion) AsString() (v string)
- func (u ChatCompletionGetResponseInputMessageToolContentUnion) RawJSON() string
- func (r *ChatCompletionGetResponseInputMessageToolContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseInputMessageUnion
- func (u ChatCompletionGetResponseInputMessageUnion) AsAny() anyChatCompletionGetResponseInputMessage
- func (u ChatCompletionGetResponseInputMessageUnion) AsAssistant() (v ChatCompletionGetResponseInputMessageAssistant)
- func (u ChatCompletionGetResponseInputMessageUnion) AsDeveloper() (v ChatCompletionGetResponseInputMessageDeveloper)
- func (u ChatCompletionGetResponseInputMessageUnion) AsSystem() (v ChatCompletionGetResponseInputMessageSystem)
- func (u ChatCompletionGetResponseInputMessageUnion) AsTool() (v ChatCompletionGetResponseInputMessageTool)
- func (u ChatCompletionGetResponseInputMessageUnion) AsUser() (v ChatCompletionGetResponseInputMessageUser)
- func (u ChatCompletionGetResponseInputMessageUnion) RawJSON() string
- func (r *ChatCompletionGetResponseInputMessageUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseInputMessageUnionContent
- type ChatCompletionGetResponseInputMessageUser
- type ChatCompletionGetResponseInputMessageUserContentArrayItemFile
- type ChatCompletionGetResponseInputMessageUserContentArrayItemFileFile
- type ChatCompletionGetResponseInputMessageUserContentArrayItemImageURL
- type ChatCompletionGetResponseInputMessageUserContentArrayItemImageURLImageURL
- type ChatCompletionGetResponseInputMessageUserContentArrayItemText
- type ChatCompletionGetResponseInputMessageUserContentArrayItemUnion
- func (u ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) AsAny() anyChatCompletionGetResponseInputMessageUserContentArrayItem
- func (u ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) AsFile() (v ChatCompletionGetResponseInputMessageUserContentArrayItemFile)
- func (u ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) AsImageURL() (v ChatCompletionGetResponseInputMessageUserContentArrayItemImageURL)
- func (u ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) AsText() (v ChatCompletionGetResponseInputMessageUserContentArrayItemText)
- func (u ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) RawJSON() string
- func (r *ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionGetResponseInputMessageUserContentUnion
- func (u ChatCompletionGetResponseInputMessageUserContentUnion) AsChatCompletionGetResponseInputMessageUserContentArray() (v []ChatCompletionGetResponseInputMessageUserContentArrayItemUnion)
- func (u ChatCompletionGetResponseInputMessageUserContentUnion) AsString() (v string)
- func (u ChatCompletionGetResponseInputMessageUserContentUnion) RawJSON() string
- func (r *ChatCompletionGetResponseInputMessageUserContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListParams
- type ChatCompletionListParamsOrder
- type ChatCompletionListResponse
- type ChatCompletionListResponseChoice
- type ChatCompletionListResponseChoiceLogprobs
- type ChatCompletionListResponseChoiceLogprobsContent
- type ChatCompletionListResponseChoiceLogprobsContentTopLogprob
- type ChatCompletionListResponseChoiceLogprobsRefusal
- type ChatCompletionListResponseChoiceLogprobsRefusalTopLogprob
- type ChatCompletionListResponseChoiceMessageAssistant
- type ChatCompletionListResponseChoiceMessageAssistantContentArrayItem
- type ChatCompletionListResponseChoiceMessageAssistantContentUnion
- func (u ChatCompletionListResponseChoiceMessageAssistantContentUnion) AsChatCompletionListResponseChoiceMessageAssistantContentArray() (v []ChatCompletionListResponseChoiceMessageAssistantContentArrayItem)
- func (u ChatCompletionListResponseChoiceMessageAssistantContentUnion) AsString() (v string)
- func (u ChatCompletionListResponseChoiceMessageAssistantContentUnion) RawJSON() string
- func (r *ChatCompletionListResponseChoiceMessageAssistantContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseChoiceMessageAssistantToolCall
- type ChatCompletionListResponseChoiceMessageAssistantToolCallFunction
- type ChatCompletionListResponseChoiceMessageDeveloper
- type ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem
- type ChatCompletionListResponseChoiceMessageDeveloperContentUnion
- func (u ChatCompletionListResponseChoiceMessageDeveloperContentUnion) AsChatCompletionListResponseChoiceMessageDeveloperContentArray() (v []ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem)
- func (u ChatCompletionListResponseChoiceMessageDeveloperContentUnion) AsString() (v string)
- func (u ChatCompletionListResponseChoiceMessageDeveloperContentUnion) RawJSON() string
- func (r *ChatCompletionListResponseChoiceMessageDeveloperContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseChoiceMessageSystem
- type ChatCompletionListResponseChoiceMessageSystemContentArrayItem
- type ChatCompletionListResponseChoiceMessageSystemContentUnion
- func (u ChatCompletionListResponseChoiceMessageSystemContentUnion) AsChatCompletionListResponseChoiceMessageSystemContentArray() (v []ChatCompletionListResponseChoiceMessageSystemContentArrayItem)
- func (u ChatCompletionListResponseChoiceMessageSystemContentUnion) AsString() (v string)
- func (u ChatCompletionListResponseChoiceMessageSystemContentUnion) RawJSON() string
- func (r *ChatCompletionListResponseChoiceMessageSystemContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseChoiceMessageTool
- type ChatCompletionListResponseChoiceMessageToolContentArrayItem
- type ChatCompletionListResponseChoiceMessageToolContentUnion
- func (u ChatCompletionListResponseChoiceMessageToolContentUnion) AsChatCompletionListResponseChoiceMessageToolContentArray() (v []ChatCompletionListResponseChoiceMessageToolContentArrayItem)
- func (u ChatCompletionListResponseChoiceMessageToolContentUnion) AsString() (v string)
- func (u ChatCompletionListResponseChoiceMessageToolContentUnion) RawJSON() string
- func (r *ChatCompletionListResponseChoiceMessageToolContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseChoiceMessageUnion
- func (u ChatCompletionListResponseChoiceMessageUnion) AsAny() anyChatCompletionListResponseChoiceMessage
- func (u ChatCompletionListResponseChoiceMessageUnion) AsAssistant() (v ChatCompletionListResponseChoiceMessageAssistant)
- func (u ChatCompletionListResponseChoiceMessageUnion) AsDeveloper() (v ChatCompletionListResponseChoiceMessageDeveloper)
- func (u ChatCompletionListResponseChoiceMessageUnion) AsSystem() (v ChatCompletionListResponseChoiceMessageSystem)
- func (u ChatCompletionListResponseChoiceMessageUnion) AsTool() (v ChatCompletionListResponseChoiceMessageTool)
- func (u ChatCompletionListResponseChoiceMessageUnion) AsUser() (v ChatCompletionListResponseChoiceMessageUser)
- func (u ChatCompletionListResponseChoiceMessageUnion) RawJSON() string
- func (r *ChatCompletionListResponseChoiceMessageUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseChoiceMessageUnionContent
- type ChatCompletionListResponseChoiceMessageUser
- type ChatCompletionListResponseChoiceMessageUserContentArrayItemFile
- type ChatCompletionListResponseChoiceMessageUserContentArrayItemFileFile
- type ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURL
- type ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURLImageURL
- type ChatCompletionListResponseChoiceMessageUserContentArrayItemText
- type ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion
- func (u ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) AsAny() anyChatCompletionListResponseChoiceMessageUserContentArrayItem
- func (u ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) AsFile() (v ChatCompletionListResponseChoiceMessageUserContentArrayItemFile)
- func (u ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) AsImageURL() (v ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURL)
- func (u ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) AsText() (v ChatCompletionListResponseChoiceMessageUserContentArrayItemText)
- func (u ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) RawJSON() string
- func (r *ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseChoiceMessageUserContentUnion
- func (u ChatCompletionListResponseChoiceMessageUserContentUnion) AsChatCompletionListResponseChoiceMessageUserContentArray() (v []ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion)
- func (u ChatCompletionListResponseChoiceMessageUserContentUnion) AsString() (v string)
- func (u ChatCompletionListResponseChoiceMessageUserContentUnion) RawJSON() string
- func (r *ChatCompletionListResponseChoiceMessageUserContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseInputMessageAssistant
- type ChatCompletionListResponseInputMessageAssistantContentArrayItem
- type ChatCompletionListResponseInputMessageAssistantContentUnion
- func (u ChatCompletionListResponseInputMessageAssistantContentUnion) AsChatCompletionListResponseInputMessageAssistantContentArray() (v []ChatCompletionListResponseInputMessageAssistantContentArrayItem)
- func (u ChatCompletionListResponseInputMessageAssistantContentUnion) AsString() (v string)
- func (u ChatCompletionListResponseInputMessageAssistantContentUnion) RawJSON() string
- func (r *ChatCompletionListResponseInputMessageAssistantContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseInputMessageAssistantToolCall
- type ChatCompletionListResponseInputMessageAssistantToolCallFunction
- type ChatCompletionListResponseInputMessageDeveloper
- type ChatCompletionListResponseInputMessageDeveloperContentArrayItem
- type ChatCompletionListResponseInputMessageDeveloperContentUnion
- func (u ChatCompletionListResponseInputMessageDeveloperContentUnion) AsChatCompletionListResponseInputMessageDeveloperContentArray() (v []ChatCompletionListResponseInputMessageDeveloperContentArrayItem)
- func (u ChatCompletionListResponseInputMessageDeveloperContentUnion) AsString() (v string)
- func (u ChatCompletionListResponseInputMessageDeveloperContentUnion) RawJSON() string
- func (r *ChatCompletionListResponseInputMessageDeveloperContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseInputMessageSystem
- type ChatCompletionListResponseInputMessageSystemContentArrayItem
- type ChatCompletionListResponseInputMessageSystemContentUnion
- func (u ChatCompletionListResponseInputMessageSystemContentUnion) AsChatCompletionListResponseInputMessageSystemContentArray() (v []ChatCompletionListResponseInputMessageSystemContentArrayItem)
- func (u ChatCompletionListResponseInputMessageSystemContentUnion) AsString() (v string)
- func (u ChatCompletionListResponseInputMessageSystemContentUnion) RawJSON() string
- func (r *ChatCompletionListResponseInputMessageSystemContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseInputMessageTool
- type ChatCompletionListResponseInputMessageToolContentArrayItem
- type ChatCompletionListResponseInputMessageToolContentUnion
- func (u ChatCompletionListResponseInputMessageToolContentUnion) AsChatCompletionListResponseInputMessageToolContentArray() (v []ChatCompletionListResponseInputMessageToolContentArrayItem)
- func (u ChatCompletionListResponseInputMessageToolContentUnion) AsString() (v string)
- func (u ChatCompletionListResponseInputMessageToolContentUnion) RawJSON() string
- func (r *ChatCompletionListResponseInputMessageToolContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseInputMessageUnion
- func (u ChatCompletionListResponseInputMessageUnion) AsAny() anyChatCompletionListResponseInputMessage
- func (u ChatCompletionListResponseInputMessageUnion) AsAssistant() (v ChatCompletionListResponseInputMessageAssistant)
- func (u ChatCompletionListResponseInputMessageUnion) AsDeveloper() (v ChatCompletionListResponseInputMessageDeveloper)
- func (u ChatCompletionListResponseInputMessageUnion) AsSystem() (v ChatCompletionListResponseInputMessageSystem)
- func (u ChatCompletionListResponseInputMessageUnion) AsTool() (v ChatCompletionListResponseInputMessageTool)
- func (u ChatCompletionListResponseInputMessageUnion) AsUser() (v ChatCompletionListResponseInputMessageUser)
- func (u ChatCompletionListResponseInputMessageUnion) RawJSON() string
- func (r *ChatCompletionListResponseInputMessageUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseInputMessageUnionContent
- type ChatCompletionListResponseInputMessageUser
- type ChatCompletionListResponseInputMessageUserContentArrayItemFile
- type ChatCompletionListResponseInputMessageUserContentArrayItemFileFile
- type ChatCompletionListResponseInputMessageUserContentArrayItemImageURL
- type ChatCompletionListResponseInputMessageUserContentArrayItemImageURLImageURL
- type ChatCompletionListResponseInputMessageUserContentArrayItemText
- type ChatCompletionListResponseInputMessageUserContentArrayItemUnion
- func (u ChatCompletionListResponseInputMessageUserContentArrayItemUnion) AsAny() anyChatCompletionListResponseInputMessageUserContentArrayItem
- func (u ChatCompletionListResponseInputMessageUserContentArrayItemUnion) AsFile() (v ChatCompletionListResponseInputMessageUserContentArrayItemFile)
- func (u ChatCompletionListResponseInputMessageUserContentArrayItemUnion) AsImageURL() (v ChatCompletionListResponseInputMessageUserContentArrayItemImageURL)
- func (u ChatCompletionListResponseInputMessageUserContentArrayItemUnion) AsText() (v ChatCompletionListResponseInputMessageUserContentArrayItemText)
- func (u ChatCompletionListResponseInputMessageUserContentArrayItemUnion) RawJSON() string
- func (r *ChatCompletionListResponseInputMessageUserContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionListResponseInputMessageUserContentUnion
- func (u ChatCompletionListResponseInputMessageUserContentUnion) AsChatCompletionListResponseInputMessageUserContentArray() (v []ChatCompletionListResponseInputMessageUserContentArrayItemUnion)
- func (u ChatCompletionListResponseInputMessageUserContentUnion) AsString() (v string)
- func (u ChatCompletionListResponseInputMessageUserContentUnion) RawJSON() string
- func (r *ChatCompletionListResponseInputMessageUserContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionNewParams
- type ChatCompletionNewParamsFunctionCallMapItemUnion
- type ChatCompletionNewParamsFunctionCallUnion
- type ChatCompletionNewParamsFunctionUnion
- type ChatCompletionNewParamsMessageAssistant
- type ChatCompletionNewParamsMessageAssistantContentArrayItem
- type ChatCompletionNewParamsMessageAssistantContentUnion
- type ChatCompletionNewParamsMessageAssistantToolCall
- type ChatCompletionNewParamsMessageAssistantToolCallFunction
- type ChatCompletionNewParamsMessageDeveloper
- type ChatCompletionNewParamsMessageDeveloperContentArrayItem
- type ChatCompletionNewParamsMessageDeveloperContentUnion
- type ChatCompletionNewParamsMessageSystem
- type ChatCompletionNewParamsMessageSystemContentArrayItem
- type ChatCompletionNewParamsMessageSystemContentUnion
- type ChatCompletionNewParamsMessageTool
- type ChatCompletionNewParamsMessageToolContentArrayItem
- type ChatCompletionNewParamsMessageToolContentUnion
- type ChatCompletionNewParamsMessageUnion
- func (u ChatCompletionNewParamsMessageUnion) GetContent() (res chatCompletionNewParamsMessageUnionContent)
- func (u ChatCompletionNewParamsMessageUnion) GetName() *string
- func (u ChatCompletionNewParamsMessageUnion) GetRole() *string
- func (u ChatCompletionNewParamsMessageUnion) GetToolCallID() *string
- func (u ChatCompletionNewParamsMessageUnion) GetToolCalls() []ChatCompletionNewParamsMessageAssistantToolCall
- func (u ChatCompletionNewParamsMessageUnion) MarshalJSON() ([]byte, error)
- func (u *ChatCompletionNewParamsMessageUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionNewParamsMessageUser
- type ChatCompletionNewParamsMessageUserContentArrayItemFile
- type ChatCompletionNewParamsMessageUserContentArrayItemFileFile
- type ChatCompletionNewParamsMessageUserContentArrayItemImageURL
- type ChatCompletionNewParamsMessageUserContentArrayItemImageURLImageURL
- type ChatCompletionNewParamsMessageUserContentArrayItemText
- type ChatCompletionNewParamsMessageUserContentArrayItemUnion
- func (u ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetFile() *ChatCompletionNewParamsMessageUserContentArrayItemFileFile
- func (u ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetImageURL() *ChatCompletionNewParamsMessageUserContentArrayItemImageURLImageURL
- func (u ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetText() *string
- func (u ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetType() *string
- func (u ChatCompletionNewParamsMessageUserContentArrayItemUnion) MarshalJSON() ([]byte, error)
- func (u *ChatCompletionNewParamsMessageUserContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionNewParamsMessageUserContentUnion
- type ChatCompletionNewParamsResponseFormatJsonObject
- type ChatCompletionNewParamsResponseFormatJsonSchema
- type ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchema
- type ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchemaSchemaUnion
- type ChatCompletionNewParamsResponseFormatText
- type ChatCompletionNewParamsResponseFormatUnion
- func (u ChatCompletionNewParamsResponseFormatUnion) GetJsonSchema() *ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchema
- func (u ChatCompletionNewParamsResponseFormatUnion) GetType() *string
- func (u ChatCompletionNewParamsResponseFormatUnion) MarshalJSON() ([]byte, error)
- func (u *ChatCompletionNewParamsResponseFormatUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionNewParamsStopUnion
- type ChatCompletionNewParamsStreamOptionUnion
- type ChatCompletionNewParamsToolChoiceMapItemUnion
- type ChatCompletionNewParamsToolChoiceUnion
- type ChatCompletionNewParamsToolUnion
- type ChatCompletionNewResponseOpenAIChatCompletion
- type ChatCompletionNewResponseOpenAIChatCompletionChoice
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobs
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContent
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContentTopLogprob
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusal
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusalTopLogprob
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistant
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArray() (...)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) AsString() (v string)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) RawJSON() string
- func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCall
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCallFunction
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloper
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArray() (...)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) AsString() (v string)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) RawJSON() string
- func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystem
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArray() (...)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) AsString() (v string)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) RawJSON() string
- func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageTool
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArray() (...)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) AsString() (v string)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) RawJSON() string
- func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) AsAny() anyChatCompletionNewResponseOpenAIChatCompletionChoiceMessage
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) AsAssistant() (v ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistant)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) AsDeveloper() (v ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloper)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) AsSystem() (v ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystem)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) AsTool() (v ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageTool)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) AsUser() (v ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUser)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) RawJSON() string
- func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnionContent
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUser
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFile
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFileFile
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURL
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURLImageURL
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemText
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) AsAny() ...
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) AsFile() (...)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) AsImageURL() (...)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) AsText() (...)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) RawJSON() string
- func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArray() (...)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) AsString() (v string)
- func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) RawJSON() string
- func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionNewResponseUnion
- func (u ChatCompletionNewResponseUnion) AsOpenAIChatCompletion() (v ChatCompletionNewResponseOpenAIChatCompletion)
- func (u ChatCompletionNewResponseUnion) AsOpenAIChatCompletionChunk() (v ChatCompletionChunk)
- func (u ChatCompletionNewResponseUnion) RawJSON() string
- func (r *ChatCompletionNewResponseUnion) UnmarshalJSON(data []byte) error
- type ChatCompletionNewResponseUnionChoices
- type ChatCompletionResponse
- type ChatCompletionResponseLogprob
- type ChatCompletionResponseMetric
- type ChatCompletionResponseStreamChunk
- type ChatCompletionResponseStreamChunkEvent
- type ChatCompletionResponseStreamChunkEventLogprob
- type ChatCompletionResponseStreamChunkMetric
- type ChatCompletionService
- func (r *ChatCompletionService) Get(ctx context.Context, completionID string, opts ...option.RequestOption) (res *ChatCompletionGetResponse, err error)
- func (r *ChatCompletionService) List(ctx context.Context, query ChatCompletionListParams, ...) (res *pagination.OpenAICursorPage[ChatCompletionListResponse], err error)
- func (r *ChatCompletionService) ListAutoPaging(ctx context.Context, query ChatCompletionListParams, ...) *pagination.OpenAICursorPageAutoPager[ChatCompletionListResponse]
- func (r *ChatCompletionService) New(ctx context.Context, body ChatCompletionNewParams, ...) (res *ChatCompletionNewResponseUnion, err error)
- func (r *ChatCompletionService) NewStreaming(ctx context.Context, body ChatCompletionNewParams, ...) (stream *ssestream.Stream[ChatCompletionChunk])
- type ChatService
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type CompletionMessage
- type CompletionMessageParam
- type CompletionMessageStopReason
- type CompletionNewParams
- type CompletionNewParamsPromptUnion
- type CompletionNewParamsStopUnion
- type CompletionNewParamsStreamOptionUnion
- type CompletionNewResponse
- type CompletionNewResponseChoice
- type CompletionNewResponseChoiceLogprobs
- type CompletionNewResponseChoiceLogprobsContent
- type CompletionNewResponseChoiceLogprobsContentTopLogprob
- type CompletionNewResponseChoiceLogprobsRefusal
- type CompletionNewResponseChoiceLogprobsRefusalTopLogprob
- type CompletionService
- func (r *CompletionService) New(ctx context.Context, body CompletionNewParams, opts ...option.RequestOption) (res *CompletionNewResponse, err error)
- func (r *CompletionService) NewStreaming(ctx context.Context, body CompletionNewParams, opts ...option.RequestOption) (stream *ssestream.Stream[CompletionNewResponse])
- type ContentDeltaImage
- type ContentDeltaText
- type ContentDeltaToolCall
- type ContentDeltaUnion
- type CreateEmbeddingsResponse
- type CreateEmbeddingsResponseData
- type CreateEmbeddingsResponseDataEmbeddingUnion
- func (u CreateEmbeddingsResponseDataEmbeddingUnion) AsFloatArray() (v []float64)
- func (u CreateEmbeddingsResponseDataEmbeddingUnion) AsString() (v string)
- func (u CreateEmbeddingsResponseDataEmbeddingUnion) RawJSON() string
- func (r *CreateEmbeddingsResponseDataEmbeddingUnion) UnmarshalJSON(data []byte) error
- type CreateEmbeddingsResponseUsage
- type CreateResponse
- type CreateResponseResult
- type CreateResponseResultMetadataUnion
- func (u CreateResponseResultMetadataUnion) AsAnyArray() (v []any)
- func (u CreateResponseResultMetadataUnion) AsBool() (v bool)
- func (u CreateResponseResultMetadataUnion) AsFloat() (v float64)
- func (u CreateResponseResultMetadataUnion) AsString() (v string)
- func (u CreateResponseResultMetadataUnion) RawJSON() string
- func (r *CreateResponseResultMetadataUnion) UnmarshalJSON(data []byte) error
- type DatasetAppendrowsParams
- type DatasetAppendrowsParamsRowUnion
- type DatasetGetResponse
- type DatasetGetResponseMetadataUnion
- func (u DatasetGetResponseMetadataUnion) AsAnyArray() (v []any)
- func (u DatasetGetResponseMetadataUnion) AsBool() (v bool)
- func (u DatasetGetResponseMetadataUnion) AsFloat() (v float64)
- func (u DatasetGetResponseMetadataUnion) AsString() (v string)
- func (u DatasetGetResponseMetadataUnion) RawJSON() string
- func (r *DatasetGetResponseMetadataUnion) UnmarshalJSON(data []byte) error
- type DatasetGetResponsePurpose
- type DatasetGetResponseSourceRows
- type DatasetGetResponseSourceRowsRowUnion
- func (u DatasetGetResponseSourceRowsRowUnion) AsAnyArray() (v []any)
- func (u DatasetGetResponseSourceRowsRowUnion) AsBool() (v bool)
- func (u DatasetGetResponseSourceRowsRowUnion) AsFloat() (v float64)
- func (u DatasetGetResponseSourceRowsRowUnion) AsString() (v string)
- func (u DatasetGetResponseSourceRowsRowUnion) RawJSON() string
- func (r *DatasetGetResponseSourceRowsRowUnion) UnmarshalJSON(data []byte) error
- type DatasetGetResponseSourceUnion
- func (u DatasetGetResponseSourceUnion) AsAny() anyDatasetGetResponseSource
- func (u DatasetGetResponseSourceUnion) AsRows() (v DatasetGetResponseSourceRows)
- func (u DatasetGetResponseSourceUnion) AsUri() (v DatasetGetResponseSourceUri)
- func (u DatasetGetResponseSourceUnion) RawJSON() string
- func (r *DatasetGetResponseSourceUnion) UnmarshalJSON(data []byte) error
- type DatasetGetResponseSourceUri
- type DatasetIterrowsParams
- type DatasetIterrowsResponse
- type DatasetIterrowsResponseDataUnion
- func (u DatasetIterrowsResponseDataUnion) AsAnyArray() (v []any)
- func (u DatasetIterrowsResponseDataUnion) AsBool() (v bool)
- func (u DatasetIterrowsResponseDataUnion) AsFloat() (v float64)
- func (u DatasetIterrowsResponseDataUnion) AsString() (v string)
- func (u DatasetIterrowsResponseDataUnion) RawJSON() string
- func (r *DatasetIterrowsResponseDataUnion) UnmarshalJSON(data []byte) error
- type DatasetRegisterParams
- type DatasetRegisterParamsMetadataUnion
- type DatasetRegisterParamsPurpose
- type DatasetRegisterParamsSourceRows
- type DatasetRegisterParamsSourceRowsRowUnion
- type DatasetRegisterParamsSourceUnion
- func (u DatasetRegisterParamsSourceUnion) GetRows() []map[string]DatasetRegisterParamsSourceRowsRowUnion
- func (u DatasetRegisterParamsSourceUnion) GetType() *string
- func (u DatasetRegisterParamsSourceUnion) GetUri() *string
- func (u DatasetRegisterParamsSourceUnion) MarshalJSON() ([]byte, error)
- func (u *DatasetRegisterParamsSourceUnion) UnmarshalJSON(data []byte) error
- type DatasetRegisterParamsSourceUri
- type DatasetRegisterResponse
- type DatasetRegisterResponseMetadataUnion
- func (u DatasetRegisterResponseMetadataUnion) AsAnyArray() (v []any)
- func (u DatasetRegisterResponseMetadataUnion) AsBool() (v bool)
- func (u DatasetRegisterResponseMetadataUnion) AsFloat() (v float64)
- func (u DatasetRegisterResponseMetadataUnion) AsString() (v string)
- func (u DatasetRegisterResponseMetadataUnion) RawJSON() string
- func (r *DatasetRegisterResponseMetadataUnion) UnmarshalJSON(data []byte) error
- type DatasetRegisterResponsePurpose
- type DatasetRegisterResponseSourceRows
- type DatasetRegisterResponseSourceRowsRowUnion
- func (u DatasetRegisterResponseSourceRowsRowUnion) AsAnyArray() (v []any)
- func (u DatasetRegisterResponseSourceRowsRowUnion) AsBool() (v bool)
- func (u DatasetRegisterResponseSourceRowsRowUnion) AsFloat() (v float64)
- func (u DatasetRegisterResponseSourceRowsRowUnion) AsString() (v string)
- func (u DatasetRegisterResponseSourceRowsRowUnion) RawJSON() string
- func (r *DatasetRegisterResponseSourceRowsRowUnion) UnmarshalJSON(data []byte) error
- type DatasetRegisterResponseSourceUnion
- func (u DatasetRegisterResponseSourceUnion) AsAny() anyDatasetRegisterResponseSource
- func (u DatasetRegisterResponseSourceUnion) AsRows() (v DatasetRegisterResponseSourceRows)
- func (u DatasetRegisterResponseSourceUnion) AsUri() (v DatasetRegisterResponseSourceUri)
- func (u DatasetRegisterResponseSourceUnion) RawJSON() string
- func (r *DatasetRegisterResponseSourceUnion) UnmarshalJSON(data []byte) error
- type DatasetRegisterResponseSourceUri
- type DatasetService
- func (r *DatasetService) Appendrows(ctx context.Context, datasetID string, body DatasetAppendrowsParams, ...) (err error)
- func (r *DatasetService) Get(ctx context.Context, datasetID string, opts ...option.RequestOption) (res *DatasetGetResponse, err error)
- func (r *DatasetService) Iterrows(ctx context.Context, datasetID string, query DatasetIterrowsParams, ...) (res *DatasetIterrowsResponse, err error)
- func (r *DatasetService) List(ctx context.Context, opts ...option.RequestOption) (res *[]ListDatasetsResponseData, err error)
- func (r *DatasetService) Register(ctx context.Context, body DatasetRegisterParams, opts ...option.RequestOption) (res *DatasetRegisterResponse, err error)
- func (r *DatasetService) Unregister(ctx context.Context, datasetID string, opts ...option.RequestOption) (err error)
- type DeleteFileResponse
- type DocumentContentImageContentItemImageParam
- type DocumentContentImageContentItemImageURLParam
- type DocumentContentImageContentItemParam
- type DocumentContentTextContentItemParam
- type DocumentContentURLParam
- type DocumentContentUnionParam
- type DocumentMetadataUnionParam
- type DocumentParam
- type EmbeddingNewParams
- type EmbeddingNewParamsInputUnion
- type EmbeddingService
- type EmbeddingsResponse
- type Error
- type EvalCandidateAgentParam
- type EvalCandidateModelParam
- type EvalCandidateUnionParam
- func (u EvalCandidateUnionParam) GetConfig() *shared.AgentConfigParam
- func (u EvalCandidateUnionParam) GetModel() *string
- func (u EvalCandidateUnionParam) GetSamplingParams() *shared.SamplingParams
- func (u EvalCandidateUnionParam) GetSystemMessage() *shared.SystemMessageParam
- func (u EvalCandidateUnionParam) GetType() *string
- func (u EvalCandidateUnionParam) MarshalJSON() ([]byte, error)
- func (u *EvalCandidateUnionParam) UnmarshalJSON(data []byte) error
- type EvalEvaluateRowsAlphaParams
- type EvalEvaluateRowsAlphaParamsInputRowUnion
- type EvalEvaluateRowsParams
- type EvalEvaluateRowsParamsInputRowUnion
- type EvalJobCancelParams
- type EvalJobGetParams
- type EvalJobService
- func (r *EvalJobService) Cancel(ctx context.Context, jobID string, body EvalJobCancelParams, ...) (err error)
- func (r *EvalJobService) Get(ctx context.Context, jobID string, query EvalJobGetParams, ...) (res *EvaluateResponse, err error)
- func (r *EvalJobService) Status(ctx context.Context, jobID string, query EvalJobStatusParams, ...) (res *Job, err error)
- type EvalJobStatusParams
- type EvalRunEvalAlphaParams
- type EvalRunEvalParams
- type EvalService
- func (r *EvalService) EvaluateRows(ctx context.Context, benchmarkID string, body EvalEvaluateRowsParams, ...) (res *EvaluateResponse, err error)
- func (r *EvalService) EvaluateRowsAlpha(ctx context.Context, benchmarkID string, body EvalEvaluateRowsAlphaParams, ...) (res *EvaluateResponse, err error)
- func (r *EvalService) RunEval(ctx context.Context, benchmarkID string, body EvalRunEvalParams, ...) (res *Job, err error)
- func (r *EvalService) RunEvalAlpha(ctx context.Context, benchmarkID string, body EvalRunEvalAlphaParams, ...) (res *Job, err error)
- type EvaluateResponse
- type EvaluateResponseGenerationUnion
- func (u EvaluateResponseGenerationUnion) AsAnyArray() (v []any)
- func (u EvaluateResponseGenerationUnion) AsBool() (v bool)
- func (u EvaluateResponseGenerationUnion) AsFloat() (v float64)
- func (u EvaluateResponseGenerationUnion) AsString() (v string)
- func (u EvaluateResponseGenerationUnion) RawJSON() string
- func (r *EvaluateResponseGenerationUnion) UnmarshalJSON(data []byte) error
- type EventMetricAttributeUnionParam
- type EventMetricParam
- type EventStructuredLogAttributeUnionParam
- type EventStructuredLogParam
- type EventStructuredLogPayloadSpanEndParam
- type EventStructuredLogPayloadSpanStartParam
- type EventStructuredLogPayloadUnionParam
- func (u EventStructuredLogPayloadUnionParam) GetName() *string
- func (u EventStructuredLogPayloadUnionParam) GetParentSpanID() *string
- func (u EventStructuredLogPayloadUnionParam) GetStatus() *string
- func (u EventStructuredLogPayloadUnionParam) GetType() *string
- func (u EventStructuredLogPayloadUnionParam) MarshalJSON() ([]byte, error)
- func (u *EventStructuredLogPayloadUnionParam) UnmarshalJSON(data []byte) error
- type EventUnionParam
- func (u EventUnionParam) GetAttributes() (res eventUnionParamAttributes)
- func (u EventUnionParam) GetMessage() *string
- func (u EventUnionParam) GetMetric() *string
- func (u EventUnionParam) GetPayload() *EventStructuredLogPayloadUnionParam
- func (u EventUnionParam) GetSeverity() *string
- func (u EventUnionParam) GetSpanID() *string
- func (u EventUnionParam) GetTimestamp() *time.Time
- func (u EventUnionParam) GetTraceID() *string
- func (u EventUnionParam) GetType() *string
- func (u EventUnionParam) GetUnit() *string
- func (u EventUnionParam) GetValue() *float64
- func (u EventUnionParam) MarshalJSON() ([]byte, error)
- func (u *EventUnionParam) UnmarshalJSON(data []byte) error
- type EventUnstructuredLogAttributeUnionParam
- type EventUnstructuredLogParam
- type File
- type FileContentResponse
- type FileListParams
- type FileListParamsOrder
- type FileListParamsPurpose
- type FileNewParams
- type FileNewParamsPurpose
- type FilePurpose
- type FileService
- func (r *FileService) Content(ctx context.Context, fileID string, opts ...option.RequestOption) (res *FileContentResponse, err error)
- func (r *FileService) Delete(ctx context.Context, fileID string, opts ...option.RequestOption) (res *DeleteFileResponse, err error)
- func (r *FileService) Get(ctx context.Context, fileID string, opts ...option.RequestOption) (res *File, err error)
- func (r *FileService) List(ctx context.Context, query FileListParams, opts ...option.RequestOption) (res *pagination.OpenAICursorPage[File], err error)
- func (r *FileService) ListAutoPaging(ctx context.Context, query FileListParams, opts ...option.RequestOption) *pagination.OpenAICursorPageAutoPager[File]
- func (r *FileService) New(ctx context.Context, body FileNewParams, opts ...option.RequestOption) (res *File, err error)
- type HealthInfo
- type HealthInfoStatus
- type InferenceBatchChatCompletionParams
- type InferenceBatchChatCompletionParamsLogprobs
- type InferenceBatchChatCompletionParamsTool
- type InferenceBatchChatCompletionParamsToolConfig
- type InferenceBatchChatCompletionResponse
- type InferenceBatchCompletionParams
- type InferenceBatchCompletionParamsLogprobs
- type InferenceChatCompletionParams
- type InferenceChatCompletionParamsLogprobs
- type InferenceChatCompletionParamsTool
- type InferenceChatCompletionParamsToolChoice
- type InferenceChatCompletionParamsToolConfig
- type InferenceChatCompletionParamsToolPromptFormat
- type InferenceCompletionParams
- type InferenceCompletionParamsLogprobs
- type InferenceEmbeddingsParams
- type InferenceEmbeddingsParamsContentsUnion
- type InferenceEmbeddingsParamsTaskType
- type InferenceEmbeddingsParamsTextTruncation
- type InferenceService
- func (r *InferenceService) BatchChatCompletion(ctx context.Context, body InferenceBatchChatCompletionParams, ...) (res *InferenceBatchChatCompletionResponse, err error)
- func (r *InferenceService) BatchCompletion(ctx context.Context, body InferenceBatchCompletionParams, ...) (res *shared.BatchCompletion, err error)
- func (r *InferenceService) ChatCompletion(ctx context.Context, body InferenceChatCompletionParams, ...) (res *shared.ChatCompletionResponse, err error)deprecated
- func (r *InferenceService) ChatCompletionStreaming(ctx context.Context, body InferenceChatCompletionParams, ...) (stream *ssestream.Stream[ChatCompletionResponseStreamChunk])deprecated
- func (r *InferenceService) Completion(ctx context.Context, body InferenceCompletionParams, ...) (res *shared.SharedCompletionResponse, err error)deprecated
- func (r *InferenceService) CompletionStreaming(ctx context.Context, body InferenceCompletionParams, ...) (stream *ssestream.Stream[shared.SharedCompletionResponse])deprecated
- func (r *InferenceService) Embeddings(ctx context.Context, body InferenceEmbeddingsParams, ...) (res *EmbeddingsResponse, err error)deprecated
- type InferenceStep
- type InspectService
- type InterleavedContentImageContentItem
- type InterleavedContentImageContentItemImage
- type InterleavedContentImageContentItemImageParam
- type InterleavedContentImageContentItemImageURL
- type InterleavedContentImageContentItemImageURLParam
- type InterleavedContentImageContentItemParam
- type InterleavedContentItemImage
- type InterleavedContentItemImageImage
- type InterleavedContentItemImageImageParam
- type InterleavedContentItemImageImageURL
- type InterleavedContentItemImageImageURLParam
- type InterleavedContentItemImageParam
- type InterleavedContentItemText
- type InterleavedContentItemTextParam
- type InterleavedContentItemUnion
- type InterleavedContentItemUnionParam
- type InterleavedContentTextContentItem
- type InterleavedContentTextContentItemParam
- type InterleavedContentUnion
- type InterleavedContentUnionParam
- type Job
- type JobStatus
- type ListBenchmarksResponse
- type ListDatasetsResponse
- type ListDatasetsResponseData
- type ListDatasetsResponseDataMetadataUnion
- func (u ListDatasetsResponseDataMetadataUnion) AsAnyArray() (v []any)
- func (u ListDatasetsResponseDataMetadataUnion) AsBool() (v bool)
- func (u ListDatasetsResponseDataMetadataUnion) AsFloat() (v float64)
- func (u ListDatasetsResponseDataMetadataUnion) AsString() (v string)
- func (u ListDatasetsResponseDataMetadataUnion) RawJSON() string
- func (r *ListDatasetsResponseDataMetadataUnion) UnmarshalJSON(data []byte) error
- type ListDatasetsResponseDataSourceRows
- type ListDatasetsResponseDataSourceRowsRowUnion
- func (u ListDatasetsResponseDataSourceRowsRowUnion) AsAnyArray() (v []any)
- func (u ListDatasetsResponseDataSourceRowsRowUnion) AsBool() (v bool)
- func (u ListDatasetsResponseDataSourceRowsRowUnion) AsFloat() (v float64)
- func (u ListDatasetsResponseDataSourceRowsRowUnion) AsString() (v string)
- func (u ListDatasetsResponseDataSourceRowsRowUnion) RawJSON() string
- func (r *ListDatasetsResponseDataSourceRowsRowUnion) UnmarshalJSON(data []byte) error
- type ListDatasetsResponseDataSourceUnion
- func (u ListDatasetsResponseDataSourceUnion) AsAny() anyListDatasetsResponseDataSource
- func (u ListDatasetsResponseDataSourceUnion) AsRows() (v ListDatasetsResponseDataSourceRows)
- func (u ListDatasetsResponseDataSourceUnion) AsUri() (v ListDatasetsResponseDataSourceUri)
- func (u ListDatasetsResponseDataSourceUnion) RawJSON() string
- func (r *ListDatasetsResponseDataSourceUnion) UnmarshalJSON(data []byte) error
- type ListDatasetsResponseDataSourceUri
- type ListFilesResponse
- type ListModelsResponse
- type ListPostTrainingJobsResponse
- type ListPostTrainingJobsResponseData
- type ListProvidersResponse
- type ListRoutesResponse
- type ListScoringFunctionsResponse
- type ListShieldsResponse
- type ListToolGroupsResponse
- type ListToolsResponse
- type ListVectorDBsResponse
- type ListVectorDBsResponseData
- type ListVectorStoresResponse
- type MemoryRetrievalStep
- type MessageUnionParam
- type Model
- type ModelMetadataUnion
- func (u ModelMetadataUnion) AsAnyArray() (v []any)
- func (u ModelMetadataUnion) AsBool() (v bool)
- func (u ModelMetadataUnion) AsFloat() (v float64)
- func (u ModelMetadataUnion) AsString() (v string)
- func (u ModelMetadataUnion) RawJSON() string
- func (r *ModelMetadataUnion) UnmarshalJSON(data []byte) error
- type ModelModelType
- type ModelRegisterParams
- type ModelRegisterParamsMetadataUnion
- type ModelRegisterParamsModelType
- type ModelService
- func (r *ModelService) Get(ctx context.Context, modelID string, opts ...option.RequestOption) (res *Model, err error)
- func (r *ModelService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Model, err error)
- func (r *ModelService) Register(ctx context.Context, body ModelRegisterParams, opts ...option.RequestOption) (res *Model, err error)
- func (r *ModelService) Unregister(ctx context.Context, modelID string, opts ...option.RequestOption) (err error)
- type ModerationNewParams
- type ModerationNewParamsInputUnion
- type ModerationService
- type PostTrainingJob
- type PostTrainingJobArtifactsParams
- type PostTrainingJobArtifactsResponse
- type PostTrainingJobArtifactsResponseCheckpoint
- type PostTrainingJobArtifactsResponseCheckpointTrainingMetrics
- type PostTrainingJobCancelParams
- type PostTrainingJobService
- func (r *PostTrainingJobService) Artifacts(ctx context.Context, query PostTrainingJobArtifactsParams, ...) (res *PostTrainingJobArtifactsResponse, err error)
- func (r *PostTrainingJobService) Cancel(ctx context.Context, body PostTrainingJobCancelParams, ...) (err error)
- func (r *PostTrainingJobService) List(ctx context.Context, opts ...option.RequestOption) (res *[]ListPostTrainingJobsResponseData, err error)
- func (r *PostTrainingJobService) Status(ctx context.Context, query PostTrainingJobStatusParams, ...) (res *PostTrainingJobStatusResponse, err error)
- type PostTrainingJobStatusParams
- type PostTrainingJobStatusResponse
- type PostTrainingJobStatusResponseCheckpoint
- type PostTrainingJobStatusResponseCheckpointTrainingMetrics
- type PostTrainingJobStatusResponseResourcesAllocatedUnion
- func (u PostTrainingJobStatusResponseResourcesAllocatedUnion) AsAnyArray() (v []any)
- func (u PostTrainingJobStatusResponseResourcesAllocatedUnion) AsBool() (v bool)
- func (u PostTrainingJobStatusResponseResourcesAllocatedUnion) AsFloat() (v float64)
- func (u PostTrainingJobStatusResponseResourcesAllocatedUnion) AsString() (v string)
- func (u PostTrainingJobStatusResponseResourcesAllocatedUnion) RawJSON() string
- func (r *PostTrainingJobStatusResponseResourcesAllocatedUnion) UnmarshalJSON(data []byte) error
- type PostTrainingJobStatusResponseStatus
- type PostTrainingPreferenceOptimizeParams
- type PostTrainingPreferenceOptimizeParamsAlgorithmConfig
- type PostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion
- type PostTrainingPreferenceOptimizeParamsLoggerConfigUnion
- type PostTrainingPreferenceOptimizeParamsTrainingConfig
- type PostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig
- type PostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig
- type PostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig
- type PostTrainingService
- func (r *PostTrainingService) PreferenceOptimize(ctx context.Context, body PostTrainingPreferenceOptimizeParams, ...) (res *PostTrainingJob, err error)
- func (r *PostTrainingService) SupervisedFineTune(ctx context.Context, body PostTrainingSupervisedFineTuneParams, ...) (res *PostTrainingJob, err error)
- type PostTrainingSupervisedFineTuneParams
- type PostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion
- type PostTrainingSupervisedFineTuneParamsLoggerConfigUnion
- type PostTrainingSupervisedFineTuneParamsTrainingConfig
- type PostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig
- type PostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig
- type PostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig
- type ProviderInfo
- type ProviderInfoConfigUnion
- func (u ProviderInfoConfigUnion) AsAnyArray() (v []any)
- func (u ProviderInfoConfigUnion) AsBool() (v bool)
- func (u ProviderInfoConfigUnion) AsFloat() (v float64)
- func (u ProviderInfoConfigUnion) AsString() (v string)
- func (u ProviderInfoConfigUnion) RawJSON() string
- func (r *ProviderInfoConfigUnion) UnmarshalJSON(data []byte) error
- type ProviderInfoHealthUnion
- func (u ProviderInfoHealthUnion) AsAnyArray() (v []any)
- func (u ProviderInfoHealthUnion) AsBool() (v bool)
- func (u ProviderInfoHealthUnion) AsFloat() (v float64)
- func (u ProviderInfoHealthUnion) AsString() (v string)
- func (u ProviderInfoHealthUnion) RawJSON() string
- func (r *ProviderInfoHealthUnion) UnmarshalJSON(data []byte) error
- type ProviderService
- type QueryChunksResponse
- type QueryChunksResponseChunk
- type QueryChunksResponseChunkChunkMetadata
- type QueryChunksResponseChunkMetadataUnion
- func (u QueryChunksResponseChunkMetadataUnion) AsAnyArray() (v []any)
- func (u QueryChunksResponseChunkMetadataUnion) AsBool() (v bool)
- func (u QueryChunksResponseChunkMetadataUnion) AsFloat() (v float64)
- func (u QueryChunksResponseChunkMetadataUnion) AsString() (v string)
- func (u QueryChunksResponseChunkMetadataUnion) RawJSON() string
- func (r *QueryChunksResponseChunkMetadataUnion) UnmarshalJSON(data []byte) error
- type QueryConditionOp
- type QueryConditionParam
- type QueryConditionValueUnionParam
- type QueryConfigMode
- type QueryConfigParam
- type QueryConfigRankerRrfParam
- type QueryConfigRankerUnionParam
- type QueryConfigRankerWeightedParam
- type QueryGeneratorConfigDefaultParam
- type QueryGeneratorConfigLlmParam
- type QueryGeneratorConfigUnionParam
- type QueryResult
- type QueryResultMetadataUnion
- type QuerySpansResponse
- type QuerySpansResponseData
- type QuerySpansResponseDataAttributeUnion
- func (u QuerySpansResponseDataAttributeUnion) AsAnyArray() (v []any)
- func (u QuerySpansResponseDataAttributeUnion) AsBool() (v bool)
- func (u QuerySpansResponseDataAttributeUnion) AsFloat() (v float64)
- func (u QuerySpansResponseDataAttributeUnion) AsString() (v string)
- func (u QuerySpansResponseDataAttributeUnion) RawJSON() string
- func (r *QuerySpansResponseDataAttributeUnion) UnmarshalJSON(data []byte) error
- type ResponseFormatGrammar
- type ResponseFormatGrammarBnfUnion
- type ResponseFormatGrammarBnfUnionParam
- type ResponseFormatGrammarParam
- type ResponseFormatJsonSchema
- type ResponseFormatJsonSchemaJsonSchemaUnion
- type ResponseFormatJsonSchemaJsonSchemaUnionParam
- type ResponseFormatJsonSchemaParam
- type ResponseFormatUnion
- type ResponseFormatUnionParam
- type ResponseInputItemListParams
- type ResponseInputItemListParamsOrder
- type ResponseInputItemListResponse
- type ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput
- type ResponseInputItemListResponseDataOpenAIResponseMessage
- type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem
- type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation
- type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFileCitation
- type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFilePath
- type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationURLCitation
- type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) AsAny() ...
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) AsContainerFileCitation() (...)
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) AsFileCitation() (...)
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) AsFilePath() (...)
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) AsURLCitation() (...)
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) RawJSON() string
- func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
- type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemDetail
- type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage
- type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImageDetail
- type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputText
- type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) AsAny() anyResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) AsInputImage() (...)
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) AsInputText() (...)
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) RawJSON() string
- func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) AsResponseInputItemListResponseDataOpenAIResponseMessageContentArray() (...)
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) AsString() (v string)
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) AsVariant2() (v []ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem)
- func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) RawJSON() string
- func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) UnmarshalJSON(data []byte) error
- type ResponseInputItemListResponseDataOpenAIResponseMessageRole
- type ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall
- type ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResult
- type ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion
- func (u ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsAnyArray() (v []any)
- func (u ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsBool() (v bool)
- func (u ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsFloat() (v float64)
- func (u ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsString() (v string)
- func (u ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) RawJSON() string
- func (r *ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) UnmarshalJSON(data []byte) error
- type ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall
- type ResponseInputItemListResponseDataOpenAIResponseOutputMessageWebSearchToolCall
- type ResponseInputItemListResponseDataRole
- type ResponseInputItemListResponseDataUnion
- func (u ResponseInputItemListResponseDataUnion) AsOpenAIResponseInputFunctionToolCallOutput() (v ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput)
- func (u ResponseInputItemListResponseDataUnion) AsOpenAIResponseMessage() (v ResponseInputItemListResponseDataOpenAIResponseMessage)
- func (u ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageFileSearchToolCall() (...)
- func (u ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageFunctionToolCall() (v ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall)
- func (u ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageWebSearchToolCall() (...)
- func (u ResponseInputItemListResponseDataUnion) RawJSON() string
- func (r *ResponseInputItemListResponseDataUnion) UnmarshalJSON(data []byte) error
- type ResponseInputItemService
- type ResponseListParams
- type ResponseListParamsOrder
- type ResponseListResponse
- type ResponseListResponseError
- type ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput
- type ResponseListResponseInputOpenAIResponseMessage
- type ResponseListResponseInputOpenAIResponseMessageContentArrayItem
- type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation
- type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFileCitation
- type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFilePath
- type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationURLCitation
- type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion
- func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsAny() anyResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotation
- func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsContainerFileCitation() (...)
- func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsFileCitation() (...)
- func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsFilePath() (...)
- func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsURLCitation() (...)
- func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) RawJSON() string
- func (r *ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
- type ResponseListResponseInputOpenAIResponseMessageContentArrayItemDetail
- type ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage
- type ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImageDetail
- type ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText
- type ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion
- func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) AsAny() anyResponseListResponseInputOpenAIResponseMessageContentArrayItem
- func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) AsInputImage() (v ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage)
- func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) AsInputText() (v ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText)
- func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) RawJSON() string
- func (r *ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ResponseListResponseInputOpenAIResponseMessageContentUnion
- func (u ResponseListResponseInputOpenAIResponseMessageContentUnion) AsResponseListResponseInputOpenAIResponseMessageContentArray() (v []ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion)
- func (u ResponseListResponseInputOpenAIResponseMessageContentUnion) AsString() (v string)
- func (u ResponseListResponseInputOpenAIResponseMessageContentUnion) AsVariant2() (v []ResponseListResponseInputOpenAIResponseMessageContentArrayItem)
- func (u ResponseListResponseInputOpenAIResponseMessageContentUnion) RawJSON() string
- func (r *ResponseListResponseInputOpenAIResponseMessageContentUnion) UnmarshalJSON(data []byte) error
- type ResponseListResponseInputOpenAIResponseMessageRole
- type ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall
- type ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResult
- type ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion
- func (u ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsAnyArray() (v []any)
- func (u ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsBool() (v bool)
- func (u ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsFloat() (v float64)
- func (u ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsString() (v string)
- func (u ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) RawJSON() string
- func (r *ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) UnmarshalJSON(data []byte) error
- type ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall
- type ResponseListResponseInputOpenAIResponseOutputMessageWebSearchToolCall
- type ResponseListResponseInputRole
- type ResponseListResponseInputUnion
- func (u ResponseListResponseInputUnion) AsOpenAIResponseInputFunctionToolCallOutput() (v ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput)
- func (u ResponseListResponseInputUnion) AsOpenAIResponseMessage() (v ResponseListResponseInputOpenAIResponseMessage)
- func (u ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageFileSearchToolCall() (v ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall)
- func (u ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageFunctionToolCall() (v ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall)
- func (u ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageWebSearchToolCall() (v ResponseListResponseInputOpenAIResponseOutputMessageWebSearchToolCall)
- func (u ResponseListResponseInputUnion) RawJSON() string
- func (r *ResponseListResponseInputUnion) UnmarshalJSON(data []byte) error
- type ResponseListResponseOutputFileSearchCall
- type ResponseListResponseOutputFileSearchCallResult
- type ResponseListResponseOutputFileSearchCallResultAttributeUnion
- func (u ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsAnyArray() (v []any)
- func (u ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsBool() (v bool)
- func (u ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsFloat() (v float64)
- func (u ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsString() (v string)
- func (u ResponseListResponseOutputFileSearchCallResultAttributeUnion) RawJSON() string
- func (r *ResponseListResponseOutputFileSearchCallResultAttributeUnion) UnmarshalJSON(data []byte) error
- type ResponseListResponseOutputFunctionCall
- type ResponseListResponseOutputMcpCall
- type ResponseListResponseOutputMcpListTools
- type ResponseListResponseOutputMcpListToolsTool
- type ResponseListResponseOutputMcpListToolsToolInputSchemaUnion
- func (u ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsAnyArray() (v []any)
- func (u ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsBool() (v bool)
- func (u ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsFloat() (v float64)
- func (u ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsString() (v string)
- func (u ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) RawJSON() string
- func (r *ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) UnmarshalJSON(data []byte) error
- type ResponseListResponseOutputMessage
- type ResponseListResponseOutputMessageContentArrayItem
- type ResponseListResponseOutputMessageContentArrayItemAnnotationContainerFileCitation
- type ResponseListResponseOutputMessageContentArrayItemAnnotationFileCitation
- type ResponseListResponseOutputMessageContentArrayItemAnnotationFilePath
- type ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation
- type ResponseListResponseOutputMessageContentArrayItemAnnotationUnion
- func (u ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsAny() anyResponseListResponseOutputMessageContentArrayItemAnnotation
- func (u ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsContainerFileCitation() (...)
- func (u ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsFileCitation() (v ResponseListResponseOutputMessageContentArrayItemAnnotationFileCitation)
- func (u ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsFilePath() (v ResponseListResponseOutputMessageContentArrayItemAnnotationFilePath)
- func (u ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsURLCitation() (v ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation)
- func (u ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) RawJSON() string
- func (r *ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
- type ResponseListResponseOutputMessageContentArrayItemDetail
- type ResponseListResponseOutputMessageContentArrayItemInputImage
- type ResponseListResponseOutputMessageContentArrayItemInputImageDetail
- type ResponseListResponseOutputMessageContentArrayItemInputText
- type ResponseListResponseOutputMessageContentArrayItemUnion
- func (u ResponseListResponseOutputMessageContentArrayItemUnion) AsAny() anyResponseListResponseOutputMessageContentArrayItem
- func (u ResponseListResponseOutputMessageContentArrayItemUnion) AsInputImage() (v ResponseListResponseOutputMessageContentArrayItemInputImage)
- func (u ResponseListResponseOutputMessageContentArrayItemUnion) AsInputText() (v ResponseListResponseOutputMessageContentArrayItemInputText)
- func (u ResponseListResponseOutputMessageContentArrayItemUnion) RawJSON() string
- func (r *ResponseListResponseOutputMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ResponseListResponseOutputMessageContentUnion
- func (u ResponseListResponseOutputMessageContentUnion) AsResponseListResponseOutputMessageContentArray() (v []ResponseListResponseOutputMessageContentArrayItemUnion)
- func (u ResponseListResponseOutputMessageContentUnion) AsString() (v string)
- func (u ResponseListResponseOutputMessageContentUnion) AsVariant2() (v []ResponseListResponseOutputMessageContentArrayItem)
- func (u ResponseListResponseOutputMessageContentUnion) RawJSON() string
- func (r *ResponseListResponseOutputMessageContentUnion) UnmarshalJSON(data []byte) error
- type ResponseListResponseOutputMessageRole
- type ResponseListResponseOutputRole
- type ResponseListResponseOutputUnion
- func (u ResponseListResponseOutputUnion) AsAny() anyResponseListResponseOutput
- func (u ResponseListResponseOutputUnion) AsFileSearchCall() (v ResponseListResponseOutputFileSearchCall)
- func (u ResponseListResponseOutputUnion) AsFunctionCall() (v ResponseListResponseOutputFunctionCall)
- func (u ResponseListResponseOutputUnion) AsMcpCall() (v ResponseListResponseOutputMcpCall)
- func (u ResponseListResponseOutputUnion) AsMcpListTools() (v ResponseListResponseOutputMcpListTools)
- func (u ResponseListResponseOutputUnion) AsMessage() (v ResponseListResponseOutputMessage)
- func (u ResponseListResponseOutputUnion) AsWebSearchCall() (v ResponseListResponseOutputWebSearchCall)
- func (u ResponseListResponseOutputUnion) RawJSON() string
- func (r *ResponseListResponseOutputUnion) UnmarshalJSON(data []byte) error
- type ResponseListResponseOutputWebSearchCall
- type ResponseListResponseText
- type ResponseListResponseTextFormat
- type ResponseListResponseTextFormatSchemaUnion
- func (u ResponseListResponseTextFormatSchemaUnion) AsAnyArray() (v []any)
- func (u ResponseListResponseTextFormatSchemaUnion) AsBool() (v bool)
- func (u ResponseListResponseTextFormatSchemaUnion) AsFloat() (v float64)
- func (u ResponseListResponseTextFormatSchemaUnion) AsString() (v string)
- func (u ResponseListResponseTextFormatSchemaUnion) RawJSON() string
- func (r *ResponseListResponseTextFormatSchemaUnion) UnmarshalJSON(data []byte) error
- type ResponseListResponseTextFormatType
- type ResponseNewParams
- type ResponseNewParamsInputArrayItemOpenAIResponseInputFunctionToolCallOutput
- type ResponseNewParamsInputArrayItemOpenAIResponseMessage
- type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItem
- type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation
- type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFileCitation
- type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFilePath
- type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationURLCitation
- type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetContainerID() *string
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetEndIndex() *int64
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetFileID() *string
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetFilename() *string
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetIndex() *int64
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetStartIndex() *int64
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetTitle() *string
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetType() *string
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetURL() *string
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) MarshalJSON() ([]byte, error)
- func (u *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
- type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImage
- type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImageDetail
- type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputText
- type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetDetail() *string
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetImageURL() *string
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetText() *string
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetType() *string
- func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) MarshalJSON() ([]byte, error)
- func (u *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentUnion
- type ResponseNewParamsInputArrayItemOpenAIResponseMessageRole
- type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCall
- type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResult
- type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion
- type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFunctionToolCall
- type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageWebSearchToolCall
- type ResponseNewParamsInputArrayItemUnion
- func (u ResponseNewParamsInputArrayItemUnion) GetArguments() *string
- func (u ResponseNewParamsInputArrayItemUnion) GetCallID() *string
- func (u ResponseNewParamsInputArrayItemUnion) GetContent() *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentUnion
- func (u ResponseNewParamsInputArrayItemUnion) GetID() *string
- func (u ResponseNewParamsInputArrayItemUnion) GetName() *string
- func (u ResponseNewParamsInputArrayItemUnion) GetOutput() *string
- func (u ResponseNewParamsInputArrayItemUnion) GetQueries() []string
- func (u ResponseNewParamsInputArrayItemUnion) GetResults() ...
- func (u ResponseNewParamsInputArrayItemUnion) GetRole() *string
- func (u ResponseNewParamsInputArrayItemUnion) GetStatus() *string
- func (u ResponseNewParamsInputArrayItemUnion) GetType() *string
- func (u ResponseNewParamsInputArrayItemUnion) MarshalJSON() ([]byte, error)
- func (u *ResponseNewParamsInputArrayItemUnion) UnmarshalJSON(data []byte) error
- type ResponseNewParamsInputUnion
- type ResponseNewParamsText
- type ResponseNewParamsTextFormat
- type ResponseNewParamsTextFormatSchemaUnion
- type ResponseNewParamsTextFormatType
- type ResponseNewParamsToolFileSearch
- type ResponseNewParamsToolFileSearchFilterUnion
- type ResponseNewParamsToolFileSearchRankingOptions
- type ResponseNewParamsToolFunction
- type ResponseNewParamsToolFunctionParameterUnion
- type ResponseNewParamsToolMcp
- type ResponseNewParamsToolMcpAllowedToolsAllowedToolsFilter
- type ResponseNewParamsToolMcpAllowedToolsUnion
- type ResponseNewParamsToolMcpHeaderUnion
- type ResponseNewParamsToolMcpRequireApprovalApprovalFilter
- type ResponseNewParamsToolMcpRequireApprovalString
- type ResponseNewParamsToolMcpRequireApprovalUnion
- type ResponseNewParamsToolOpenAIResponseInputToolWebSearch
- type ResponseNewParamsToolOpenAIResponseInputToolWebSearchType
- type ResponseNewParamsToolUnion
- func (u ResponseNewParamsToolUnion) GetAllowedTools() *ResponseNewParamsToolMcpAllowedToolsUnion
- func (u ResponseNewParamsToolUnion) GetDescription() *string
- func (u ResponseNewParamsToolUnion) GetFilters() map[string]ResponseNewParamsToolFileSearchFilterUnion
- func (u ResponseNewParamsToolUnion) GetHeaders() map[string]ResponseNewParamsToolMcpHeaderUnion
- func (u ResponseNewParamsToolUnion) GetMaxNumResults() *int64
- func (u ResponseNewParamsToolUnion) GetName() *string
- func (u ResponseNewParamsToolUnion) GetParameters() map[string]ResponseNewParamsToolFunctionParameterUnion
- func (u ResponseNewParamsToolUnion) GetRankingOptions() *ResponseNewParamsToolFileSearchRankingOptions
- func (u ResponseNewParamsToolUnion) GetRequireApproval() *ResponseNewParamsToolMcpRequireApprovalUnion
- func (u ResponseNewParamsToolUnion) GetSearchContextSize() *string
- func (u ResponseNewParamsToolUnion) GetServerLabel() *string
- func (u ResponseNewParamsToolUnion) GetServerURL() *string
- func (u ResponseNewParamsToolUnion) GetStrict() *bool
- func (u ResponseNewParamsToolUnion) GetType() *string
- func (u ResponseNewParamsToolUnion) GetVectorStoreIDs() []string
- func (u ResponseNewParamsToolUnion) MarshalJSON() ([]byte, error)
- func (u *ResponseNewParamsToolUnion) UnmarshalJSON(data []byte) error
- type ResponseObject
- type ResponseObjectError
- type ResponseObjectOutputFileSearchCall
- type ResponseObjectOutputFileSearchCallResult
- type ResponseObjectOutputFileSearchCallResultAttributeUnion
- func (u ResponseObjectOutputFileSearchCallResultAttributeUnion) AsAnyArray() (v []any)
- func (u ResponseObjectOutputFileSearchCallResultAttributeUnion) AsBool() (v bool)
- func (u ResponseObjectOutputFileSearchCallResultAttributeUnion) AsFloat() (v float64)
- func (u ResponseObjectOutputFileSearchCallResultAttributeUnion) AsString() (v string)
- func (u ResponseObjectOutputFileSearchCallResultAttributeUnion) RawJSON() string
- func (r *ResponseObjectOutputFileSearchCallResultAttributeUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectOutputFunctionCall
- type ResponseObjectOutputMcpCall
- type ResponseObjectOutputMcpListTools
- type ResponseObjectOutputMcpListToolsTool
- type ResponseObjectOutputMcpListToolsToolInputSchemaUnion
- func (u ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsAnyArray() (v []any)
- func (u ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsBool() (v bool)
- func (u ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsFloat() (v float64)
- func (u ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsString() (v string)
- func (u ResponseObjectOutputMcpListToolsToolInputSchemaUnion) RawJSON() string
- func (r *ResponseObjectOutputMcpListToolsToolInputSchemaUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectOutputMessage
- type ResponseObjectOutputMessageContentArrayItem
- type ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation
- type ResponseObjectOutputMessageContentArrayItemAnnotationFileCitation
- type ResponseObjectOutputMessageContentArrayItemAnnotationFilePath
- type ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation
- type ResponseObjectOutputMessageContentArrayItemAnnotationUnion
- func (u ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsAny() anyResponseObjectOutputMessageContentArrayItemAnnotation
- func (u ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsContainerFileCitation() (v ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation)
- func (u ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsFileCitation() (v ResponseObjectOutputMessageContentArrayItemAnnotationFileCitation)
- func (u ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsFilePath() (v ResponseObjectOutputMessageContentArrayItemAnnotationFilePath)
- func (u ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsURLCitation() (v ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation)
- func (u ResponseObjectOutputMessageContentArrayItemAnnotationUnion) RawJSON() string
- func (r *ResponseObjectOutputMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectOutputMessageContentArrayItemDetail
- type ResponseObjectOutputMessageContentArrayItemInputImage
- type ResponseObjectOutputMessageContentArrayItemInputImageDetail
- type ResponseObjectOutputMessageContentArrayItemInputText
- type ResponseObjectOutputMessageContentArrayItemUnion
- func (u ResponseObjectOutputMessageContentArrayItemUnion) AsAny() anyResponseObjectOutputMessageContentArrayItem
- func (u ResponseObjectOutputMessageContentArrayItemUnion) AsInputImage() (v ResponseObjectOutputMessageContentArrayItemInputImage)
- func (u ResponseObjectOutputMessageContentArrayItemUnion) AsInputText() (v ResponseObjectOutputMessageContentArrayItemInputText)
- func (u ResponseObjectOutputMessageContentArrayItemUnion) RawJSON() string
- func (r *ResponseObjectOutputMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectOutputMessageContentUnion
- func (u ResponseObjectOutputMessageContentUnion) AsResponseObjectOutputMessageContentArray() (v []ResponseObjectOutputMessageContentArrayItemUnion)
- func (u ResponseObjectOutputMessageContentUnion) AsString() (v string)
- func (u ResponseObjectOutputMessageContentUnion) AsVariant2() (v []ResponseObjectOutputMessageContentArrayItem)
- func (u ResponseObjectOutputMessageContentUnion) RawJSON() string
- func (r *ResponseObjectOutputMessageContentUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectOutputMessageRole
- type ResponseObjectOutputRole
- type ResponseObjectOutputUnion
- func (u ResponseObjectOutputUnion) AsAny() anyResponseObjectOutput
- func (u ResponseObjectOutputUnion) AsFileSearchCall() (v ResponseObjectOutputFileSearchCall)
- func (u ResponseObjectOutputUnion) AsFunctionCall() (v ResponseObjectOutputFunctionCall)
- func (u ResponseObjectOutputUnion) AsMcpCall() (v ResponseObjectOutputMcpCall)
- func (u ResponseObjectOutputUnion) AsMcpListTools() (v ResponseObjectOutputMcpListTools)
- func (u ResponseObjectOutputUnion) AsMessage() (v ResponseObjectOutputMessage)
- func (u ResponseObjectOutputUnion) AsWebSearchCall() (v ResponseObjectOutputWebSearchCall)
- func (u ResponseObjectOutputUnion) RawJSON() string
- func (r *ResponseObjectOutputUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectOutputWebSearchCall
- type ResponseObjectStreamResponseCompleted
- type ResponseObjectStreamResponseContentPartAdded
- type ResponseObjectStreamResponseContentPartAddedPartOutputText
- type ResponseObjectStreamResponseContentPartAddedPartRefusal
- type ResponseObjectStreamResponseContentPartAddedPartUnion
- func (u ResponseObjectStreamResponseContentPartAddedPartUnion) AsAny() anyResponseObjectStreamResponseContentPartAddedPart
- func (u ResponseObjectStreamResponseContentPartAddedPartUnion) AsOutputText() (v ResponseObjectStreamResponseContentPartAddedPartOutputText)
- func (u ResponseObjectStreamResponseContentPartAddedPartUnion) AsRefusal() (v ResponseObjectStreamResponseContentPartAddedPartRefusal)
- func (u ResponseObjectStreamResponseContentPartAddedPartUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseContentPartAddedPartUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseContentPartDone
- type ResponseObjectStreamResponseContentPartDonePartOutputText
- type ResponseObjectStreamResponseContentPartDonePartRefusal
- type ResponseObjectStreamResponseContentPartDonePartUnion
- func (u ResponseObjectStreamResponseContentPartDonePartUnion) AsAny() anyResponseObjectStreamResponseContentPartDonePart
- func (u ResponseObjectStreamResponseContentPartDonePartUnion) AsOutputText() (v ResponseObjectStreamResponseContentPartDonePartOutputText)
- func (u ResponseObjectStreamResponseContentPartDonePartUnion) AsRefusal() (v ResponseObjectStreamResponseContentPartDonePartRefusal)
- func (u ResponseObjectStreamResponseContentPartDonePartUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseContentPartDonePartUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseCreated
- type ResponseObjectStreamResponseFunctionCallArgumentsDelta
- type ResponseObjectStreamResponseFunctionCallArgumentsDone
- type ResponseObjectStreamResponseMcpCallArgumentsDelta
- type ResponseObjectStreamResponseMcpCallArgumentsDone
- type ResponseObjectStreamResponseMcpCallCompleted
- type ResponseObjectStreamResponseMcpCallFailed
- type ResponseObjectStreamResponseMcpCallInProgress
- type ResponseObjectStreamResponseMcpListToolsCompleted
- type ResponseObjectStreamResponseMcpListToolsFailed
- type ResponseObjectStreamResponseMcpListToolsInProgress
- type ResponseObjectStreamResponseOutputItemAdded
- type ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall
- type ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult
- type ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion
- func (u ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsAnyArray() (v []any)
- func (u ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsBool() (v bool)
- func (u ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsFloat() (v float64)
- func (u ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsString() (v string)
- func (u ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseOutputItemAddedItemFunctionCall
- type ResponseObjectStreamResponseOutputItemAddedItemMcpCall
- type ResponseObjectStreamResponseOutputItemAddedItemMcpListTools
- type ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool
- type ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion
- func (u ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsAnyArray() (v []any)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsBool() (v bool)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsFloat() (v float64)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsString() (v string)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseOutputItemAddedItemMessage
- type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem
- type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationContainerFileCitation
- type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFileCitation
- type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFilePath
- type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationURLCitation
- type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) AsAny() ...
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) AsContainerFileCitation() (...)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) AsFileCitation() (...)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) AsFilePath() (...)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) AsURLCitation() (...)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemDetail
- type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage
- type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImageDetail
- type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputText
- type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) AsAny() anyResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) AsInputImage() (...)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) AsInputText() (...)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) AsResponseObjectStreamResponseOutputItemAddedItemMessageContentArray() (...)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) AsString() (v string)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) AsVariant2() (v []ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem)
- func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseOutputItemAddedItemMessageRole
- type ResponseObjectStreamResponseOutputItemAddedItemRole
- type ResponseObjectStreamResponseOutputItemAddedItemUnion
- func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) AsAny() anyResponseObjectStreamResponseOutputItemAddedItem
- func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) AsFileSearchCall() (v ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall)
- func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) AsFunctionCall() (v ResponseObjectStreamResponseOutputItemAddedItemFunctionCall)
- func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) AsMcpCall() (v ResponseObjectStreamResponseOutputItemAddedItemMcpCall)
- func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) AsMcpListTools() (v ResponseObjectStreamResponseOutputItemAddedItemMcpListTools)
- func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) AsMessage() (v ResponseObjectStreamResponseOutputItemAddedItemMessage)
- func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) AsWebSearchCall() (v ResponseObjectStreamResponseOutputItemAddedItemWebSearchCall)
- func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseOutputItemAddedItemUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseOutputItemAddedItemWebSearchCall
- type ResponseObjectStreamResponseOutputItemDone
- type ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall
- type ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult
- type ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion
- func (u ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsAnyArray() (v []any)
- func (u ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsBool() (v bool)
- func (u ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsFloat() (v float64)
- func (u ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsString() (v string)
- func (u ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseOutputItemDoneItemFunctionCall
- type ResponseObjectStreamResponseOutputItemDoneItemMcpCall
- type ResponseObjectStreamResponseOutputItemDoneItemMcpListTools
- type ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool
- type ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion
- func (u ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsAnyArray() (v []any)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsBool() (v bool)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsFloat() (v float64)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsString() (v string)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseOutputItemDoneItemMessage
- type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem
- type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationContainerFileCitation
- type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFileCitation
- type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFilePath
- type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationURLCitation
- type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) AsAny() ...
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) AsContainerFileCitation() (...)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) AsFileCitation() (...)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) AsFilePath() (...)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) AsURLCitation() (...)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemDetail
- type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage
- type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImageDetail
- type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputText
- type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) AsAny() anyResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) AsInputImage() (...)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) AsInputText() (...)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) AsResponseObjectStreamResponseOutputItemDoneItemMessageContentArray() (v []ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) AsString() (v string)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) AsVariant2() (v []ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem)
- func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseOutputItemDoneItemMessageRole
- type ResponseObjectStreamResponseOutputItemDoneItemRole
- type ResponseObjectStreamResponseOutputItemDoneItemUnion
- func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsAny() anyResponseObjectStreamResponseOutputItemDoneItem
- func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsFileSearchCall() (v ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall)
- func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsFunctionCall() (v ResponseObjectStreamResponseOutputItemDoneItemFunctionCall)
- func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMcpCall() (v ResponseObjectStreamResponseOutputItemDoneItemMcpCall)
- func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMcpListTools() (v ResponseObjectStreamResponseOutputItemDoneItemMcpListTools)
- func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMessage() (v ResponseObjectStreamResponseOutputItemDoneItemMessage)
- func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsWebSearchCall() (v ResponseObjectStreamResponseOutputItemDoneItemWebSearchCall)
- func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) RawJSON() string
- func (r *ResponseObjectStreamResponseOutputItemDoneItemUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamResponseOutputItemDoneItemWebSearchCall
- type ResponseObjectStreamResponseOutputTextDelta
- type ResponseObjectStreamResponseOutputTextDone
- type ResponseObjectStreamResponseWebSearchCallCompleted
- type ResponseObjectStreamResponseWebSearchCallInProgress
- type ResponseObjectStreamResponseWebSearchCallSearching
- type ResponseObjectStreamUnion
- func (u ResponseObjectStreamUnion) AsAny() anyResponseObjectStream
- func (u ResponseObjectStreamUnion) AsResponseCompleted() (v ResponseObjectStreamResponseCompleted)
- func (u ResponseObjectStreamUnion) AsResponseContentPartAdded() (v ResponseObjectStreamResponseContentPartAdded)
- func (u ResponseObjectStreamUnion) AsResponseContentPartDone() (v ResponseObjectStreamResponseContentPartDone)
- func (u ResponseObjectStreamUnion) AsResponseCreated() (v ResponseObjectStreamResponseCreated)
- func (u ResponseObjectStreamUnion) AsResponseFunctionCallArgumentsDelta() (v ResponseObjectStreamResponseFunctionCallArgumentsDelta)
- func (u ResponseObjectStreamUnion) AsResponseFunctionCallArgumentsDone() (v ResponseObjectStreamResponseFunctionCallArgumentsDone)
- func (u ResponseObjectStreamUnion) AsResponseMcpCallArgumentsDelta() (v ResponseObjectStreamResponseMcpCallArgumentsDelta)
- func (u ResponseObjectStreamUnion) AsResponseMcpCallArgumentsDone() (v ResponseObjectStreamResponseMcpCallArgumentsDone)
- func (u ResponseObjectStreamUnion) AsResponseMcpCallCompleted() (v ResponseObjectStreamResponseMcpCallCompleted)
- func (u ResponseObjectStreamUnion) AsResponseMcpCallFailed() (v ResponseObjectStreamResponseMcpCallFailed)
- func (u ResponseObjectStreamUnion) AsResponseMcpCallInProgress() (v ResponseObjectStreamResponseMcpCallInProgress)
- func (u ResponseObjectStreamUnion) AsResponseMcpListToolsCompleted() (v ResponseObjectStreamResponseMcpListToolsCompleted)
- func (u ResponseObjectStreamUnion) AsResponseMcpListToolsFailed() (v ResponseObjectStreamResponseMcpListToolsFailed)
- func (u ResponseObjectStreamUnion) AsResponseMcpListToolsInProgress() (v ResponseObjectStreamResponseMcpListToolsInProgress)
- func (u ResponseObjectStreamUnion) AsResponseOutputItemAdded() (v ResponseObjectStreamResponseOutputItemAdded)
- func (u ResponseObjectStreamUnion) AsResponseOutputItemDone() (v ResponseObjectStreamResponseOutputItemDone)
- func (u ResponseObjectStreamUnion) AsResponseOutputTextDelta() (v ResponseObjectStreamResponseOutputTextDelta)
- func (u ResponseObjectStreamUnion) AsResponseOutputTextDone() (v ResponseObjectStreamResponseOutputTextDone)
- func (u ResponseObjectStreamUnion) AsResponseWebSearchCallCompleted() (v ResponseObjectStreamResponseWebSearchCallCompleted)
- func (u ResponseObjectStreamUnion) AsResponseWebSearchCallInProgress() (v ResponseObjectStreamResponseWebSearchCallInProgress)
- func (u ResponseObjectStreamUnion) AsResponseWebSearchCallSearching() (v ResponseObjectStreamResponseWebSearchCallSearching)
- func (u ResponseObjectStreamUnion) RawJSON() string
- func (r *ResponseObjectStreamUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectStreamUnionItem
- type ResponseObjectStreamUnionItemContent
- type ResponseObjectStreamUnionItemResults
- type ResponseObjectStreamUnionItemTools
- type ResponseObjectStreamUnionPart
- type ResponseObjectText
- type ResponseObjectTextFormat
- type ResponseObjectTextFormatSchemaUnion
- func (u ResponseObjectTextFormatSchemaUnion) AsAnyArray() (v []any)
- func (u ResponseObjectTextFormatSchemaUnion) AsBool() (v bool)
- func (u ResponseObjectTextFormatSchemaUnion) AsFloat() (v float64)
- func (u ResponseObjectTextFormatSchemaUnion) AsString() (v string)
- func (u ResponseObjectTextFormatSchemaUnion) RawJSON() string
- func (r *ResponseObjectTextFormatSchemaUnion) UnmarshalJSON(data []byte) error
- type ResponseObjectTextFormatType
- type ResponseService
- func (r *ResponseService) Get(ctx context.Context, responseID string, opts ...option.RequestOption) (res *ResponseObject, err error)
- func (r *ResponseService) List(ctx context.Context, query ResponseListParams, opts ...option.RequestOption) (res *pagination.OpenAICursorPage[ResponseListResponse], err error)
- func (r *ResponseService) ListAutoPaging(ctx context.Context, query ResponseListParams, opts ...option.RequestOption) *pagination.OpenAICursorPageAutoPager[ResponseListResponse]
- func (r *ResponseService) New(ctx context.Context, body ResponseNewParams, opts ...option.RequestOption) (res *ResponseObject, err error)
- func (r *ResponseService) NewStreaming(ctx context.Context, body ResponseNewParams, opts ...option.RequestOption) (stream *ssestream.Stream[ResponseObjectStreamUnion])
- type ReturnType
- type ReturnTypeParam
- type ReturnTypeType
- type RouteInfo
- type RouteService
- type RunShieldResponse
- type SafetyRunShieldParams
- type SafetyRunShieldParamsParamUnion
- type SafetyService
- type SafetyViolation
- type SafetyViolationMetadataUnion
- type SafetyViolationViolationLevel
- type SamplingParams
- type SamplingParamsResp
- type SamplingParamsStrategyGreedy
- type SamplingParamsStrategyGreedyResp
- type SamplingParamsStrategyTopK
- type SamplingParamsStrategyTopKResp
- type SamplingParamsStrategyTopP
- type SamplingParamsStrategyTopPResp
- type SamplingParamsStrategyUnion
- type SamplingParamsStrategyUnionResp
- type ScoringFn
- type ScoringFnMetadataUnion
- func (u ScoringFnMetadataUnion) AsAnyArray() (v []any)
- func (u ScoringFnMetadataUnion) AsBool() (v bool)
- func (u ScoringFnMetadataUnion) AsFloat() (v float64)
- func (u ScoringFnMetadataUnion) AsString() (v string)
- func (u ScoringFnMetadataUnion) RawJSON() string
- func (r *ScoringFnMetadataUnion) UnmarshalJSON(data []byte) error
- type ScoringFnParamsBasic
- type ScoringFnParamsBasicResp
- type ScoringFnParamsLlmAsJudge
- type ScoringFnParamsLlmAsJudgeResp
- type ScoringFnParamsRegexParser
- type ScoringFnParamsRegexParserResp
- type ScoringFnParamsUnion
- func ScoringFnParamsOfBasic(aggregationFunctions []string) ScoringFnParamsUnion
- func ScoringFnParamsOfLlmAsJudge(aggregationFunctions []string, judgeModel string, judgeScoreRegexes []string) ScoringFnParamsUnion
- func ScoringFnParamsOfRegexParser(aggregationFunctions []string, parsingRegexes []string) ScoringFnParamsUnion
- func (u ScoringFnParamsUnion) GetAggregationFunctions() []string
- func (u ScoringFnParamsUnion) GetJudgeModel() *string
- func (u ScoringFnParamsUnion) GetJudgeScoreRegexes() []string
- func (u ScoringFnParamsUnion) GetParsingRegexes() []string
- func (u ScoringFnParamsUnion) GetPromptTemplate() *string
- func (u ScoringFnParamsUnion) GetType() *string
- func (u ScoringFnParamsUnion) MarshalJSON() ([]byte, error)
- func (u *ScoringFnParamsUnion) UnmarshalJSON(data []byte) error
- type ScoringFnParamsUnionResp
- func (u ScoringFnParamsUnionResp) AsAny() anyScoringFnParamsResp
- func (u ScoringFnParamsUnionResp) AsBasic() (v ScoringFnParamsBasicResp)
- func (u ScoringFnParamsUnionResp) AsLlmAsJudge() (v ScoringFnParamsLlmAsJudgeResp)
- func (u ScoringFnParamsUnionResp) AsRegexParser() (v ScoringFnParamsRegexParserResp)
- func (u ScoringFnParamsUnionResp) RawJSON() string
- func (r ScoringFnParamsUnionResp) ToParam() ScoringFnParamsUnion
- func (r *ScoringFnParamsUnionResp) UnmarshalJSON(data []byte) error
- type ScoringFunctionRegisterParams
- type ScoringFunctionService
- func (r *ScoringFunctionService) Get(ctx context.Context, scoringFnID string, opts ...option.RequestOption) (res *ScoringFn, err error)
- func (r *ScoringFunctionService) List(ctx context.Context, opts ...option.RequestOption) (res *[]ScoringFn, err error)
- func (r *ScoringFunctionService) Register(ctx context.Context, body ScoringFunctionRegisterParams, ...) (err error)
- type ScoringResult
- type ScoringResultAggregatedResultUnion
- type ScoringResultScoreRowUnion
- type ScoringScoreBatchParams
- type ScoringScoreBatchResponse
- type ScoringScoreParams
- type ScoringScoreParamsInputRowUnion
- type ScoringScoreResponse
- type ScoringService
- type Session
- type SharedCompletionResponse
- type SharedCompletionResponseLogprob
- type SharedCompletionResponseMetric
- type SharedCompletionResponseStopReason
- type SharedToolDef
- type SharedToolDefMetadataUnion
- type SharedToolDefMetadataUnionParam
- type SharedToolDefParam
- type SharedToolDefParameter
- type SharedToolDefParameterDefaultUnion
- type SharedToolDefParameterDefaultUnionParam
- type SharedToolDefParameterParam
- type Shield
- type ShieldCallStep
- type ShieldParamUnion
- type ShieldRegisterParams
- type ShieldRegisterParamsParamUnion
- type ShieldService
- func (r *ShieldService) Get(ctx context.Context, identifier string, opts ...option.RequestOption) (res *Shield, err error)
- func (r *ShieldService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Shield, err error)
- func (r *ShieldService) Register(ctx context.Context, body ShieldRegisterParams, opts ...option.RequestOption) (res *Shield, err error)
- type SpanWithStatus
- type SpanWithStatusAttributeUnion
- func (u SpanWithStatusAttributeUnion) AsAnyArray() (v []any)
- func (u SpanWithStatusAttributeUnion) AsBool() (v bool)
- func (u SpanWithStatusAttributeUnion) AsFloat() (v float64)
- func (u SpanWithStatusAttributeUnion) AsString() (v string)
- func (u SpanWithStatusAttributeUnion) RawJSON() string
- func (r *SpanWithStatusAttributeUnion) UnmarshalJSON(data []byte) error
- type SpanWithStatusStatus
- type SyntheticDataGenerationGenerateParams
- type SyntheticDataGenerationGenerateParamsFilteringFunction
- type SyntheticDataGenerationResponse
- type SyntheticDataGenerationResponseStatisticUnion
- func (u SyntheticDataGenerationResponseStatisticUnion) AsAnyArray() (v []any)
- func (u SyntheticDataGenerationResponseStatisticUnion) AsBool() (v bool)
- func (u SyntheticDataGenerationResponseStatisticUnion) AsFloat() (v float64)
- func (u SyntheticDataGenerationResponseStatisticUnion) AsString() (v string)
- func (u SyntheticDataGenerationResponseStatisticUnion) RawJSON() string
- func (r *SyntheticDataGenerationResponseStatisticUnion) UnmarshalJSON(data []byte) error
- type SyntheticDataGenerationResponseSyntheticDataUnion
- func (u SyntheticDataGenerationResponseSyntheticDataUnion) AsAnyArray() (v []any)
- func (u SyntheticDataGenerationResponseSyntheticDataUnion) AsBool() (v bool)
- func (u SyntheticDataGenerationResponseSyntheticDataUnion) AsFloat() (v float64)
- func (u SyntheticDataGenerationResponseSyntheticDataUnion) AsString() (v string)
- func (u SyntheticDataGenerationResponseSyntheticDataUnion) RawJSON() string
- func (r *SyntheticDataGenerationResponseSyntheticDataUnion) UnmarshalJSON(data []byte) error
- type SyntheticDataGenerationService
- type SystemMessageParam
- type TelemetryGetSpanParams
- type TelemetryGetSpanResponse
- type TelemetryGetSpanResponseAttributeUnion
- func (u TelemetryGetSpanResponseAttributeUnion) AsAnyArray() (v []any)
- func (u TelemetryGetSpanResponseAttributeUnion) AsBool() (v bool)
- func (u TelemetryGetSpanResponseAttributeUnion) AsFloat() (v float64)
- func (u TelemetryGetSpanResponseAttributeUnion) AsString() (v string)
- func (u TelemetryGetSpanResponseAttributeUnion) RawJSON() string
- func (r *TelemetryGetSpanResponseAttributeUnion) UnmarshalJSON(data []byte) error
- type TelemetryGetSpanTreeParams
- type TelemetryGetSpanTreeResponse
- type TelemetryGetSpanTreeResponseEnvelope
- type TelemetryLogEventParams
- type TelemetryQuerySpansParams
- type TelemetryQueryTracesParams
- type TelemetryQueryTracesResponseEnvelope
- type TelemetrySaveSpansToDatasetParams
- type TelemetryService
- func (r *TelemetryService) GetSpan(ctx context.Context, spanID string, query TelemetryGetSpanParams, ...) (res *TelemetryGetSpanResponse, err error)
- func (r *TelemetryService) GetSpanTree(ctx context.Context, spanID string, body TelemetryGetSpanTreeParams, ...) (res *TelemetryGetSpanTreeResponse, err error)
- func (r *TelemetryService) GetTrace(ctx context.Context, traceID string, opts ...option.RequestOption) (res *Trace, err error)
- func (r *TelemetryService) LogEvent(ctx context.Context, body TelemetryLogEventParams, ...) (err error)
- func (r *TelemetryService) QuerySpans(ctx context.Context, body TelemetryQuerySpansParams, ...) (res *[]QuerySpansResponseData, err error)
- func (r *TelemetryService) QueryTraces(ctx context.Context, body TelemetryQueryTracesParams, ...) (res *[]Trace, err error)
- func (r *TelemetryService) SaveSpansToDataset(ctx context.Context, body TelemetrySaveSpansToDatasetParams, ...) (err error)
- type Tool
- type ToolCall
- type ToolCallArgumentsMapItemArrayItemUnion
- type ToolCallArgumentsMapItemArrayItemUnionParam
- type ToolCallArgumentsMapItemMapItemUnion
- type ToolCallArgumentsMapItemMapItemUnionParam
- type ToolCallArgumentsMapItemUnion
- type ToolCallArgumentsMapItemUnionParam
- type ToolCallArgumentsUnion
- type ToolCallArgumentsUnionParam
- type ToolCallOrStringUnion
- type ToolCallParam
- type ToolCallToolName
- type ToolExecutionStep
- type ToolGroup
- type ToolGroupArgUnion
- type ToolGroupMcpEndpoint
- type ToolInvocationResult
- type ToolInvocationResultMetadataUnion
- func (u ToolInvocationResultMetadataUnion) AsAnyArray() (v []any)
- func (u ToolInvocationResultMetadataUnion) AsBool() (v bool)
- func (u ToolInvocationResultMetadataUnion) AsFloat() (v float64)
- func (u ToolInvocationResultMetadataUnion) AsString() (v string)
- func (u ToolInvocationResultMetadataUnion) RawJSON() string
- func (r *ToolInvocationResultMetadataUnion) UnmarshalJSON(data []byte) error
- type ToolListParams
- type ToolMetadataUnion
- type ToolParamDefinition
- type ToolParamDefinitionDefaultUnion
- type ToolParameter
- type ToolParameterDefaultUnion
- func (u ToolParameterDefaultUnion) AsAnyArray() (v []any)
- func (u ToolParameterDefaultUnion) AsBool() (v bool)
- func (u ToolParameterDefaultUnion) AsFloat() (v float64)
- func (u ToolParameterDefaultUnion) AsString() (v string)
- func (u ToolParameterDefaultUnion) RawJSON() string
- func (r *ToolParameterDefaultUnion) UnmarshalJSON(data []byte) error
- type ToolResponse
- type ToolResponseMessage
- type ToolResponseMessageParam
- type ToolResponseMetadataUnion
- func (u ToolResponseMetadataUnion) AsAnyArray() (v []any)
- func (u ToolResponseMetadataUnion) AsBool() (v bool)
- func (u ToolResponseMetadataUnion) AsFloat() (v float64)
- func (u ToolResponseMetadataUnion) AsString() (v string)
- func (u ToolResponseMetadataUnion) RawJSON() string
- func (r *ToolResponseMetadataUnion) UnmarshalJSON(data []byte) error
- type ToolResponseMetadataUnionParam
- type ToolResponseParam
- type ToolResponseToolName
- type ToolRuntimeInvokeToolParams
- type ToolRuntimeInvokeToolParamsKwargUnion
- type ToolRuntimeListToolsParams
- type ToolRuntimeListToolsParamsMcpEndpoint
- type ToolRuntimeListToolsResponseEnvelope
- type ToolRuntimeRagToolInsertParams
- type ToolRuntimeRagToolQueryParams
- type ToolRuntimeRagToolService
- type ToolRuntimeService
- type ToolService
- type ToolgroupRegisterParams
- type ToolgroupRegisterParamsArgUnion
- type ToolgroupRegisterParamsMcpEndpoint
- type ToolgroupService
- func (r *ToolgroupService) Get(ctx context.Context, toolgroupID string, opts ...option.RequestOption) (res *ToolGroup, err error)
- func (r *ToolgroupService) List(ctx context.Context, opts ...option.RequestOption) (res *[]ToolGroup, err error)
- func (r *ToolgroupService) Register(ctx context.Context, body ToolgroupRegisterParams, ...) (err error)
- func (r *ToolgroupService) Unregister(ctx context.Context, toolgroupID string, opts ...option.RequestOption) (err error)
- type Trace
- type Turn
- type TurnInputMessageUnion
- type TurnOutputAttachment
- type TurnOutputAttachmentContentImageContentItem
- type TurnOutputAttachmentContentImageContentItemImage
- type TurnOutputAttachmentContentImageContentItemImageURL
- type TurnOutputAttachmentContentTextContentItem
- type TurnOutputAttachmentContentURL
- type TurnOutputAttachmentContentUnion
- func (u TurnOutputAttachmentContentUnion) AsImageContentItem() (v TurnOutputAttachmentContentImageContentItem)
- func (u TurnOutputAttachmentContentUnion) AsInterleavedContentItemArray() (v []shared.InterleavedContentItemUnion)
- func (u TurnOutputAttachmentContentUnion) AsString() (v string)
- func (u TurnOutputAttachmentContentUnion) AsTextContentItem() (v TurnOutputAttachmentContentTextContentItem)
- func (u TurnOutputAttachmentContentUnion) AsURL() (v TurnOutputAttachmentContentURL)
- func (u TurnOutputAttachmentContentUnion) RawJSON() string
- func (r *TurnOutputAttachmentContentUnion) UnmarshalJSON(data []byte) error
- type TurnResponseEvent
- type TurnResponseEventPayloadStepComplete
- type TurnResponseEventPayloadStepCompleteStepDetailsUnion
- func (u TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsAny() anyTurnResponseEventPayloadStepCompleteStepDetails
- func (u TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsInference() (v InferenceStep)
- func (u TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsMemoryRetrieval() (v MemoryRetrievalStep)
- func (u TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsShieldCall() (v ShieldCallStep)
- func (u TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsToolExecution() (v ToolExecutionStep)
- func (u TurnResponseEventPayloadStepCompleteStepDetailsUnion) RawJSON() string
- func (r *TurnResponseEventPayloadStepCompleteStepDetailsUnion) UnmarshalJSON(data []byte) error
- type TurnResponseEventPayloadStepProgress
- type TurnResponseEventPayloadStepStart
- type TurnResponseEventPayloadStepStartMetadataUnion
- func (u TurnResponseEventPayloadStepStartMetadataUnion) AsAnyArray() (v []any)
- func (u TurnResponseEventPayloadStepStartMetadataUnion) AsBool() (v bool)
- func (u TurnResponseEventPayloadStepStartMetadataUnion) AsFloat() (v float64)
- func (u TurnResponseEventPayloadStepStartMetadataUnion) AsString() (v string)
- func (u TurnResponseEventPayloadStepStartMetadataUnion) RawJSON() string
- func (r *TurnResponseEventPayloadStepStartMetadataUnion) UnmarshalJSON(data []byte) error
- type TurnResponseEventPayloadTurnAwaitingInput
- type TurnResponseEventPayloadTurnComplete
- type TurnResponseEventPayloadTurnStart
- type TurnResponseEventPayloadUnion
- func (u TurnResponseEventPayloadUnion) AsAny() anyTurnResponseEventPayload
- func (u TurnResponseEventPayloadUnion) AsStepComplete() (v TurnResponseEventPayloadStepComplete)
- func (u TurnResponseEventPayloadUnion) AsStepProgress() (v TurnResponseEventPayloadStepProgress)
- func (u TurnResponseEventPayloadUnion) AsStepStart() (v TurnResponseEventPayloadStepStart)
- func (u TurnResponseEventPayloadUnion) AsTurnAwaitingInput() (v TurnResponseEventPayloadTurnAwaitingInput)
- func (u TurnResponseEventPayloadUnion) AsTurnComplete() (v TurnResponseEventPayloadTurnComplete)
- func (u TurnResponseEventPayloadUnion) AsTurnStart() (v TurnResponseEventPayloadTurnStart)
- func (u TurnResponseEventPayloadUnion) RawJSON() string
- func (r *TurnResponseEventPayloadUnion) UnmarshalJSON(data []byte) error
- type TurnStepUnion
- func (u TurnStepUnion) AsAny() anyTurnStep
- func (u TurnStepUnion) AsInference() (v InferenceStep)
- func (u TurnStepUnion) AsMemoryRetrieval() (v MemoryRetrievalStep)
- func (u TurnStepUnion) AsShieldCall() (v ShieldCallStep)
- func (u TurnStepUnion) AsToolExecution() (v ToolExecutionStep)
- func (u TurnStepUnion) RawJSON() string
- func (r *TurnStepUnion) UnmarshalJSON(data []byte) error
- type UserMessage
- type UserMessageParam
- type VectorDBGetResponse
- type VectorDBRegisterParams
- type VectorDBRegisterResponse
- type VectorDBService
- func (r *VectorDBService) Get(ctx context.Context, vectorDBID string, opts ...option.RequestOption) (res *VectorDBGetResponse, err error)
- func (r *VectorDBService) List(ctx context.Context, opts ...option.RequestOption) (res *[]ListVectorDBsResponseData, err error)
- func (r *VectorDBService) Register(ctx context.Context, body VectorDBRegisterParams, opts ...option.RequestOption) (res *VectorDBRegisterResponse, err error)
- func (r *VectorDBService) Unregister(ctx context.Context, vectorDBID string, opts ...option.RequestOption) (err error)
- type VectorIoInsertParams
- type VectorIoInsertParamsChunk
- type VectorIoInsertParamsChunkChunkMetadata
- type VectorIoInsertParamsChunkMetadataUnion
- type VectorIoQueryParams
- type VectorIoQueryParamsParamUnion
- type VectorIoService
- type VectorStore
- type VectorStoreDeleteResponse
- type VectorStoreExpiresAfterUnion
- func (u VectorStoreExpiresAfterUnion) AsAnyArray() (v []any)
- func (u VectorStoreExpiresAfterUnion) AsBool() (v bool)
- func (u VectorStoreExpiresAfterUnion) AsFloat() (v float64)
- func (u VectorStoreExpiresAfterUnion) AsString() (v string)
- func (u VectorStoreExpiresAfterUnion) RawJSON() string
- func (r *VectorStoreExpiresAfterUnion) UnmarshalJSON(data []byte) error
- type VectorStoreFile
- type VectorStoreFileAttributeUnion
- func (u VectorStoreFileAttributeUnion) AsAnyArray() (v []any)
- func (u VectorStoreFileAttributeUnion) AsBool() (v bool)
- func (u VectorStoreFileAttributeUnion) AsFloat() (v float64)
- func (u VectorStoreFileAttributeUnion) AsString() (v string)
- func (u VectorStoreFileAttributeUnion) RawJSON() string
- func (r *VectorStoreFileAttributeUnion) UnmarshalJSON(data []byte) error
- type VectorStoreFileChunkingStrategyAuto
- type VectorStoreFileChunkingStrategyStatic
- type VectorStoreFileChunkingStrategyStaticStatic
- type VectorStoreFileChunkingStrategyUnion
- func (u VectorStoreFileChunkingStrategyUnion) AsAny() anyVectorStoreFileChunkingStrategy
- func (u VectorStoreFileChunkingStrategyUnion) AsAuto() (v VectorStoreFileChunkingStrategyAuto)
- func (u VectorStoreFileChunkingStrategyUnion) AsStatic() (v VectorStoreFileChunkingStrategyStatic)
- func (u VectorStoreFileChunkingStrategyUnion) RawJSON() string
- func (r *VectorStoreFileChunkingStrategyUnion) UnmarshalJSON(data []byte) error
- type VectorStoreFileContentParams
- type VectorStoreFileContentResponse
- type VectorStoreFileContentResponseAttributeUnion
- func (u VectorStoreFileContentResponseAttributeUnion) AsAnyArray() (v []any)
- func (u VectorStoreFileContentResponseAttributeUnion) AsBool() (v bool)
- func (u VectorStoreFileContentResponseAttributeUnion) AsFloat() (v float64)
- func (u VectorStoreFileContentResponseAttributeUnion) AsString() (v string)
- func (u VectorStoreFileContentResponseAttributeUnion) RawJSON() string
- func (r *VectorStoreFileContentResponseAttributeUnion) UnmarshalJSON(data []byte) error
- type VectorStoreFileContentResponseContent
- type VectorStoreFileCounts
- type VectorStoreFileDeleteParams
- type VectorStoreFileDeleteResponse
- type VectorStoreFileGetParams
- type VectorStoreFileLastError
- type VectorStoreFileLastErrorCode
- type VectorStoreFileListParams
- type VectorStoreFileListParamsFilter
- type VectorStoreFileNewParams
- type VectorStoreFileNewParamsAttributeUnion
- type VectorStoreFileNewParamsChunkingStrategyAuto
- type VectorStoreFileNewParamsChunkingStrategyStatic
- type VectorStoreFileNewParamsChunkingStrategyStaticStatic
- type VectorStoreFileNewParamsChunkingStrategyUnion
- func (u VectorStoreFileNewParamsChunkingStrategyUnion) GetStatic() *VectorStoreFileNewParamsChunkingStrategyStaticStatic
- func (u VectorStoreFileNewParamsChunkingStrategyUnion) GetType() *string
- func (u VectorStoreFileNewParamsChunkingStrategyUnion) MarshalJSON() ([]byte, error)
- func (u *VectorStoreFileNewParamsChunkingStrategyUnion) UnmarshalJSON(data []byte) error
- type VectorStoreFileService
- func (r *VectorStoreFileService) Content(ctx context.Context, fileID string, query VectorStoreFileContentParams, ...) (res *VectorStoreFileContentResponse, err error)
- func (r *VectorStoreFileService) Delete(ctx context.Context, fileID string, body VectorStoreFileDeleteParams, ...) (res *VectorStoreFileDeleteResponse, err error)
- func (r *VectorStoreFileService) Get(ctx context.Context, fileID string, query VectorStoreFileGetParams, ...) (res *VectorStoreFile, err error)
- func (r *VectorStoreFileService) List(ctx context.Context, vectorStoreID string, query VectorStoreFileListParams, ...) (res *pagination.OpenAICursorPage[VectorStoreFile], err error)
- func (r *VectorStoreFileService) ListAutoPaging(ctx context.Context, vectorStoreID string, query VectorStoreFileListParams, ...) *pagination.OpenAICursorPageAutoPager[VectorStoreFile]
- func (r *VectorStoreFileService) New(ctx context.Context, vectorStoreID string, body VectorStoreFileNewParams, ...) (res *VectorStoreFile, err error)
- func (r *VectorStoreFileService) Update(ctx context.Context, fileID string, params VectorStoreFileUpdateParams, ...) (res *VectorStoreFile, err error)
- type VectorStoreFileStatus
- type VectorStoreFileUpdateParams
- type VectorStoreFileUpdateParamsAttributeUnion
- type VectorStoreListParams
- type VectorStoreMetadataUnion
- func (u VectorStoreMetadataUnion) AsAnyArray() (v []any)
- func (u VectorStoreMetadataUnion) AsBool() (v bool)
- func (u VectorStoreMetadataUnion) AsFloat() (v float64)
- func (u VectorStoreMetadataUnion) AsString() (v string)
- func (u VectorStoreMetadataUnion) RawJSON() string
- func (r *VectorStoreMetadataUnion) UnmarshalJSON(data []byte) error
- type VectorStoreNewParams
- type VectorStoreNewParamsChunkingStrategyUnion
- type VectorStoreNewParamsExpiresAfterUnion
- type VectorStoreNewParamsMetadataUnion
- type VectorStoreSearchParams
- type VectorStoreSearchParamsFilterUnion
- type VectorStoreSearchParamsQueryUnion
- type VectorStoreSearchParamsRankingOptions
- type VectorStoreSearchResponse
- type VectorStoreSearchResponseData
- type VectorStoreSearchResponseDataAttributeUnion
- func (u VectorStoreSearchResponseDataAttributeUnion) AsBool() (v bool)
- func (u VectorStoreSearchResponseDataAttributeUnion) AsFloat() (v float64)
- func (u VectorStoreSearchResponseDataAttributeUnion) AsString() (v string)
- func (u VectorStoreSearchResponseDataAttributeUnion) RawJSON() string
- func (r *VectorStoreSearchResponseDataAttributeUnion) UnmarshalJSON(data []byte) error
- type VectorStoreSearchResponseDataContent
- type VectorStoreService
- func (r *VectorStoreService) Delete(ctx context.Context, vectorStoreID string, opts ...option.RequestOption) (res *VectorStoreDeleteResponse, err error)
- func (r *VectorStoreService) Get(ctx context.Context, vectorStoreID string, opts ...option.RequestOption) (res *VectorStore, err error)
- func (r *VectorStoreService) List(ctx context.Context, query VectorStoreListParams, opts ...option.RequestOption) (res *pagination.OpenAICursorPage[VectorStore], err error)
- func (r *VectorStoreService) ListAutoPaging(ctx context.Context, query VectorStoreListParams, opts ...option.RequestOption) *pagination.OpenAICursorPageAutoPager[VectorStore]
- func (r *VectorStoreService) New(ctx context.Context, body VectorStoreNewParams, opts ...option.RequestOption) (res *VectorStore, err error)
- func (r *VectorStoreService) Search(ctx context.Context, vectorStoreID string, body VectorStoreSearchParams, ...) (res *VectorStoreSearchResponse, err error)
- func (r *VectorStoreService) Update(ctx context.Context, vectorStoreID string, body VectorStoreUpdateParams, ...) (res *VectorStore, err error)
- type VectorStoreUpdateParams
- type VectorStoreUpdateParamsExpiresAfterUnion
- type VectorStoreUpdateParamsMetadataUnion
- type VersionInfo
Constants ¶
const AgentConfigToolChoiceAuto = shared.AgentConfigToolChoiceAuto
Equals "auto"
const AgentConfigToolChoiceNone = shared.AgentConfigToolChoiceNone
Equals "none"
const AgentConfigToolChoiceRequired = shared.AgentConfigToolChoiceRequired
Equals "required"
const AgentConfigToolPromptFormatFunctionTag = shared.AgentConfigToolPromptFormatFunctionTag
Equals "function_tag"
const AgentConfigToolPromptFormatJson = shared.AgentConfigToolPromptFormatJson
Equals "json"
const AgentConfigToolPromptFormatPythonList = shared.AgentConfigToolPromptFormatPythonList
Equals "python_list"
const CompletionMessageStopReasonEndOfMessage = shared.CompletionMessageStopReasonEndOfMessage
Equals "end_of_message"
const CompletionMessageStopReasonEndOfTurn = shared.CompletionMessageStopReasonEndOfTurn
Equals "end_of_turn"
const CompletionMessageStopReasonOutOfTokens = shared.CompletionMessageStopReasonOutOfTokens
Equals "out_of_tokens"
const QueryConfigModeHybrid = shared.QueryConfigModeHybrid
Equals "hybrid"
const QueryConfigModeKeyword = shared.QueryConfigModeKeyword
Equals "keyword"
const QueryConfigModeVector = shared.QueryConfigModeVector
Equals "vector"
const ReturnTypeTypeAgentTurnInput = shared.ReturnTypeTypeAgentTurnInput
Equals "agent_turn_input"
const ReturnTypeTypeArray = shared.ReturnTypeTypeArray
Equals "array"
const ReturnTypeTypeBoolean = shared.ReturnTypeTypeBoolean
Equals "boolean"
const ReturnTypeTypeChatCompletionInput = shared.ReturnTypeTypeChatCompletionInput
Equals "chat_completion_input"
const ReturnTypeTypeCompletionInput = shared.ReturnTypeTypeCompletionInput
Equals "completion_input"
const ReturnTypeTypeJson = shared.ReturnTypeTypeJson
Equals "json"
const ReturnTypeTypeNumber = shared.ReturnTypeTypeNumber
Equals "number"
const ReturnTypeTypeObject = shared.ReturnTypeTypeObject
Equals "object"
const ReturnTypeTypeString = shared.ReturnTypeTypeString
Equals "string"
const ReturnTypeTypeUnion = shared.ReturnTypeTypeUnion
Equals "union"
const SafetyViolationViolationLevelError = shared.SafetyViolationViolationLevelError
Equals "error"
const SafetyViolationViolationLevelInfo = shared.SafetyViolationViolationLevelInfo
Equals "info"
const SafetyViolationViolationLevelWarn = shared.SafetyViolationViolationLevelWarn
Equals "warn"
Equals "end_of_message"
Equals "end_of_turn"
Equals "out_of_tokens"
const ToolCallToolNameBraveSearch = shared.ToolCallToolNameBraveSearch
Equals "brave_search"
const ToolCallToolNameCodeInterpreter = shared.ToolCallToolNameCodeInterpreter
Equals "code_interpreter"
const ToolCallToolNamePhotogen = shared.ToolCallToolNamePhotogen
Equals "photogen"
const ToolCallToolNameWolframAlpha = shared.ToolCallToolNameWolframAlpha
Equals "wolfram_alpha"
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (LLAMA_STACK_CLIENT_API_KEY, LLAMA_STACK_CLIENT_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type AgentConfig ¶
type AgentConfig = shared.AgentConfig
Configuration for an agent.
This is an alias to an internal type.
type AgentConfigParam ¶
type AgentConfigParam = shared.AgentConfigParam
Configuration for an agent.
This is an alias to an internal type.
type AgentConfigToolChoice ¶
type AgentConfigToolChoice = shared.AgentConfigToolChoice
Whether tool use is required or automatic. This is a hint to the model which may not be followed. It depends on the Instruction Following capabilities of the model.
This is an alias to an internal type.
type AgentConfigToolConfig ¶
type AgentConfigToolConfig = shared.AgentConfigToolConfig
Configuration for tool use.
This is an alias to an internal type.
type AgentConfigToolConfigParam ¶
type AgentConfigToolConfigParam = shared.AgentConfigToolConfigParam
Configuration for tool use.
This is an alias to an internal type.
type AgentConfigToolPromptFormat ¶
type AgentConfigToolPromptFormat = shared.AgentConfigToolPromptFormat
Prompt format for calling custom / zero shot tools.
This is an alias to an internal type.
type AgentConfigToolgroupAgentToolGroupWithArgs ¶
type AgentConfigToolgroupAgentToolGroupWithArgs = shared.AgentConfigToolgroupAgentToolGroupWithArgs
This is an alias to an internal type.
type AgentConfigToolgroupAgentToolGroupWithArgsArgUnion ¶
type AgentConfigToolgroupAgentToolGroupWithArgsArgUnion = shared.AgentConfigToolgroupAgentToolGroupWithArgsArgUnion
This is an alias to an internal type.
type AgentConfigToolgroupAgentToolGroupWithArgsArgUnionParam ¶
type AgentConfigToolgroupAgentToolGroupWithArgsArgUnionParam = shared.AgentConfigToolgroupAgentToolGroupWithArgsArgUnionParam
This is an alias to an internal type.
type AgentConfigToolgroupAgentToolGroupWithArgsParam ¶
type AgentConfigToolgroupAgentToolGroupWithArgsParam = shared.AgentConfigToolgroupAgentToolGroupWithArgsParam
This is an alias to an internal type.
type AgentConfigToolgroupUnion ¶
type AgentConfigToolgroupUnion = shared.AgentConfigToolgroupUnion
This is an alias to an internal type.
type AgentConfigToolgroupUnionParam ¶
type AgentConfigToolgroupUnionParam = shared.AgentConfigToolgroupUnionParam
This is an alias to an internal type.
type AgentGetResponse ¶
type AgentGetResponse struct { // Configuration settings for the agent AgentConfig shared.AgentConfig `json:"agent_config,required"` // Unique identifier for the agent AgentID string `json:"agent_id,required"` // Timestamp when the agent was created CreatedAt time.Time `json:"created_at,required" format:"date-time"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AgentConfig respjson.Field AgentID respjson.Field CreatedAt respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
An agent instance with configuration and metadata.
func (AgentGetResponse) RawJSON ¶
func (r AgentGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentGetResponse) UnmarshalJSON ¶
func (r *AgentGetResponse) UnmarshalJSON(data []byte) error
type AgentListParams ¶
type AgentListParams struct { // The number of agents to return. Limit param.Opt[int64] `query:"limit,omitzero" json:"-"` // The index to start the pagination from. StartIndex param.Opt[int64] `query:"start_index,omitzero" json:"-"` // contains filtered or unexported fields }
func (AgentListParams) URLQuery ¶
func (r AgentListParams) URLQuery() (v url.Values, err error)
URLQuery serializes AgentListParams's query parameters as `url.Values`.
type AgentListResponse ¶
type AgentListResponse struct { // The list of items for the current page Data []map[string]AgentListResponseDataUnion `json:"data,required"` // Whether there are more items available after this set HasMore bool `json:"has_more,required"` // The URL for accessing this list URL string `json:"url"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field HasMore respjson.Field URL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A generic paginated response that follows a simple format.
func (AgentListResponse) RawJSON ¶
func (r AgentListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentListResponse) UnmarshalJSON ¶
func (r *AgentListResponse) UnmarshalJSON(data []byte) error
type AgentListResponseDataUnion ¶
type AgentListResponseDataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
AgentListResponseDataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (AgentListResponseDataUnion) AsAnyArray ¶
func (u AgentListResponseDataUnion) AsAnyArray() (v []any)
func (AgentListResponseDataUnion) AsBool ¶
func (u AgentListResponseDataUnion) AsBool() (v bool)
func (AgentListResponseDataUnion) AsFloat ¶
func (u AgentListResponseDataUnion) AsFloat() (v float64)
func (AgentListResponseDataUnion) AsString ¶
func (u AgentListResponseDataUnion) AsString() (v string)
func (AgentListResponseDataUnion) RawJSON ¶
func (u AgentListResponseDataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentListResponseDataUnion) UnmarshalJSON ¶
func (r *AgentListResponseDataUnion) UnmarshalJSON(data []byte) error
type AgentNewParams ¶
type AgentNewParams struct { // The configuration for the agent. AgentConfig shared.AgentConfigParam `json:"agent_config,omitzero,required"` // contains filtered or unexported fields }
func (AgentNewParams) MarshalJSON ¶
func (r AgentNewParams) MarshalJSON() (data []byte, err error)
func (*AgentNewParams) UnmarshalJSON ¶
func (r *AgentNewParams) UnmarshalJSON(data []byte) error
type AgentNewResponse ¶
type AgentNewResponse struct { // Unique identifier for the created agent AgentID string `json:"agent_id,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AgentID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response returned when creating a new agent.
func (AgentNewResponse) RawJSON ¶
func (r AgentNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentNewResponse) UnmarshalJSON ¶
func (r *AgentNewResponse) UnmarshalJSON(data []byte) error
type AgentService ¶
type AgentService struct { Options []option.RequestOption Session AgentSessionService Steps AgentStepService Turn AgentTurnService }
AgentService contains methods and other services that help with interacting with the llama-stack-client 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 NewAgentService method instead.
func NewAgentService ¶
func NewAgentService(opts ...option.RequestOption) (r AgentService)
NewAgentService 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 (*AgentService) Delete ¶
func (r *AgentService) Delete(ctx context.Context, agentID string, opts ...option.RequestOption) (err error)
Delete an agent by its ID and its associated sessions and turns.
func (*AgentService) Get ¶
func (r *AgentService) Get(ctx context.Context, agentID string, opts ...option.RequestOption) (res *AgentGetResponse, err error)
Describe an agent by its ID.
func (*AgentService) List ¶
func (r *AgentService) List(ctx context.Context, query AgentListParams, opts ...option.RequestOption) (res *AgentListResponse, err error)
List all agents.
func (*AgentService) New ¶
func (r *AgentService) New(ctx context.Context, body AgentNewParams, opts ...option.RequestOption) (res *AgentNewResponse, err error)
Create an agent with the given configuration.
type AgentSessionDeleteParams ¶
type AgentSessionDeleteParams struct { AgentID string `path:"agent_id,required" json:"-"` // contains filtered or unexported fields }
type AgentSessionGetParams ¶
type AgentSessionGetParams struct { AgentID string `path:"agent_id,required" json:"-"` // (Optional) List of turn IDs to filter the session by. TurnIDs []string `query:"turn_ids,omitzero" json:"-"` // contains filtered or unexported fields }
func (AgentSessionGetParams) URLQuery ¶
func (r AgentSessionGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes AgentSessionGetParams's query parameters as `url.Values`.
type AgentSessionListParams ¶
type AgentSessionListParams struct { // The number of sessions to return. Limit param.Opt[int64] `query:"limit,omitzero" json:"-"` // The index to start the pagination from. StartIndex param.Opt[int64] `query:"start_index,omitzero" json:"-"` // contains filtered or unexported fields }
func (AgentSessionListParams) URLQuery ¶
func (r AgentSessionListParams) URLQuery() (v url.Values, err error)
URLQuery serializes AgentSessionListParams's query parameters as `url.Values`.
type AgentSessionListResponse ¶
type AgentSessionListResponse struct { // The list of items for the current page Data []map[string]AgentSessionListResponseDataUnion `json:"data,required"` // Whether there are more items available after this set HasMore bool `json:"has_more,required"` // The URL for accessing this list URL string `json:"url"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field HasMore respjson.Field URL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A generic paginated response that follows a simple format.
func (AgentSessionListResponse) RawJSON ¶
func (r AgentSessionListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentSessionListResponse) UnmarshalJSON ¶
func (r *AgentSessionListResponse) UnmarshalJSON(data []byte) error
type AgentSessionListResponseDataUnion ¶
type AgentSessionListResponseDataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
AgentSessionListResponseDataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (AgentSessionListResponseDataUnion) AsAnyArray ¶
func (u AgentSessionListResponseDataUnion) AsAnyArray() (v []any)
func (AgentSessionListResponseDataUnion) AsBool ¶
func (u AgentSessionListResponseDataUnion) AsBool() (v bool)
func (AgentSessionListResponseDataUnion) AsFloat ¶
func (u AgentSessionListResponseDataUnion) AsFloat() (v float64)
func (AgentSessionListResponseDataUnion) AsString ¶
func (u AgentSessionListResponseDataUnion) AsString() (v string)
func (AgentSessionListResponseDataUnion) RawJSON ¶
func (u AgentSessionListResponseDataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentSessionListResponseDataUnion) UnmarshalJSON ¶
func (r *AgentSessionListResponseDataUnion) UnmarshalJSON(data []byte) error
type AgentSessionNewParams ¶
type AgentSessionNewParams struct { // The name of the session to create. SessionName string `json:"session_name,required"` // contains filtered or unexported fields }
func (AgentSessionNewParams) MarshalJSON ¶
func (r AgentSessionNewParams) MarshalJSON() (data []byte, err error)
func (*AgentSessionNewParams) UnmarshalJSON ¶
func (r *AgentSessionNewParams) UnmarshalJSON(data []byte) error
type AgentSessionNewResponse ¶
type AgentSessionNewResponse struct { // Unique identifier for the created session SessionID string `json:"session_id,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { SessionID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response returned when creating a new agent session.
func (AgentSessionNewResponse) RawJSON ¶
func (r AgentSessionNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentSessionNewResponse) UnmarshalJSON ¶
func (r *AgentSessionNewResponse) UnmarshalJSON(data []byte) error
type AgentSessionService ¶
type AgentSessionService struct {
Options []option.RequestOption
}
AgentSessionService contains methods and other services that help with interacting with the llama-stack-client 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 NewAgentSessionService method instead.
func NewAgentSessionService ¶
func NewAgentSessionService(opts ...option.RequestOption) (r AgentSessionService)
NewAgentSessionService 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 (*AgentSessionService) Delete ¶
func (r *AgentSessionService) Delete(ctx context.Context, sessionID string, body AgentSessionDeleteParams, opts ...option.RequestOption) (err error)
Delete an agent session by its ID and its associated turns.
func (*AgentSessionService) Get ¶
func (r *AgentSessionService) Get(ctx context.Context, sessionID string, params AgentSessionGetParams, opts ...option.RequestOption) (res *Session, err error)
Retrieve an agent session by its ID.
func (*AgentSessionService) List ¶
func (r *AgentSessionService) List(ctx context.Context, agentID string, query AgentSessionListParams, opts ...option.RequestOption) (res *AgentSessionListResponse, err error)
List all session(s) of a given agent.
func (*AgentSessionService) New ¶
func (r *AgentSessionService) New(ctx context.Context, agentID string, body AgentSessionNewParams, opts ...option.RequestOption) (res *AgentSessionNewResponse, err error)
Create a new session for an agent.
type AgentStepGetParams ¶
type AgentStepGetResponse ¶
type AgentStepGetResponse struct { // The complete step data and execution details Step AgentStepGetResponseStepUnion `json:"step,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Step respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response containing details of a specific agent step.
func (AgentStepGetResponse) RawJSON ¶
func (r AgentStepGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentStepGetResponse) UnmarshalJSON ¶
func (r *AgentStepGetResponse) UnmarshalJSON(data []byte) error
type AgentStepGetResponseStepUnion ¶
type AgentStepGetResponseStepUnion struct { // This field is from variant [InferenceStep]. ModelResponse shared.CompletionMessage `json:"model_response"` StepID string `json:"step_id"` // Any of "inference", "tool_execution", "shield_call", "memory_retrieval". StepType string `json:"step_type"` TurnID string `json:"turn_id"` CompletedAt time.Time `json:"completed_at"` StartedAt time.Time `json:"started_at"` // This field is from variant [ToolExecutionStep]. ToolCalls []shared.ToolCall `json:"tool_calls"` // This field is from variant [ToolExecutionStep]. ToolResponses []ToolResponse `json:"tool_responses"` // This field is from variant [ShieldCallStep]. Violation shared.SafetyViolation `json:"violation"` // This field is from variant [MemoryRetrievalStep]. InsertedContext shared.InterleavedContentUnion `json:"inserted_context"` // This field is from variant [MemoryRetrievalStep]. VectorDBIDs string `json:"vector_db_ids"` JSON struct { ModelResponse respjson.Field StepID respjson.Field StepType respjson.Field TurnID respjson.Field CompletedAt respjson.Field StartedAt respjson.Field ToolCalls respjson.Field ToolResponses respjson.Field Violation respjson.Field InsertedContext respjson.Field VectorDBIDs respjson.Field // contains filtered or unexported fields } `json:"-"` }
AgentStepGetResponseStepUnion contains all possible properties and values from InferenceStep, ToolExecutionStep, ShieldCallStep, MemoryRetrievalStep.
Use the AgentStepGetResponseStepUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (AgentStepGetResponseStepUnion) AsAny ¶
func (u AgentStepGetResponseStepUnion) AsAny() anyAgentStepGetResponseStep
Use the following switch statement to find the correct variant
switch variant := AgentStepGetResponseStepUnion.AsAny().(type) { case llamastackclient.InferenceStep: case llamastackclient.ToolExecutionStep: case llamastackclient.ShieldCallStep: case llamastackclient.MemoryRetrievalStep: default: fmt.Errorf("no variant present") }
func (AgentStepGetResponseStepUnion) AsInference ¶
func (u AgentStepGetResponseStepUnion) AsInference() (v InferenceStep)
func (AgentStepGetResponseStepUnion) AsMemoryRetrieval ¶
func (u AgentStepGetResponseStepUnion) AsMemoryRetrieval() (v MemoryRetrievalStep)
func (AgentStepGetResponseStepUnion) AsShieldCall ¶
func (u AgentStepGetResponseStepUnion) AsShieldCall() (v ShieldCallStep)
func (AgentStepGetResponseStepUnion) AsToolExecution ¶
func (u AgentStepGetResponseStepUnion) AsToolExecution() (v ToolExecutionStep)
func (AgentStepGetResponseStepUnion) RawJSON ¶
func (u AgentStepGetResponseStepUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentStepGetResponseStepUnion) UnmarshalJSON ¶
func (r *AgentStepGetResponseStepUnion) UnmarshalJSON(data []byte) error
type AgentStepService ¶
type AgentStepService struct {
Options []option.RequestOption
}
AgentStepService contains methods and other services that help with interacting with the llama-stack-client 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 NewAgentStepService method instead.
func NewAgentStepService ¶
func NewAgentStepService(opts ...option.RequestOption) (r AgentStepService)
NewAgentStepService 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 (*AgentStepService) Get ¶
func (r *AgentStepService) Get(ctx context.Context, stepID string, query AgentStepGetParams, opts ...option.RequestOption) (res *AgentStepGetResponse, err error)
Retrieve an agent step by its ID.
type AgentTurnGetParams ¶
type AgentTurnNewParams ¶
type AgentTurnNewParams struct { AgentID string `path:"agent_id,required" json:"-"` // List of messages to start the turn with. Messages []AgentTurnNewParamsMessageUnion `json:"messages,omitzero,required"` // (Optional) List of documents to create the turn with. Documents []AgentTurnNewParamsDocument `json:"documents,omitzero"` // (Optional) The tool configuration to create the turn with, will be used to // override the agent's tool_config. ToolConfig AgentTurnNewParamsToolConfig `json:"tool_config,omitzero"` // (Optional) List of toolgroups to create the turn with, will be used in addition // to the agent's config toolgroups for the request. Toolgroups []AgentTurnNewParamsToolgroupUnion `json:"toolgroups,omitzero"` // contains filtered or unexported fields }
func (AgentTurnNewParams) MarshalJSON ¶
func (r AgentTurnNewParams) MarshalJSON() (data []byte, err error)
func (*AgentTurnNewParams) UnmarshalJSON ¶
func (r *AgentTurnNewParams) UnmarshalJSON(data []byte) error
type AgentTurnNewParamsDocument ¶
type AgentTurnNewParamsDocument struct { // The content of the document. Content AgentTurnNewParamsDocumentContentUnion `json:"content,omitzero,required"` // The MIME type of the document. MimeType string `json:"mime_type,required"` // contains filtered or unexported fields }
A document to be used by an agent.
The properties Content, MimeType are required.
func (AgentTurnNewParamsDocument) MarshalJSON ¶
func (r AgentTurnNewParamsDocument) MarshalJSON() (data []byte, err error)
func (*AgentTurnNewParamsDocument) UnmarshalJSON ¶
func (r *AgentTurnNewParamsDocument) UnmarshalJSON(data []byte) error
type AgentTurnNewParamsDocumentContentImageContentItem ¶
type AgentTurnNewParamsDocumentContentImageContentItem struct { // Image as a base64 encoded string or an URL Image AgentTurnNewParamsDocumentContentImageContentItemImage `json:"image,omitzero,required"` // Discriminator type of the content item. Always "image" // // This field can be elided, and will marshal its zero value as "image". Type constant.Image `json:"type,required"` // contains filtered or unexported fields }
A image content item
The properties Image, Type are required.
func (AgentTurnNewParamsDocumentContentImageContentItem) MarshalJSON ¶
func (r AgentTurnNewParamsDocumentContentImageContentItem) MarshalJSON() (data []byte, err error)
func (*AgentTurnNewParamsDocumentContentImageContentItem) UnmarshalJSON ¶
func (r *AgentTurnNewParamsDocumentContentImageContentItem) UnmarshalJSON(data []byte) error
type AgentTurnNewParamsDocumentContentImageContentItemImage ¶
type AgentTurnNewParamsDocumentContentImageContentItemImage struct { // base64 encoded image data as string Data param.Opt[string] `json:"data,omitzero"` // A URL of the image or data URL in the format of data:image/{type};base64,{data}. // Note that URL could have length limits. URL AgentTurnNewParamsDocumentContentImageContentItemImageURL `json:"url,omitzero"` // contains filtered or unexported fields }
Image as a base64 encoded string or an URL
func (AgentTurnNewParamsDocumentContentImageContentItemImage) MarshalJSON ¶
func (r AgentTurnNewParamsDocumentContentImageContentItemImage) MarshalJSON() (data []byte, err error)
func (*AgentTurnNewParamsDocumentContentImageContentItemImage) UnmarshalJSON ¶
func (r *AgentTurnNewParamsDocumentContentImageContentItemImage) UnmarshalJSON(data []byte) error
type AgentTurnNewParamsDocumentContentImageContentItemImageURL ¶
type AgentTurnNewParamsDocumentContentImageContentItemImageURL struct { // The URL string pointing to the resource Uri string `json:"uri,required"` // contains filtered or unexported fields }
A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits.
The property Uri is required.
func (AgentTurnNewParamsDocumentContentImageContentItemImageURL) MarshalJSON ¶
func (r AgentTurnNewParamsDocumentContentImageContentItemImageURL) MarshalJSON() (data []byte, err error)
func (*AgentTurnNewParamsDocumentContentImageContentItemImageURL) UnmarshalJSON ¶
func (r *AgentTurnNewParamsDocumentContentImageContentItemImageURL) UnmarshalJSON(data []byte) error
type AgentTurnNewParamsDocumentContentTextContentItem ¶
type AgentTurnNewParamsDocumentContentTextContentItem struct { // Text content Text string `json:"text,required"` // Discriminator type of the content item. Always "text" // // This field can be elided, and will marshal its zero value as "text". Type constant.Text `json:"type,required"` // contains filtered or unexported fields }
A text content item
The properties Text, Type are required.
func (AgentTurnNewParamsDocumentContentTextContentItem) MarshalJSON ¶
func (r AgentTurnNewParamsDocumentContentTextContentItem) MarshalJSON() (data []byte, err error)
func (*AgentTurnNewParamsDocumentContentTextContentItem) UnmarshalJSON ¶
func (r *AgentTurnNewParamsDocumentContentTextContentItem) UnmarshalJSON(data []byte) error
type AgentTurnNewParamsDocumentContentURL ¶
type AgentTurnNewParamsDocumentContentURL struct { // The URL string pointing to the resource Uri string `json:"uri,required"` // contains filtered or unexported fields }
A URL reference to external content.
The property Uri is required.
func (AgentTurnNewParamsDocumentContentURL) MarshalJSON ¶
func (r AgentTurnNewParamsDocumentContentURL) MarshalJSON() (data []byte, err error)
func (*AgentTurnNewParamsDocumentContentURL) UnmarshalJSON ¶
func (r *AgentTurnNewParamsDocumentContentURL) UnmarshalJSON(data []byte) error
type AgentTurnNewParamsDocumentContentUnion ¶
type AgentTurnNewParamsDocumentContentUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfImageContentItem *AgentTurnNewParamsDocumentContentImageContentItem `json:",omitzero,inline"` OfTextContentItem *AgentTurnNewParamsDocumentContentTextContentItem `json:",omitzero,inline"` OfInterleavedContentItemArray []shared.InterleavedContentItemUnionParam `json:",omitzero,inline"` OfURL *AgentTurnNewParamsDocumentContentURL `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (AgentTurnNewParamsDocumentContentUnion) GetImage ¶
func (u AgentTurnNewParamsDocumentContentUnion) GetImage() *AgentTurnNewParamsDocumentContentImageContentItemImage
Returns a pointer to the underlying variant's property, if present.
func (AgentTurnNewParamsDocumentContentUnion) GetText ¶
func (u AgentTurnNewParamsDocumentContentUnion) GetText() *string
Returns a pointer to the underlying variant's property, if present.
func (AgentTurnNewParamsDocumentContentUnion) GetType ¶
func (u AgentTurnNewParamsDocumentContentUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (AgentTurnNewParamsDocumentContentUnion) GetUri ¶
func (u AgentTurnNewParamsDocumentContentUnion) GetUri() *string
Returns a pointer to the underlying variant's property, if present.
func (AgentTurnNewParamsDocumentContentUnion) MarshalJSON ¶
func (u AgentTurnNewParamsDocumentContentUnion) MarshalJSON() ([]byte, error)
func (*AgentTurnNewParamsDocumentContentUnion) UnmarshalJSON ¶
func (u *AgentTurnNewParamsDocumentContentUnion) UnmarshalJSON(data []byte) error
type AgentTurnNewParamsMessageUnion ¶
type AgentTurnNewParamsMessageUnion struct { OfUserMessage *shared.UserMessageParam `json:",omitzero,inline"` OfToolResponseMessage *shared.ToolResponseMessageParam `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (AgentTurnNewParamsMessageUnion) GetCallID ¶
func (u AgentTurnNewParamsMessageUnion) GetCallID() *string
Returns a pointer to the underlying variant's property, if present.
func (AgentTurnNewParamsMessageUnion) GetContent ¶
func (u AgentTurnNewParamsMessageUnion) GetContent() *shared.InterleavedContentUnionParam
Returns a pointer to the underlying variant's Content property, if present.
func (AgentTurnNewParamsMessageUnion) GetContext ¶
func (u AgentTurnNewParamsMessageUnion) GetContext() *shared.InterleavedContentUnionParam
Returns a pointer to the underlying variant's property, if present.
func (AgentTurnNewParamsMessageUnion) GetRole ¶
func (u AgentTurnNewParamsMessageUnion) GetRole() *string
Returns a pointer to the underlying variant's property, if present.
func (AgentTurnNewParamsMessageUnion) MarshalJSON ¶
func (u AgentTurnNewParamsMessageUnion) MarshalJSON() ([]byte, error)
func (*AgentTurnNewParamsMessageUnion) UnmarshalJSON ¶
func (u *AgentTurnNewParamsMessageUnion) UnmarshalJSON(data []byte) error
type AgentTurnNewParamsToolConfig ¶
type AgentTurnNewParamsToolConfig struct { // (Optional) Config for how to override the default system prompt. - // `SystemMessageBehavior.append`: Appends the provided system message to the // default system prompt. - `SystemMessageBehavior.replace`: Replaces the default // system prompt with the provided system message. The system message can include // the string '{{function_definitions}}' to indicate where the function definitions // should be inserted. // // Any of "append", "replace". SystemMessageBehavior string `json:"system_message_behavior,omitzero"` // (Optional) Whether tool use is automatic, required, or none. Can also specify a // tool name to use a specific tool. Defaults to ToolChoice.auto. ToolChoice string `json:"tool_choice,omitzero"` // (Optional) Instructs the model how to format tool calls. By default, Llama Stack // will attempt to use a format that is best adapted to the model. - // `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. - // `ToolPromptFormat.function_tag`: The tool calls are enclosed in a // <function=function_name> tag. - `ToolPromptFormat.python_list`: The tool calls // are output as Python syntax -- a list of function calls. // // Any of "json", "function_tag", "python_list". ToolPromptFormat string `json:"tool_prompt_format,omitzero"` // contains filtered or unexported fields }
(Optional) The tool configuration to create the turn with, will be used to override the agent's tool_config.
func (AgentTurnNewParamsToolConfig) MarshalJSON ¶
func (r AgentTurnNewParamsToolConfig) MarshalJSON() (data []byte, err error)
func (*AgentTurnNewParamsToolConfig) UnmarshalJSON ¶
func (r *AgentTurnNewParamsToolConfig) UnmarshalJSON(data []byte) error
type AgentTurnNewParamsToolgroupAgentToolGroupWithArgs ¶
type AgentTurnNewParamsToolgroupAgentToolGroupWithArgs struct { Args map[string]AgentTurnNewParamsToolgroupAgentToolGroupWithArgsArgUnion `json:"args,omitzero,required"` Name string `json:"name,required"` // contains filtered or unexported fields }
The properties Args, Name are required.
func (AgentTurnNewParamsToolgroupAgentToolGroupWithArgs) MarshalJSON ¶
func (r AgentTurnNewParamsToolgroupAgentToolGroupWithArgs) MarshalJSON() (data []byte, err error)
func (*AgentTurnNewParamsToolgroupAgentToolGroupWithArgs) UnmarshalJSON ¶
func (r *AgentTurnNewParamsToolgroupAgentToolGroupWithArgs) UnmarshalJSON(data []byte) error
type AgentTurnNewParamsToolgroupAgentToolGroupWithArgsArgUnion ¶
type AgentTurnNewParamsToolgroupAgentToolGroupWithArgsArgUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (AgentTurnNewParamsToolgroupAgentToolGroupWithArgsArgUnion) MarshalJSON ¶
func (u AgentTurnNewParamsToolgroupAgentToolGroupWithArgsArgUnion) MarshalJSON() ([]byte, error)
func (*AgentTurnNewParamsToolgroupAgentToolGroupWithArgsArgUnion) UnmarshalJSON ¶
func (u *AgentTurnNewParamsToolgroupAgentToolGroupWithArgsArgUnion) UnmarshalJSON(data []byte) error
type AgentTurnNewParamsToolgroupUnion ¶
type AgentTurnNewParamsToolgroupUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfAgentToolGroupWithArgs *AgentTurnNewParamsToolgroupAgentToolGroupWithArgs `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (AgentTurnNewParamsToolgroupUnion) MarshalJSON ¶
func (u AgentTurnNewParamsToolgroupUnion) MarshalJSON() ([]byte, error)
func (*AgentTurnNewParamsToolgroupUnion) UnmarshalJSON ¶
func (u *AgentTurnNewParamsToolgroupUnion) UnmarshalJSON(data []byte) error
type AgentTurnResponseStreamChunk ¶
type AgentTurnResponseStreamChunk struct { // Individual event in the agent turn response stream Event TurnResponseEvent `json:"event,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Event respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streamed agent turn completion response.
func (AgentTurnResponseStreamChunk) RawJSON ¶
func (r AgentTurnResponseStreamChunk) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentTurnResponseStreamChunk) UnmarshalJSON ¶
func (r *AgentTurnResponseStreamChunk) UnmarshalJSON(data []byte) error
type AgentTurnResumeParams ¶
type AgentTurnResumeParams struct { AgentID string `path:"agent_id,required" json:"-"` SessionID string `path:"session_id,required" json:"-"` // The tool call responses to resume the turn with. ToolResponses []ToolResponseParam `json:"tool_responses,omitzero,required"` // contains filtered or unexported fields }
func (AgentTurnResumeParams) MarshalJSON ¶
func (r AgentTurnResumeParams) MarshalJSON() (data []byte, err error)
func (*AgentTurnResumeParams) UnmarshalJSON ¶
func (r *AgentTurnResumeParams) UnmarshalJSON(data []byte) error
type AgentTurnService ¶
type AgentTurnService struct {
Options []option.RequestOption
}
AgentTurnService contains methods and other services that help with interacting with the llama-stack-client 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 NewAgentTurnService method instead.
func NewAgentTurnService ¶
func NewAgentTurnService(opts ...option.RequestOption) (r AgentTurnService)
NewAgentTurnService 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 (*AgentTurnService) Get ¶
func (r *AgentTurnService) Get(ctx context.Context, turnID string, query AgentTurnGetParams, opts ...option.RequestOption) (res *Turn, err error)
Retrieve an agent turn by its ID.
func (*AgentTurnService) New ¶
func (r *AgentTurnService) New(ctx context.Context, sessionID string, params AgentTurnNewParams, opts ...option.RequestOption) (res *Turn, err error)
Create a new turn for an agent.
func (*AgentTurnService) NewStreaming ¶
func (r *AgentTurnService) NewStreaming(ctx context.Context, sessionID string, params AgentTurnNewParams, opts ...option.RequestOption) (stream *ssestream.Stream[AgentTurnResponseStreamChunk])
Create a new turn for an agent.
func (*AgentTurnService) Resume ¶
func (r *AgentTurnService) Resume(ctx context.Context, turnID string, params AgentTurnResumeParams, opts ...option.RequestOption) (res *Turn, err error)
Resume an agent turn with executed tool call responses. When a Turn has the status `awaiting_input` due to pending input from client side tool calls, this endpoint can be used to submit the outputs from the tool calls once they are ready.
func (*AgentTurnService) ResumeStreaming ¶
func (r *AgentTurnService) ResumeStreaming(ctx context.Context, turnID string, params AgentTurnResumeParams, opts ...option.RequestOption) (stream *ssestream.Stream[AgentTurnResponseStreamChunk])
Resume an agent turn with executed tool call responses. When a Turn has the status `awaiting_input` due to pending input from client side tool calls, this endpoint can be used to submit the outputs from the tool calls once they are ready.
type AlgorithmConfigLoRaParam ¶
type AlgorithmConfigLoRaParam struct { // LoRA scaling parameter that controls adaptation strength Alpha int64 `json:"alpha,required"` // Whether to apply LoRA to MLP layers ApplyLoraToMlp bool `json:"apply_lora_to_mlp,required"` // Whether to apply LoRA to output projection layers ApplyLoraToOutput bool `json:"apply_lora_to_output,required"` // List of attention module names to apply LoRA to LoraAttnModules []string `json:"lora_attn_modules,omitzero,required"` // Rank of the LoRA adaptation (lower rank = fewer parameters) Rank int64 `json:"rank,required"` // (Optional) Whether to quantize the base model weights QuantizeBase param.Opt[bool] `json:"quantize_base,omitzero"` // (Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation) UseDora param.Opt[bool] `json:"use_dora,omitzero"` // Algorithm type identifier, always "LoRA" // // This field can be elided, and will marshal its zero value as "LoRA". Type constant.LoRa `json:"type,required"` // contains filtered or unexported fields }
Configuration for Low-Rank Adaptation (LoRA) fine-tuning.
The properties Alpha, ApplyLoraToMlp, ApplyLoraToOutput, LoraAttnModules, Rank, Type are required.
func (AlgorithmConfigLoRaParam) MarshalJSON ¶
func (r AlgorithmConfigLoRaParam) MarshalJSON() (data []byte, err error)
func (*AlgorithmConfigLoRaParam) UnmarshalJSON ¶
func (r *AlgorithmConfigLoRaParam) UnmarshalJSON(data []byte) error
type AlgorithmConfigQatParam ¶
type AlgorithmConfigQatParam struct { // Size of groups for grouped quantization GroupSize int64 `json:"group_size,required"` // Name of the quantization algorithm to use QuantizerName string `json:"quantizer_name,required"` // Algorithm type identifier, always "QAT" // // This field can be elided, and will marshal its zero value as "QAT". Type constant.Qat `json:"type,required"` // contains filtered or unexported fields }
Configuration for Quantization-Aware Training (QAT) fine-tuning.
The properties GroupSize, QuantizerName, Type are required.
func (AlgorithmConfigQatParam) MarshalJSON ¶
func (r AlgorithmConfigQatParam) MarshalJSON() (data []byte, err error)
func (*AlgorithmConfigQatParam) UnmarshalJSON ¶
func (r *AlgorithmConfigQatParam) UnmarshalJSON(data []byte) error
type AlgorithmConfigUnionParam ¶
type AlgorithmConfigUnionParam struct { OfLoRa *AlgorithmConfigLoRaParam `json:",omitzero,inline"` OfQat *AlgorithmConfigQatParam `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func AlgorithmConfigParamOfQat ¶
func AlgorithmConfigParamOfQat(groupSize int64, quantizerName string) AlgorithmConfigUnionParam
func (AlgorithmConfigUnionParam) GetAlpha ¶
func (u AlgorithmConfigUnionParam) GetAlpha() *int64
Returns a pointer to the underlying variant's property, if present.
func (AlgorithmConfigUnionParam) GetApplyLoraToMlp ¶
func (u AlgorithmConfigUnionParam) GetApplyLoraToMlp() *bool
Returns a pointer to the underlying variant's property, if present.
func (AlgorithmConfigUnionParam) GetApplyLoraToOutput ¶
func (u AlgorithmConfigUnionParam) GetApplyLoraToOutput() *bool
Returns a pointer to the underlying variant's property, if present.
func (AlgorithmConfigUnionParam) GetGroupSize ¶
func (u AlgorithmConfigUnionParam) GetGroupSize() *int64
Returns a pointer to the underlying variant's property, if present.
func (AlgorithmConfigUnionParam) GetLoraAttnModules ¶
func (u AlgorithmConfigUnionParam) GetLoraAttnModules() []string
Returns a pointer to the underlying variant's property, if present.
func (AlgorithmConfigUnionParam) GetQuantizeBase ¶
func (u AlgorithmConfigUnionParam) GetQuantizeBase() *bool
Returns a pointer to the underlying variant's property, if present.
func (AlgorithmConfigUnionParam) GetQuantizerName ¶
func (u AlgorithmConfigUnionParam) GetQuantizerName() *string
Returns a pointer to the underlying variant's property, if present.
func (AlgorithmConfigUnionParam) GetRank ¶
func (u AlgorithmConfigUnionParam) GetRank() *int64
Returns a pointer to the underlying variant's property, if present.
func (AlgorithmConfigUnionParam) GetType ¶
func (u AlgorithmConfigUnionParam) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (AlgorithmConfigUnionParam) GetUseDora ¶
func (u AlgorithmConfigUnionParam) GetUseDora() *bool
Returns a pointer to the underlying variant's property, if present.
func (AlgorithmConfigUnionParam) MarshalJSON ¶
func (u AlgorithmConfigUnionParam) MarshalJSON() ([]byte, error)
func (*AlgorithmConfigUnionParam) UnmarshalJSON ¶
func (u *AlgorithmConfigUnionParam) UnmarshalJSON(data []byte) error
type BatchCompletion ¶
type BatchCompletion = shared.BatchCompletion
Response from a batch completion request.
This is an alias to an internal type.
type Benchmark ¶
type Benchmark struct { // Identifier of the dataset to use for the benchmark evaluation DatasetID string `json:"dataset_id,required"` Identifier string `json:"identifier,required"` // Metadata for this evaluation task Metadata map[string]BenchmarkMetadataUnion `json:"metadata,required"` ProviderID string `json:"provider_id,required"` // List of scoring function identifiers to apply during evaluation ScoringFunctions []string `json:"scoring_functions,required"` // The resource type, always benchmark Type constant.Benchmark `json:"type,required"` ProviderResourceID string `json:"provider_resource_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { DatasetID respjson.Field Identifier respjson.Field Metadata respjson.Field ProviderID respjson.Field ScoringFunctions respjson.Field Type respjson.Field ProviderResourceID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A benchmark resource for evaluating model performance.
func (*Benchmark) UnmarshalJSON ¶
type BenchmarkConfigParam ¶
type BenchmarkConfigParam struct { // The candidate to evaluate. EvalCandidate EvalCandidateUnionParam `json:"eval_candidate,omitzero,required"` // Map between scoring function id and parameters for each scoring function you // want to run ScoringParams map[string]ScoringFnParamsUnion `json:"scoring_params,omitzero,required"` // (Optional) The number of examples to evaluate. If not provided, all examples in // the dataset will be evaluated NumExamples param.Opt[int64] `json:"num_examples,omitzero"` // contains filtered or unexported fields }
A benchmark configuration for evaluation.
The properties EvalCandidate, ScoringParams are required.
func (BenchmarkConfigParam) MarshalJSON ¶
func (r BenchmarkConfigParam) MarshalJSON() (data []byte, err error)
func (*BenchmarkConfigParam) UnmarshalJSON ¶
func (r *BenchmarkConfigParam) UnmarshalJSON(data []byte) error
type BenchmarkMetadataUnion ¶
type BenchmarkMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
BenchmarkMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (BenchmarkMetadataUnion) AsAnyArray ¶
func (u BenchmarkMetadataUnion) AsAnyArray() (v []any)
func (BenchmarkMetadataUnion) AsBool ¶
func (u BenchmarkMetadataUnion) AsBool() (v bool)
func (BenchmarkMetadataUnion) AsFloat ¶
func (u BenchmarkMetadataUnion) AsFloat() (v float64)
func (BenchmarkMetadataUnion) AsString ¶
func (u BenchmarkMetadataUnion) AsString() (v string)
func (BenchmarkMetadataUnion) RawJSON ¶
func (u BenchmarkMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*BenchmarkMetadataUnion) UnmarshalJSON ¶
func (r *BenchmarkMetadataUnion) UnmarshalJSON(data []byte) error
type BenchmarkRegisterParams ¶
type BenchmarkRegisterParams struct { // The ID of the benchmark to register. BenchmarkID string `json:"benchmark_id,required"` // The ID of the dataset to use for the benchmark. DatasetID string `json:"dataset_id,required"` // The scoring functions to use for the benchmark. ScoringFunctions []string `json:"scoring_functions,omitzero,required"` // The ID of the provider benchmark to use for the benchmark. ProviderBenchmarkID param.Opt[string] `json:"provider_benchmark_id,omitzero"` // The ID of the provider to use for the benchmark. ProviderID param.Opt[string] `json:"provider_id,omitzero"` // The metadata to use for the benchmark. Metadata map[string]BenchmarkRegisterParamsMetadataUnion `json:"metadata,omitzero"` // contains filtered or unexported fields }
func (BenchmarkRegisterParams) MarshalJSON ¶
func (r BenchmarkRegisterParams) MarshalJSON() (data []byte, err error)
func (*BenchmarkRegisterParams) UnmarshalJSON ¶
func (r *BenchmarkRegisterParams) UnmarshalJSON(data []byte) error
type BenchmarkRegisterParamsMetadataUnion ¶
type BenchmarkRegisterParamsMetadataUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (BenchmarkRegisterParamsMetadataUnion) MarshalJSON ¶
func (u BenchmarkRegisterParamsMetadataUnion) MarshalJSON() ([]byte, error)
func (*BenchmarkRegisterParamsMetadataUnion) UnmarshalJSON ¶
func (u *BenchmarkRegisterParamsMetadataUnion) UnmarshalJSON(data []byte) error
type BenchmarkService ¶
type BenchmarkService struct {
Options []option.RequestOption
}
BenchmarkService contains methods and other services that help with interacting with the llama-stack-client 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 NewBenchmarkService method instead.
func NewBenchmarkService ¶
func NewBenchmarkService(opts ...option.RequestOption) (r BenchmarkService)
NewBenchmarkService 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 (*BenchmarkService) Get ¶
func (r *BenchmarkService) Get(ctx context.Context, benchmarkID string, opts ...option.RequestOption) (res *Benchmark, err error)
Get a benchmark by its ID.
func (*BenchmarkService) List ¶
func (r *BenchmarkService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Benchmark, err error)
List all benchmarks.
func (*BenchmarkService) Register ¶
func (r *BenchmarkService) Register(ctx context.Context, body BenchmarkRegisterParams, opts ...option.RequestOption) (err error)
Register a benchmark.
type ChatCompletionChunk ¶
type ChatCompletionChunk struct { // The ID of the chat completion ID string `json:"id,required"` // List of choices Choices []ChatCompletionChunkChoice `json:"choices,required"` // The Unix timestamp in seconds when the chat completion was created Created int64 `json:"created,required"` // The model that was used to generate the chat completion Model string `json:"model,required"` // The object type, which will be "chat.completion.chunk" Object constant.ChatCompletionChunk `json:"object,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Choices respjson.Field Created respjson.Field Model respjson.Field Object respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Chunk from a streaming response to an OpenAI-compatible chat completion request.
func (ChatCompletionChunk) RawJSON ¶
func (r ChatCompletionChunk) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionChunk) UnmarshalJSON ¶
func (r *ChatCompletionChunk) UnmarshalJSON(data []byte) error
type ChatCompletionChunkChoice ¶
type ChatCompletionChunkChoice struct { // The delta from the chunk Delta ChatCompletionChunkChoiceDelta `json:"delta,required"` // The reason the model stopped generating FinishReason string `json:"finish_reason,required"` // The index of the choice Index int64 `json:"index,required"` // (Optional) The log probabilities for the tokens in the message Logprobs ChatCompletionChunkChoiceLogprobs `json:"logprobs"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Delta respjson.Field FinishReason respjson.Field Index respjson.Field Logprobs respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A chunk choice from an OpenAI-compatible chat completion streaming response.
func (ChatCompletionChunkChoice) RawJSON ¶
func (r ChatCompletionChunkChoice) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionChunkChoice) UnmarshalJSON ¶
func (r *ChatCompletionChunkChoice) UnmarshalJSON(data []byte) error
type ChatCompletionChunkChoiceDelta ¶
type ChatCompletionChunkChoiceDelta struct { // (Optional) The content of the delta Content string `json:"content"` // (Optional) The refusal of the delta Refusal string `json:"refusal"` // (Optional) The role of the delta Role string `json:"role"` // (Optional) The tool calls of the delta ToolCalls []ChatCompletionChunkChoiceDeltaToolCall `json:"tool_calls"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Refusal respjson.Field Role respjson.Field ToolCalls respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The delta from the chunk
func (ChatCompletionChunkChoiceDelta) RawJSON ¶
func (r ChatCompletionChunkChoiceDelta) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionChunkChoiceDelta) UnmarshalJSON ¶
func (r *ChatCompletionChunkChoiceDelta) UnmarshalJSON(data []byte) error
type ChatCompletionChunkChoiceDeltaToolCall ¶
type ChatCompletionChunkChoiceDeltaToolCall struct { // Must be "function" to identify this as a function call Type constant.Function `json:"type,required"` // (Optional) Unique identifier for the tool call ID string `json:"id"` // (Optional) Function call details Function ChatCompletionChunkChoiceDeltaToolCallFunction `json:"function"` // (Optional) Index of the tool call in the list Index int64 `json:"index"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Type respjson.Field ID respjson.Field Function respjson.Field Index respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Tool call specification for OpenAI-compatible chat completion responses.
func (ChatCompletionChunkChoiceDeltaToolCall) RawJSON ¶
func (r ChatCompletionChunkChoiceDeltaToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionChunkChoiceDeltaToolCall) UnmarshalJSON ¶
func (r *ChatCompletionChunkChoiceDeltaToolCall) UnmarshalJSON(data []byte) error
type ChatCompletionChunkChoiceDeltaToolCallFunction ¶
type ChatCompletionChunkChoiceDeltaToolCallFunction struct { // (Optional) Arguments to pass to the function as a JSON string Arguments string `json:"arguments"` // (Optional) Name of the function to call Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Function call details
func (ChatCompletionChunkChoiceDeltaToolCallFunction) RawJSON ¶
func (r ChatCompletionChunkChoiceDeltaToolCallFunction) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionChunkChoiceDeltaToolCallFunction) UnmarshalJSON ¶
func (r *ChatCompletionChunkChoiceDeltaToolCallFunction) UnmarshalJSON(data []byte) error
type ChatCompletionChunkChoiceLogprobs ¶
type ChatCompletionChunkChoiceLogprobs struct { // (Optional) The log probabilities for the tokens in the message Content []ChatCompletionChunkChoiceLogprobsContent `json:"content"` // (Optional) The log probabilities for the tokens in the message Refusal []ChatCompletionChunkChoiceLogprobsRefusal `json:"refusal"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Refusal respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) The log probabilities for the tokens in the message
func (ChatCompletionChunkChoiceLogprobs) RawJSON ¶
func (r ChatCompletionChunkChoiceLogprobs) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionChunkChoiceLogprobs) UnmarshalJSON ¶
func (r *ChatCompletionChunkChoiceLogprobs) UnmarshalJSON(data []byte) error
type ChatCompletionChunkChoiceLogprobsContent ¶
type ChatCompletionChunkChoiceLogprobsContent struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` TopLogprobs []ChatCompletionChunkChoiceLogprobsContentTopLogprob `json:"top_logprobs,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field TopLogprobs respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionChunkChoiceLogprobsContent) RawJSON ¶
func (r ChatCompletionChunkChoiceLogprobsContent) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionChunkChoiceLogprobsContent) UnmarshalJSON ¶
func (r *ChatCompletionChunkChoiceLogprobsContent) UnmarshalJSON(data []byte) error
type ChatCompletionChunkChoiceLogprobsContentTopLogprob ¶
type ChatCompletionChunkChoiceLogprobsContentTopLogprob struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The top log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionChunkChoiceLogprobsContentTopLogprob) RawJSON ¶
func (r ChatCompletionChunkChoiceLogprobsContentTopLogprob) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionChunkChoiceLogprobsContentTopLogprob) UnmarshalJSON ¶
func (r *ChatCompletionChunkChoiceLogprobsContentTopLogprob) UnmarshalJSON(data []byte) error
type ChatCompletionChunkChoiceLogprobsRefusal ¶
type ChatCompletionChunkChoiceLogprobsRefusal struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` TopLogprobs []ChatCompletionChunkChoiceLogprobsRefusalTopLogprob `json:"top_logprobs,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field TopLogprobs respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionChunkChoiceLogprobsRefusal) RawJSON ¶
func (r ChatCompletionChunkChoiceLogprobsRefusal) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionChunkChoiceLogprobsRefusal) UnmarshalJSON ¶
func (r *ChatCompletionChunkChoiceLogprobsRefusal) UnmarshalJSON(data []byte) error
type ChatCompletionChunkChoiceLogprobsRefusalTopLogprob ¶
type ChatCompletionChunkChoiceLogprobsRefusalTopLogprob struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The top log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionChunkChoiceLogprobsRefusalTopLogprob) RawJSON ¶
func (r ChatCompletionChunkChoiceLogprobsRefusalTopLogprob) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionChunkChoiceLogprobsRefusalTopLogprob) UnmarshalJSON ¶
func (r *ChatCompletionChunkChoiceLogprobsRefusalTopLogprob) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponse ¶
type ChatCompletionGetResponse struct { // The ID of the chat completion ID string `json:"id,required"` // List of choices Choices []ChatCompletionGetResponseChoice `json:"choices,required"` // The Unix timestamp in seconds when the chat completion was created Created int64 `json:"created,required"` InputMessages []ChatCompletionGetResponseInputMessageUnion `json:"input_messages,required"` // The model that was used to generate the chat completion Model string `json:"model,required"` // The object type, which will be "chat.completion" Object constant.ChatCompletion `json:"object,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Choices respjson.Field Created respjson.Field InputMessages respjson.Field Model respjson.Field Object respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ChatCompletionGetResponse) RawJSON ¶
func (r ChatCompletionGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponse) UnmarshalJSON ¶
func (r *ChatCompletionGetResponse) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoice ¶
type ChatCompletionGetResponseChoice struct { // The reason the model stopped generating FinishReason string `json:"finish_reason,required"` // The index of the choice Index int64 `json:"index,required"` // The message from the model Message ChatCompletionGetResponseChoiceMessageUnion `json:"message,required"` // (Optional) The log probabilities for the tokens in the message Logprobs ChatCompletionGetResponseChoiceLogprobs `json:"logprobs"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FinishReason respjson.Field Index respjson.Field Message respjson.Field Logprobs respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A choice from an OpenAI-compatible chat completion response.
func (ChatCompletionGetResponseChoice) RawJSON ¶
func (r ChatCompletionGetResponseChoice) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoice) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoice) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceLogprobs ¶
type ChatCompletionGetResponseChoiceLogprobs struct { // (Optional) The log probabilities for the tokens in the message Content []ChatCompletionGetResponseChoiceLogprobsContent `json:"content"` // (Optional) The log probabilities for the tokens in the message Refusal []ChatCompletionGetResponseChoiceLogprobsRefusal `json:"refusal"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Refusal respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) The log probabilities for the tokens in the message
func (ChatCompletionGetResponseChoiceLogprobs) RawJSON ¶
func (r ChatCompletionGetResponseChoiceLogprobs) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceLogprobs) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceLogprobs) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceLogprobsContent ¶
type ChatCompletionGetResponseChoiceLogprobsContent struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` TopLogprobs []ChatCompletionGetResponseChoiceLogprobsContentTopLogprob `json:"top_logprobs,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field TopLogprobs respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionGetResponseChoiceLogprobsContent) RawJSON ¶
func (r ChatCompletionGetResponseChoiceLogprobsContent) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceLogprobsContent) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceLogprobsContent) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceLogprobsContentTopLogprob ¶
type ChatCompletionGetResponseChoiceLogprobsContentTopLogprob struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The top log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionGetResponseChoiceLogprobsContentTopLogprob) RawJSON ¶
func (r ChatCompletionGetResponseChoiceLogprobsContentTopLogprob) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceLogprobsContentTopLogprob) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceLogprobsContentTopLogprob) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceLogprobsRefusal ¶
type ChatCompletionGetResponseChoiceLogprobsRefusal struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` TopLogprobs []ChatCompletionGetResponseChoiceLogprobsRefusalTopLogprob `json:"top_logprobs,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field TopLogprobs respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionGetResponseChoiceLogprobsRefusal) RawJSON ¶
func (r ChatCompletionGetResponseChoiceLogprobsRefusal) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceLogprobsRefusal) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceLogprobsRefusal) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceLogprobsRefusalTopLogprob ¶
type ChatCompletionGetResponseChoiceLogprobsRefusalTopLogprob struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The top log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionGetResponseChoiceLogprobsRefusalTopLogprob) RawJSON ¶
func (r ChatCompletionGetResponseChoiceLogprobsRefusalTopLogprob) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceLogprobsRefusalTopLogprob) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceLogprobsRefusalTopLogprob) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageAssistant ¶
type ChatCompletionGetResponseChoiceMessageAssistant struct { // Must be "assistant" to identify this as the model's response Role constant.Assistant `json:"role,required"` // The content of the model's response Content ChatCompletionGetResponseChoiceMessageAssistantContentUnion `json:"content"` // (Optional) The name of the assistant message participant. Name string `json:"name"` // List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object. ToolCalls []ChatCompletionGetResponseChoiceMessageAssistantToolCall `json:"tool_calls"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Role respjson.Field Content respjson.Field Name respjson.Field ToolCalls respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.
func (ChatCompletionGetResponseChoiceMessageAssistant) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageAssistant) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageAssistant) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageAssistant) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem ¶
type ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageAssistantContentUnion ¶
type ChatCompletionGetResponseChoiceMessageAssistantContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem] instead of // an object. OfChatCompletionGetResponseChoiceMessageAssistantContentArray []ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionGetResponseChoiceMessageAssistantContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseChoiceMessageAssistantContentUnion contains all possible properties and values from [string], [[]ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionGetResponseChoiceMessageAssistantContentArray]
func (ChatCompletionGetResponseChoiceMessageAssistantContentUnion) AsChatCompletionGetResponseChoiceMessageAssistantContentArray ¶
func (u ChatCompletionGetResponseChoiceMessageAssistantContentUnion) AsChatCompletionGetResponseChoiceMessageAssistantContentArray() (v []ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem)
func (ChatCompletionGetResponseChoiceMessageAssistantContentUnion) AsString ¶
func (u ChatCompletionGetResponseChoiceMessageAssistantContentUnion) AsString() (v string)
func (ChatCompletionGetResponseChoiceMessageAssistantContentUnion) RawJSON ¶
func (u ChatCompletionGetResponseChoiceMessageAssistantContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageAssistantContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageAssistantContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageAssistantToolCall ¶
type ChatCompletionGetResponseChoiceMessageAssistantToolCall struct { // Must be "function" to identify this as a function call Type constant.Function `json:"type,required"` // (Optional) Unique identifier for the tool call ID string `json:"id"` // (Optional) Function call details Function ChatCompletionGetResponseChoiceMessageAssistantToolCallFunction `json:"function"` // (Optional) Index of the tool call in the list Index int64 `json:"index"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Type respjson.Field ID respjson.Field Function respjson.Field Index respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Tool call specification for OpenAI-compatible chat completion responses.
func (ChatCompletionGetResponseChoiceMessageAssistantToolCall) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageAssistantToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageAssistantToolCall) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageAssistantToolCall) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageAssistantToolCallFunction ¶
type ChatCompletionGetResponseChoiceMessageAssistantToolCallFunction struct { // (Optional) Arguments to pass to the function as a JSON string Arguments string `json:"arguments"` // (Optional) Name of the function to call Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Function call details
func (ChatCompletionGetResponseChoiceMessageAssistantToolCallFunction) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageAssistantToolCallFunction) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageAssistantToolCallFunction) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageAssistantToolCallFunction) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageDeveloper ¶
type ChatCompletionGetResponseChoiceMessageDeveloper struct { // The content of the developer message Content ChatCompletionGetResponseChoiceMessageDeveloperContentUnion `json:"content,required"` // Must be "developer" to identify this as a developer message Role constant.Developer `json:"role,required"` // (Optional) The name of the developer message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message from the developer in an OpenAI-compatible chat completion request.
func (ChatCompletionGetResponseChoiceMessageDeveloper) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageDeveloper) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageDeveloper) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageDeveloper) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem ¶
type ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageDeveloperContentUnion ¶
type ChatCompletionGetResponseChoiceMessageDeveloperContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem] instead of // an object. OfChatCompletionGetResponseChoiceMessageDeveloperContentArray []ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionGetResponseChoiceMessageDeveloperContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseChoiceMessageDeveloperContentUnion contains all possible properties and values from [string], [[]ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionGetResponseChoiceMessageDeveloperContentArray]
func (ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) AsChatCompletionGetResponseChoiceMessageDeveloperContentArray ¶
func (u ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) AsChatCompletionGetResponseChoiceMessageDeveloperContentArray() (v []ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem)
func (ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) AsString ¶
func (u ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) AsString() (v string)
func (ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) RawJSON ¶
func (u ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageSystem ¶
type ChatCompletionGetResponseChoiceMessageSystem struct { // The content of the "system prompt". If multiple system messages are provided, // they are concatenated. The underlying Llama Stack code may also add other system // messages (for example, for formatting tool definitions). Content ChatCompletionGetResponseChoiceMessageSystemContentUnion `json:"content,required"` // Must be "system" to identify this as a system message Role constant.System `json:"role,required"` // (Optional) The name of the system message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A system message providing instructions or context to the model.
func (ChatCompletionGetResponseChoiceMessageSystem) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageSystem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageSystem) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageSystem) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageSystemContentArrayItem ¶
type ChatCompletionGetResponseChoiceMessageSystemContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionGetResponseChoiceMessageSystemContentArrayItem) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageSystemContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageSystemContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageSystemContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageSystemContentUnion ¶
type ChatCompletionGetResponseChoiceMessageSystemContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseChoiceMessageSystemContentArrayItem] instead of an // object. OfChatCompletionGetResponseChoiceMessageSystemContentArray []ChatCompletionGetResponseChoiceMessageSystemContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionGetResponseChoiceMessageSystemContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseChoiceMessageSystemContentUnion contains all possible properties and values from [string], [[]ChatCompletionGetResponseChoiceMessageSystemContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionGetResponseChoiceMessageSystemContentArray]
func (ChatCompletionGetResponseChoiceMessageSystemContentUnion) AsChatCompletionGetResponseChoiceMessageSystemContentArray ¶
func (u ChatCompletionGetResponseChoiceMessageSystemContentUnion) AsChatCompletionGetResponseChoiceMessageSystemContentArray() (v []ChatCompletionGetResponseChoiceMessageSystemContentArrayItem)
func (ChatCompletionGetResponseChoiceMessageSystemContentUnion) AsString ¶
func (u ChatCompletionGetResponseChoiceMessageSystemContentUnion) AsString() (v string)
func (ChatCompletionGetResponseChoiceMessageSystemContentUnion) RawJSON ¶
func (u ChatCompletionGetResponseChoiceMessageSystemContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageSystemContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageSystemContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageTool ¶
type ChatCompletionGetResponseChoiceMessageTool struct { // The response content from the tool Content ChatCompletionGetResponseChoiceMessageToolContentUnion `json:"content,required"` // Must be "tool" to identify this as a tool response Role constant.Tool `json:"role,required"` // Unique identifier for the tool call this response is for ToolCallID string `json:"tool_call_id,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field ToolCallID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message representing the result of a tool invocation in an OpenAI-compatible chat completion request.
func (ChatCompletionGetResponseChoiceMessageTool) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageTool) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageTool) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageToolContentArrayItem ¶
type ChatCompletionGetResponseChoiceMessageToolContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionGetResponseChoiceMessageToolContentArrayItem) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageToolContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageToolContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageToolContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageToolContentUnion ¶
type ChatCompletionGetResponseChoiceMessageToolContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseChoiceMessageToolContentArrayItem] instead of an // object. OfChatCompletionGetResponseChoiceMessageToolContentArray []ChatCompletionGetResponseChoiceMessageToolContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionGetResponseChoiceMessageToolContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseChoiceMessageToolContentUnion contains all possible properties and values from [string], [[]ChatCompletionGetResponseChoiceMessageToolContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionGetResponseChoiceMessageToolContentArray]
func (ChatCompletionGetResponseChoiceMessageToolContentUnion) AsChatCompletionGetResponseChoiceMessageToolContentArray ¶
func (u ChatCompletionGetResponseChoiceMessageToolContentUnion) AsChatCompletionGetResponseChoiceMessageToolContentArray() (v []ChatCompletionGetResponseChoiceMessageToolContentArrayItem)
func (ChatCompletionGetResponseChoiceMessageToolContentUnion) AsString ¶
func (u ChatCompletionGetResponseChoiceMessageToolContentUnion) AsString() (v string)
func (ChatCompletionGetResponseChoiceMessageToolContentUnion) RawJSON ¶
func (u ChatCompletionGetResponseChoiceMessageToolContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageToolContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageToolContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageUnion ¶
type ChatCompletionGetResponseChoiceMessageUnion struct { // This field is a union of // [ChatCompletionGetResponseChoiceMessageUserContentUnion], // [ChatCompletionGetResponseChoiceMessageSystemContentUnion], // [ChatCompletionGetResponseChoiceMessageAssistantContentUnion], // [ChatCompletionGetResponseChoiceMessageToolContentUnion], // [ChatCompletionGetResponseChoiceMessageDeveloperContentUnion] Content ChatCompletionGetResponseChoiceMessageUnionContent `json:"content"` // Any of "user", "system", "assistant", "tool", "developer". Role string `json:"role"` Name string `json:"name"` // This field is from variant [ChatCompletionGetResponseChoiceMessageAssistant]. ToolCalls []ChatCompletionGetResponseChoiceMessageAssistantToolCall `json:"tool_calls"` // This field is from variant [ChatCompletionGetResponseChoiceMessageTool]. ToolCallID string `json:"tool_call_id"` JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ToolCalls respjson.Field ToolCallID respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseChoiceMessageUnion contains all possible properties and values from ChatCompletionGetResponseChoiceMessageUser, ChatCompletionGetResponseChoiceMessageSystem, ChatCompletionGetResponseChoiceMessageAssistant, ChatCompletionGetResponseChoiceMessageTool, ChatCompletionGetResponseChoiceMessageDeveloper.
Use the ChatCompletionGetResponseChoiceMessageUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ChatCompletionGetResponseChoiceMessageUnion) AsAny ¶
func (u ChatCompletionGetResponseChoiceMessageUnion) AsAny() anyChatCompletionGetResponseChoiceMessage
Use the following switch statement to find the correct variant
switch variant := ChatCompletionGetResponseChoiceMessageUnion.AsAny().(type) { case llamastackclient.ChatCompletionGetResponseChoiceMessageUser: case llamastackclient.ChatCompletionGetResponseChoiceMessageSystem: case llamastackclient.ChatCompletionGetResponseChoiceMessageAssistant: case llamastackclient.ChatCompletionGetResponseChoiceMessageTool: case llamastackclient.ChatCompletionGetResponseChoiceMessageDeveloper: default: fmt.Errorf("no variant present") }
func (ChatCompletionGetResponseChoiceMessageUnion) AsAssistant ¶
func (u ChatCompletionGetResponseChoiceMessageUnion) AsAssistant() (v ChatCompletionGetResponseChoiceMessageAssistant)
func (ChatCompletionGetResponseChoiceMessageUnion) AsDeveloper ¶
func (u ChatCompletionGetResponseChoiceMessageUnion) AsDeveloper() (v ChatCompletionGetResponseChoiceMessageDeveloper)
func (ChatCompletionGetResponseChoiceMessageUnion) AsSystem ¶
func (u ChatCompletionGetResponseChoiceMessageUnion) AsSystem() (v ChatCompletionGetResponseChoiceMessageSystem)
func (ChatCompletionGetResponseChoiceMessageUnion) AsTool ¶
func (u ChatCompletionGetResponseChoiceMessageUnion) AsTool() (v ChatCompletionGetResponseChoiceMessageTool)
func (ChatCompletionGetResponseChoiceMessageUnion) AsUser ¶
func (u ChatCompletionGetResponseChoiceMessageUnion) AsUser() (v ChatCompletionGetResponseChoiceMessageUser)
func (ChatCompletionGetResponseChoiceMessageUnion) RawJSON ¶
func (u ChatCompletionGetResponseChoiceMessageUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageUnionContent ¶
type ChatCompletionGetResponseChoiceMessageUnionContent struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion] instead of // an object. OfChatCompletionGetResponseChoiceMessageUserContentArray []ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseChoiceMessageSystemContentArrayItem] instead of an // object. OfChatCompletionGetResponseChoiceMessageSystemContentArray []ChatCompletionGetResponseChoiceMessageSystemContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem] instead of // an object. OfChatCompletionGetResponseChoiceMessageAssistantContentArray []ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseChoiceMessageToolContentArrayItem] instead of an // object. OfChatCompletionGetResponseChoiceMessageToolContentArray []ChatCompletionGetResponseChoiceMessageToolContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem] instead of // an object. OfChatCompletionGetResponseChoiceMessageDeveloperContentArray []ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionGetResponseChoiceMessageUserContentArray respjson.Field OfChatCompletionGetResponseChoiceMessageSystemContentArray respjson.Field OfChatCompletionGetResponseChoiceMessageAssistantContentArray respjson.Field OfChatCompletionGetResponseChoiceMessageToolContentArray respjson.Field OfChatCompletionGetResponseChoiceMessageDeveloperContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseChoiceMessageUnionContent is an implicit subunion of ChatCompletionGetResponseChoiceMessageUnion. ChatCompletionGetResponseChoiceMessageUnionContent provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ChatCompletionGetResponseChoiceMessageUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionGetResponseChoiceMessageUserContentArray OfChatCompletionGetResponseChoiceMessageSystemContentArray OfChatCompletionGetResponseChoiceMessageAssistantContentArray OfChatCompletionGetResponseChoiceMessageToolContentArray OfChatCompletionGetResponseChoiceMessageDeveloperContentArray]
func (*ChatCompletionGetResponseChoiceMessageUnionContent) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageUnionContent) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageUser ¶
type ChatCompletionGetResponseChoiceMessageUser struct { // The content of the message, which can include text and other media Content ChatCompletionGetResponseChoiceMessageUserContentUnion `json:"content,required"` // Must be "user" to identify this as a user message Role constant.User `json:"role,required"` // (Optional) The name of the user message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message from the user in an OpenAI-compatible chat completion request.
func (ChatCompletionGetResponseChoiceMessageUser) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageUser) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageUser) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageUserContentArrayItemFile ¶
type ChatCompletionGetResponseChoiceMessageUserContentArrayItemFile struct { File ChatCompletionGetResponseChoiceMessageUserContentArrayItemFileFile `json:"file,required"` Type constant.File `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { File respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ChatCompletionGetResponseChoiceMessageUserContentArrayItemFile) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageUserContentArrayItemFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageUserContentArrayItemFile) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageUserContentArrayItemFile) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageUserContentArrayItemFileFile ¶
type ChatCompletionGetResponseChoiceMessageUserContentArrayItemFileFile struct { FileData string `json:"file_data"` FileID string `json:"file_id"` Filename string `json:"filename"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileData respjson.Field FileID respjson.Field Filename respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ChatCompletionGetResponseChoiceMessageUserContentArrayItemFileFile) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageUserContentArrayItemFileFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageUserContentArrayItemFileFile) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageUserContentArrayItemFileFile) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURL ¶
type ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURL struct { // Image URL specification and processing details ImageURL ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURLImageURL `json:"image_url,required"` // Must be "image_url" to identify this as image content Type constant.ImageURL `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ImageURL respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image content part for OpenAI-compatible chat completion messages.
func (ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURL) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURL) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURL) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURLImageURL ¶
type ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURLImageURL struct { // URL of the image to include in the message URL string `json:"url,required"` // (Optional) Level of detail for image processing. Can be "low", "high", or "auto" Detail string `json:"detail"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { URL respjson.Field Detail respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image URL specification and processing details
func (ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURLImageURL) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURLImageURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageUserContentArrayItemText ¶
type ChatCompletionGetResponseChoiceMessageUserContentArrayItemText struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionGetResponseChoiceMessageUserContentArrayItemText) RawJSON ¶
func (r ChatCompletionGetResponseChoiceMessageUserContentArrayItemText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageUserContentArrayItemText) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageUserContentArrayItemText) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion ¶
type ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion struct { // This field is from variant // [ChatCompletionGetResponseChoiceMessageUserContentArrayItemText]. Text string `json:"text"` // Any of "text", "image_url", "file". Type string `json:"type"` // This field is from variant // [ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURL]. ImageURL ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURLImageURL `json:"image_url"` // This field is from variant // [ChatCompletionGetResponseChoiceMessageUserContentArrayItemFile]. File ChatCompletionGetResponseChoiceMessageUserContentArrayItemFileFile `json:"file"` JSON struct { Text respjson.Field Type respjson.Field ImageURL respjson.Field File respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion contains all possible properties and values from ChatCompletionGetResponseChoiceMessageUserContentArrayItemText, ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURL, ChatCompletionGetResponseChoiceMessageUserContentArrayItemFile.
Use the ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) AsAny ¶
func (u ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) AsAny() anyChatCompletionGetResponseChoiceMessageUserContentArrayItem
Use the following switch statement to find the correct variant
switch variant := ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion.AsAny().(type) { case llamastackclient.ChatCompletionGetResponseChoiceMessageUserContentArrayItemText: case llamastackclient.ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURL: case llamastackclient.ChatCompletionGetResponseChoiceMessageUserContentArrayItemFile: default: fmt.Errorf("no variant present") }
func (ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) AsImageURL ¶
func (ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) RawJSON ¶
func (u ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseChoiceMessageUserContentUnion ¶
type ChatCompletionGetResponseChoiceMessageUserContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion] instead of // an object. OfChatCompletionGetResponseChoiceMessageUserContentArray []ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionGetResponseChoiceMessageUserContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseChoiceMessageUserContentUnion contains all possible properties and values from [string], [[]ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionGetResponseChoiceMessageUserContentArray]
func (ChatCompletionGetResponseChoiceMessageUserContentUnion) AsChatCompletionGetResponseChoiceMessageUserContentArray ¶
func (u ChatCompletionGetResponseChoiceMessageUserContentUnion) AsChatCompletionGetResponseChoiceMessageUserContentArray() (v []ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion)
func (ChatCompletionGetResponseChoiceMessageUserContentUnion) AsString ¶
func (u ChatCompletionGetResponseChoiceMessageUserContentUnion) AsString() (v string)
func (ChatCompletionGetResponseChoiceMessageUserContentUnion) RawJSON ¶
func (u ChatCompletionGetResponseChoiceMessageUserContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseChoiceMessageUserContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseChoiceMessageUserContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageAssistant ¶
type ChatCompletionGetResponseInputMessageAssistant struct { // Must be "assistant" to identify this as the model's response Role constant.Assistant `json:"role,required"` // The content of the model's response Content ChatCompletionGetResponseInputMessageAssistantContentUnion `json:"content"` // (Optional) The name of the assistant message participant. Name string `json:"name"` // List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object. ToolCalls []ChatCompletionGetResponseInputMessageAssistantToolCall `json:"tool_calls"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Role respjson.Field Content respjson.Field Name respjson.Field ToolCalls respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.
func (ChatCompletionGetResponseInputMessageAssistant) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageAssistant) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageAssistant) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageAssistant) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageAssistantContentArrayItem ¶
type ChatCompletionGetResponseInputMessageAssistantContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionGetResponseInputMessageAssistantContentArrayItem) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageAssistantContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageAssistantContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageAssistantContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageAssistantContentUnion ¶
type ChatCompletionGetResponseInputMessageAssistantContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseInputMessageAssistantContentArrayItem] instead of an // object. OfChatCompletionGetResponseInputMessageAssistantContentArray []ChatCompletionGetResponseInputMessageAssistantContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionGetResponseInputMessageAssistantContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseInputMessageAssistantContentUnion contains all possible properties and values from [string], [[]ChatCompletionGetResponseInputMessageAssistantContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionGetResponseInputMessageAssistantContentArray]
func (ChatCompletionGetResponseInputMessageAssistantContentUnion) AsChatCompletionGetResponseInputMessageAssistantContentArray ¶
func (u ChatCompletionGetResponseInputMessageAssistantContentUnion) AsChatCompletionGetResponseInputMessageAssistantContentArray() (v []ChatCompletionGetResponseInputMessageAssistantContentArrayItem)
func (ChatCompletionGetResponseInputMessageAssistantContentUnion) AsString ¶
func (u ChatCompletionGetResponseInputMessageAssistantContentUnion) AsString() (v string)
func (ChatCompletionGetResponseInputMessageAssistantContentUnion) RawJSON ¶
func (u ChatCompletionGetResponseInputMessageAssistantContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageAssistantContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageAssistantContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageAssistantToolCall ¶
type ChatCompletionGetResponseInputMessageAssistantToolCall struct { // Must be "function" to identify this as a function call Type constant.Function `json:"type,required"` // (Optional) Unique identifier for the tool call ID string `json:"id"` // (Optional) Function call details Function ChatCompletionGetResponseInputMessageAssistantToolCallFunction `json:"function"` // (Optional) Index of the tool call in the list Index int64 `json:"index"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Type respjson.Field ID respjson.Field Function respjson.Field Index respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Tool call specification for OpenAI-compatible chat completion responses.
func (ChatCompletionGetResponseInputMessageAssistantToolCall) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageAssistantToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageAssistantToolCall) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageAssistantToolCall) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageAssistantToolCallFunction ¶
type ChatCompletionGetResponseInputMessageAssistantToolCallFunction struct { // (Optional) Arguments to pass to the function as a JSON string Arguments string `json:"arguments"` // (Optional) Name of the function to call Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Function call details
func (ChatCompletionGetResponseInputMessageAssistantToolCallFunction) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageAssistantToolCallFunction) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageAssistantToolCallFunction) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageAssistantToolCallFunction) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageDeveloper ¶
type ChatCompletionGetResponseInputMessageDeveloper struct { // The content of the developer message Content ChatCompletionGetResponseInputMessageDeveloperContentUnion `json:"content,required"` // Must be "developer" to identify this as a developer message Role constant.Developer `json:"role,required"` // (Optional) The name of the developer message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message from the developer in an OpenAI-compatible chat completion request.
func (ChatCompletionGetResponseInputMessageDeveloper) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageDeveloper) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageDeveloper) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageDeveloper) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageDeveloperContentArrayItem ¶
type ChatCompletionGetResponseInputMessageDeveloperContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionGetResponseInputMessageDeveloperContentArrayItem) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageDeveloperContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageDeveloperContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageDeveloperContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageDeveloperContentUnion ¶
type ChatCompletionGetResponseInputMessageDeveloperContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseInputMessageDeveloperContentArrayItem] instead of an // object. OfChatCompletionGetResponseInputMessageDeveloperContentArray []ChatCompletionGetResponseInputMessageDeveloperContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionGetResponseInputMessageDeveloperContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseInputMessageDeveloperContentUnion contains all possible properties and values from [string], [[]ChatCompletionGetResponseInputMessageDeveloperContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionGetResponseInputMessageDeveloperContentArray]
func (ChatCompletionGetResponseInputMessageDeveloperContentUnion) AsChatCompletionGetResponseInputMessageDeveloperContentArray ¶
func (u ChatCompletionGetResponseInputMessageDeveloperContentUnion) AsChatCompletionGetResponseInputMessageDeveloperContentArray() (v []ChatCompletionGetResponseInputMessageDeveloperContentArrayItem)
func (ChatCompletionGetResponseInputMessageDeveloperContentUnion) AsString ¶
func (u ChatCompletionGetResponseInputMessageDeveloperContentUnion) AsString() (v string)
func (ChatCompletionGetResponseInputMessageDeveloperContentUnion) RawJSON ¶
func (u ChatCompletionGetResponseInputMessageDeveloperContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageDeveloperContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageDeveloperContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageSystem ¶
type ChatCompletionGetResponseInputMessageSystem struct { // The content of the "system prompt". If multiple system messages are provided, // they are concatenated. The underlying Llama Stack code may also add other system // messages (for example, for formatting tool definitions). Content ChatCompletionGetResponseInputMessageSystemContentUnion `json:"content,required"` // Must be "system" to identify this as a system message Role constant.System `json:"role,required"` // (Optional) The name of the system message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A system message providing instructions or context to the model.
func (ChatCompletionGetResponseInputMessageSystem) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageSystem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageSystem) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageSystem) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageSystemContentArrayItem ¶
type ChatCompletionGetResponseInputMessageSystemContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionGetResponseInputMessageSystemContentArrayItem) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageSystemContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageSystemContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageSystemContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageSystemContentUnion ¶
type ChatCompletionGetResponseInputMessageSystemContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseInputMessageSystemContentArrayItem] instead of an // object. OfChatCompletionGetResponseInputMessageSystemContentArray []ChatCompletionGetResponseInputMessageSystemContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionGetResponseInputMessageSystemContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseInputMessageSystemContentUnion contains all possible properties and values from [string], [[]ChatCompletionGetResponseInputMessageSystemContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionGetResponseInputMessageSystemContentArray]
func (ChatCompletionGetResponseInputMessageSystemContentUnion) AsChatCompletionGetResponseInputMessageSystemContentArray ¶
func (u ChatCompletionGetResponseInputMessageSystemContentUnion) AsChatCompletionGetResponseInputMessageSystemContentArray() (v []ChatCompletionGetResponseInputMessageSystemContentArrayItem)
func (ChatCompletionGetResponseInputMessageSystemContentUnion) AsString ¶
func (u ChatCompletionGetResponseInputMessageSystemContentUnion) AsString() (v string)
func (ChatCompletionGetResponseInputMessageSystemContentUnion) RawJSON ¶
func (u ChatCompletionGetResponseInputMessageSystemContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageSystemContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageSystemContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageTool ¶
type ChatCompletionGetResponseInputMessageTool struct { // The response content from the tool Content ChatCompletionGetResponseInputMessageToolContentUnion `json:"content,required"` // Must be "tool" to identify this as a tool response Role constant.Tool `json:"role,required"` // Unique identifier for the tool call this response is for ToolCallID string `json:"tool_call_id,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field ToolCallID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message representing the result of a tool invocation in an OpenAI-compatible chat completion request.
func (ChatCompletionGetResponseInputMessageTool) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageTool) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageTool) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageToolContentArrayItem ¶
type ChatCompletionGetResponseInputMessageToolContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionGetResponseInputMessageToolContentArrayItem) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageToolContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageToolContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageToolContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageToolContentUnion ¶
type ChatCompletionGetResponseInputMessageToolContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseInputMessageToolContentArrayItem] instead of an // object. OfChatCompletionGetResponseInputMessageToolContentArray []ChatCompletionGetResponseInputMessageToolContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionGetResponseInputMessageToolContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseInputMessageToolContentUnion contains all possible properties and values from [string], [[]ChatCompletionGetResponseInputMessageToolContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionGetResponseInputMessageToolContentArray]
func (ChatCompletionGetResponseInputMessageToolContentUnion) AsChatCompletionGetResponseInputMessageToolContentArray ¶
func (u ChatCompletionGetResponseInputMessageToolContentUnion) AsChatCompletionGetResponseInputMessageToolContentArray() (v []ChatCompletionGetResponseInputMessageToolContentArrayItem)
func (ChatCompletionGetResponseInputMessageToolContentUnion) AsString ¶
func (u ChatCompletionGetResponseInputMessageToolContentUnion) AsString() (v string)
func (ChatCompletionGetResponseInputMessageToolContentUnion) RawJSON ¶
func (u ChatCompletionGetResponseInputMessageToolContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageToolContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageToolContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageUnion ¶
type ChatCompletionGetResponseInputMessageUnion struct { // This field is a union of // [ChatCompletionGetResponseInputMessageUserContentUnion], // [ChatCompletionGetResponseInputMessageSystemContentUnion], // [ChatCompletionGetResponseInputMessageAssistantContentUnion], // [ChatCompletionGetResponseInputMessageToolContentUnion], // [ChatCompletionGetResponseInputMessageDeveloperContentUnion] Content ChatCompletionGetResponseInputMessageUnionContent `json:"content"` // Any of "user", "system", "assistant", "tool", "developer". Role string `json:"role"` Name string `json:"name"` // This field is from variant [ChatCompletionGetResponseInputMessageAssistant]. ToolCalls []ChatCompletionGetResponseInputMessageAssistantToolCall `json:"tool_calls"` // This field is from variant [ChatCompletionGetResponseInputMessageTool]. ToolCallID string `json:"tool_call_id"` JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ToolCalls respjson.Field ToolCallID respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseInputMessageUnion contains all possible properties and values from ChatCompletionGetResponseInputMessageUser, ChatCompletionGetResponseInputMessageSystem, ChatCompletionGetResponseInputMessageAssistant, ChatCompletionGetResponseInputMessageTool, ChatCompletionGetResponseInputMessageDeveloper.
Use the ChatCompletionGetResponseInputMessageUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ChatCompletionGetResponseInputMessageUnion) AsAny ¶
func (u ChatCompletionGetResponseInputMessageUnion) AsAny() anyChatCompletionGetResponseInputMessage
Use the following switch statement to find the correct variant
switch variant := ChatCompletionGetResponseInputMessageUnion.AsAny().(type) { case llamastackclient.ChatCompletionGetResponseInputMessageUser: case llamastackclient.ChatCompletionGetResponseInputMessageSystem: case llamastackclient.ChatCompletionGetResponseInputMessageAssistant: case llamastackclient.ChatCompletionGetResponseInputMessageTool: case llamastackclient.ChatCompletionGetResponseInputMessageDeveloper: default: fmt.Errorf("no variant present") }
func (ChatCompletionGetResponseInputMessageUnion) AsAssistant ¶
func (u ChatCompletionGetResponseInputMessageUnion) AsAssistant() (v ChatCompletionGetResponseInputMessageAssistant)
func (ChatCompletionGetResponseInputMessageUnion) AsDeveloper ¶
func (u ChatCompletionGetResponseInputMessageUnion) AsDeveloper() (v ChatCompletionGetResponseInputMessageDeveloper)
func (ChatCompletionGetResponseInputMessageUnion) AsSystem ¶
func (u ChatCompletionGetResponseInputMessageUnion) AsSystem() (v ChatCompletionGetResponseInputMessageSystem)
func (ChatCompletionGetResponseInputMessageUnion) AsTool ¶
func (u ChatCompletionGetResponseInputMessageUnion) AsTool() (v ChatCompletionGetResponseInputMessageTool)
func (ChatCompletionGetResponseInputMessageUnion) AsUser ¶
func (u ChatCompletionGetResponseInputMessageUnion) AsUser() (v ChatCompletionGetResponseInputMessageUser)
func (ChatCompletionGetResponseInputMessageUnion) RawJSON ¶
func (u ChatCompletionGetResponseInputMessageUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageUnionContent ¶
type ChatCompletionGetResponseInputMessageUnionContent struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseInputMessageUserContentArrayItemUnion] instead of an // object. OfChatCompletionGetResponseInputMessageUserContentArray []ChatCompletionGetResponseInputMessageUserContentArrayItemUnion `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseInputMessageSystemContentArrayItem] instead of an // object. OfChatCompletionGetResponseInputMessageSystemContentArray []ChatCompletionGetResponseInputMessageSystemContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseInputMessageAssistantContentArrayItem] instead of an // object. OfChatCompletionGetResponseInputMessageAssistantContentArray []ChatCompletionGetResponseInputMessageAssistantContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseInputMessageToolContentArrayItem] instead of an // object. OfChatCompletionGetResponseInputMessageToolContentArray []ChatCompletionGetResponseInputMessageToolContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseInputMessageDeveloperContentArrayItem] instead of an // object. OfChatCompletionGetResponseInputMessageDeveloperContentArray []ChatCompletionGetResponseInputMessageDeveloperContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionGetResponseInputMessageUserContentArray respjson.Field OfChatCompletionGetResponseInputMessageSystemContentArray respjson.Field OfChatCompletionGetResponseInputMessageAssistantContentArray respjson.Field OfChatCompletionGetResponseInputMessageToolContentArray respjson.Field OfChatCompletionGetResponseInputMessageDeveloperContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseInputMessageUnionContent is an implicit subunion of ChatCompletionGetResponseInputMessageUnion. ChatCompletionGetResponseInputMessageUnionContent provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ChatCompletionGetResponseInputMessageUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionGetResponseInputMessageUserContentArray OfChatCompletionGetResponseInputMessageSystemContentArray OfChatCompletionGetResponseInputMessageAssistantContentArray OfChatCompletionGetResponseInputMessageToolContentArray OfChatCompletionGetResponseInputMessageDeveloperContentArray]
func (*ChatCompletionGetResponseInputMessageUnionContent) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageUnionContent) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageUser ¶
type ChatCompletionGetResponseInputMessageUser struct { // The content of the message, which can include text and other media Content ChatCompletionGetResponseInputMessageUserContentUnion `json:"content,required"` // Must be "user" to identify this as a user message Role constant.User `json:"role,required"` // (Optional) The name of the user message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message from the user in an OpenAI-compatible chat completion request.
func (ChatCompletionGetResponseInputMessageUser) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageUser) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageUser) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageUserContentArrayItemFile ¶
type ChatCompletionGetResponseInputMessageUserContentArrayItemFile struct { File ChatCompletionGetResponseInputMessageUserContentArrayItemFileFile `json:"file,required"` Type constant.File `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { File respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ChatCompletionGetResponseInputMessageUserContentArrayItemFile) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageUserContentArrayItemFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageUserContentArrayItemFile) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageUserContentArrayItemFile) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageUserContentArrayItemFileFile ¶
type ChatCompletionGetResponseInputMessageUserContentArrayItemFileFile struct { FileData string `json:"file_data"` FileID string `json:"file_id"` Filename string `json:"filename"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileData respjson.Field FileID respjson.Field Filename respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ChatCompletionGetResponseInputMessageUserContentArrayItemFileFile) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageUserContentArrayItemFileFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageUserContentArrayItemFileFile) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageUserContentArrayItemFileFile) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageUserContentArrayItemImageURL ¶
type ChatCompletionGetResponseInputMessageUserContentArrayItemImageURL struct { // Image URL specification and processing details ImageURL ChatCompletionGetResponseInputMessageUserContentArrayItemImageURLImageURL `json:"image_url,required"` // Must be "image_url" to identify this as image content Type constant.ImageURL `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ImageURL respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image content part for OpenAI-compatible chat completion messages.
func (ChatCompletionGetResponseInputMessageUserContentArrayItemImageURL) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageUserContentArrayItemImageURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageUserContentArrayItemImageURL) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageUserContentArrayItemImageURL) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageUserContentArrayItemImageURLImageURL ¶
type ChatCompletionGetResponseInputMessageUserContentArrayItemImageURLImageURL struct { // URL of the image to include in the message URL string `json:"url,required"` // (Optional) Level of detail for image processing. Can be "low", "high", or "auto" Detail string `json:"detail"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { URL respjson.Field Detail respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image URL specification and processing details
func (ChatCompletionGetResponseInputMessageUserContentArrayItemImageURLImageURL) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageUserContentArrayItemImageURLImageURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageUserContentArrayItemText ¶
type ChatCompletionGetResponseInputMessageUserContentArrayItemText struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionGetResponseInputMessageUserContentArrayItemText) RawJSON ¶
func (r ChatCompletionGetResponseInputMessageUserContentArrayItemText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageUserContentArrayItemText) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageUserContentArrayItemText) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageUserContentArrayItemUnion ¶
type ChatCompletionGetResponseInputMessageUserContentArrayItemUnion struct { // This field is from variant // [ChatCompletionGetResponseInputMessageUserContentArrayItemText]. Text string `json:"text"` // Any of "text", "image_url", "file". Type string `json:"type"` // This field is from variant // [ChatCompletionGetResponseInputMessageUserContentArrayItemImageURL]. ImageURL ChatCompletionGetResponseInputMessageUserContentArrayItemImageURLImageURL `json:"image_url"` // This field is from variant // [ChatCompletionGetResponseInputMessageUserContentArrayItemFile]. File ChatCompletionGetResponseInputMessageUserContentArrayItemFileFile `json:"file"` JSON struct { Text respjson.Field Type respjson.Field ImageURL respjson.Field File respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseInputMessageUserContentArrayItemUnion contains all possible properties and values from ChatCompletionGetResponseInputMessageUserContentArrayItemText, ChatCompletionGetResponseInputMessageUserContentArrayItemImageURL, ChatCompletionGetResponseInputMessageUserContentArrayItemFile.
Use the ChatCompletionGetResponseInputMessageUserContentArrayItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) AsAny ¶
func (u ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) AsAny() anyChatCompletionGetResponseInputMessageUserContentArrayItem
Use the following switch statement to find the correct variant
switch variant := ChatCompletionGetResponseInputMessageUserContentArrayItemUnion.AsAny().(type) { case llamastackclient.ChatCompletionGetResponseInputMessageUserContentArrayItemText: case llamastackclient.ChatCompletionGetResponseInputMessageUserContentArrayItemImageURL: case llamastackclient.ChatCompletionGetResponseInputMessageUserContentArrayItemFile: default: fmt.Errorf("no variant present") }
func (ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) AsImageURL ¶
func (ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) RawJSON ¶
func (u ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ChatCompletionGetResponseInputMessageUserContentUnion ¶
type ChatCompletionGetResponseInputMessageUserContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionGetResponseInputMessageUserContentArrayItemUnion] instead of an // object. OfChatCompletionGetResponseInputMessageUserContentArray []ChatCompletionGetResponseInputMessageUserContentArrayItemUnion `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionGetResponseInputMessageUserContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionGetResponseInputMessageUserContentUnion contains all possible properties and values from [string], [[]ChatCompletionGetResponseInputMessageUserContentArrayItemUnion].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionGetResponseInputMessageUserContentArray]
func (ChatCompletionGetResponseInputMessageUserContentUnion) AsChatCompletionGetResponseInputMessageUserContentArray ¶
func (u ChatCompletionGetResponseInputMessageUserContentUnion) AsChatCompletionGetResponseInputMessageUserContentArray() (v []ChatCompletionGetResponseInputMessageUserContentArrayItemUnion)
func (ChatCompletionGetResponseInputMessageUserContentUnion) AsString ¶
func (u ChatCompletionGetResponseInputMessageUserContentUnion) AsString() (v string)
func (ChatCompletionGetResponseInputMessageUserContentUnion) RawJSON ¶
func (u ChatCompletionGetResponseInputMessageUserContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionGetResponseInputMessageUserContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionGetResponseInputMessageUserContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListParams ¶
type ChatCompletionListParams struct { // The ID of the last chat completion to return. After param.Opt[string] `query:"after,omitzero" json:"-"` // The maximum number of chat completions to return. Limit param.Opt[int64] `query:"limit,omitzero" json:"-"` // The model to filter by. Model param.Opt[string] `query:"model,omitzero" json:"-"` // The order to sort the chat completions by: "asc" or "desc". Defaults to "desc". // // Any of "asc", "desc". Order ChatCompletionListParamsOrder `query:"order,omitzero" json:"-"` // contains filtered or unexported fields }
func (ChatCompletionListParams) URLQuery ¶
func (r ChatCompletionListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ChatCompletionListParams's query parameters as `url.Values`.
type ChatCompletionListParamsOrder ¶
type ChatCompletionListParamsOrder string
The order to sort the chat completions by: "asc" or "desc". Defaults to "desc".
const ( ChatCompletionListParamsOrderAsc ChatCompletionListParamsOrder = "asc" ChatCompletionListParamsOrderDesc ChatCompletionListParamsOrder = "desc" )
type ChatCompletionListResponse ¶
type ChatCompletionListResponse struct { // The ID of the chat completion ID string `json:"id,required"` // List of choices Choices []ChatCompletionListResponseChoice `json:"choices,required"` // The Unix timestamp in seconds when the chat completion was created Created int64 `json:"created,required"` InputMessages []ChatCompletionListResponseInputMessageUnion `json:"input_messages,required"` // The model that was used to generate the chat completion Model string `json:"model,required"` // The object type, which will be "chat.completion" Object constant.ChatCompletion `json:"object,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Choices respjson.Field Created respjson.Field InputMessages respjson.Field Model respjson.Field Object respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ChatCompletionListResponse) RawJSON ¶
func (r ChatCompletionListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponse) UnmarshalJSON ¶
func (r *ChatCompletionListResponse) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoice ¶
type ChatCompletionListResponseChoice struct { // The reason the model stopped generating FinishReason string `json:"finish_reason,required"` // The index of the choice Index int64 `json:"index,required"` // The message from the model Message ChatCompletionListResponseChoiceMessageUnion `json:"message,required"` // (Optional) The log probabilities for the tokens in the message Logprobs ChatCompletionListResponseChoiceLogprobs `json:"logprobs"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FinishReason respjson.Field Index respjson.Field Message respjson.Field Logprobs respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A choice from an OpenAI-compatible chat completion response.
func (ChatCompletionListResponseChoice) RawJSON ¶
func (r ChatCompletionListResponseChoice) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoice) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoice) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceLogprobs ¶
type ChatCompletionListResponseChoiceLogprobs struct { // (Optional) The log probabilities for the tokens in the message Content []ChatCompletionListResponseChoiceLogprobsContent `json:"content"` // (Optional) The log probabilities for the tokens in the message Refusal []ChatCompletionListResponseChoiceLogprobsRefusal `json:"refusal"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Refusal respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) The log probabilities for the tokens in the message
func (ChatCompletionListResponseChoiceLogprobs) RawJSON ¶
func (r ChatCompletionListResponseChoiceLogprobs) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceLogprobs) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceLogprobs) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceLogprobsContent ¶
type ChatCompletionListResponseChoiceLogprobsContent struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` TopLogprobs []ChatCompletionListResponseChoiceLogprobsContentTopLogprob `json:"top_logprobs,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field TopLogprobs respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionListResponseChoiceLogprobsContent) RawJSON ¶
func (r ChatCompletionListResponseChoiceLogprobsContent) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceLogprobsContent) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceLogprobsContent) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceLogprobsContentTopLogprob ¶
type ChatCompletionListResponseChoiceLogprobsContentTopLogprob struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The top log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionListResponseChoiceLogprobsContentTopLogprob) RawJSON ¶
func (r ChatCompletionListResponseChoiceLogprobsContentTopLogprob) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceLogprobsContentTopLogprob) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceLogprobsContentTopLogprob) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceLogprobsRefusal ¶
type ChatCompletionListResponseChoiceLogprobsRefusal struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` TopLogprobs []ChatCompletionListResponseChoiceLogprobsRefusalTopLogprob `json:"top_logprobs,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field TopLogprobs respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionListResponseChoiceLogprobsRefusal) RawJSON ¶
func (r ChatCompletionListResponseChoiceLogprobsRefusal) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceLogprobsRefusal) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceLogprobsRefusal) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceLogprobsRefusalTopLogprob ¶
type ChatCompletionListResponseChoiceLogprobsRefusalTopLogprob struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The top log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionListResponseChoiceLogprobsRefusalTopLogprob) RawJSON ¶
func (r ChatCompletionListResponseChoiceLogprobsRefusalTopLogprob) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceLogprobsRefusalTopLogprob) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceLogprobsRefusalTopLogprob) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageAssistant ¶
type ChatCompletionListResponseChoiceMessageAssistant struct { // Must be "assistant" to identify this as the model's response Role constant.Assistant `json:"role,required"` // The content of the model's response Content ChatCompletionListResponseChoiceMessageAssistantContentUnion `json:"content"` // (Optional) The name of the assistant message participant. Name string `json:"name"` // List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object. ToolCalls []ChatCompletionListResponseChoiceMessageAssistantToolCall `json:"tool_calls"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Role respjson.Field Content respjson.Field Name respjson.Field ToolCalls respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.
func (ChatCompletionListResponseChoiceMessageAssistant) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageAssistant) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageAssistant) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageAssistant) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageAssistantContentArrayItem ¶
type ChatCompletionListResponseChoiceMessageAssistantContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionListResponseChoiceMessageAssistantContentArrayItem) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageAssistantContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageAssistantContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageAssistantContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageAssistantContentUnion ¶
type ChatCompletionListResponseChoiceMessageAssistantContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseChoiceMessageAssistantContentArrayItem] instead of // an object. OfChatCompletionListResponseChoiceMessageAssistantContentArray []ChatCompletionListResponseChoiceMessageAssistantContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionListResponseChoiceMessageAssistantContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseChoiceMessageAssistantContentUnion contains all possible properties and values from [string], [[]ChatCompletionListResponseChoiceMessageAssistantContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionListResponseChoiceMessageAssistantContentArray]
func (ChatCompletionListResponseChoiceMessageAssistantContentUnion) AsChatCompletionListResponseChoiceMessageAssistantContentArray ¶
func (u ChatCompletionListResponseChoiceMessageAssistantContentUnion) AsChatCompletionListResponseChoiceMessageAssistantContentArray() (v []ChatCompletionListResponseChoiceMessageAssistantContentArrayItem)
func (ChatCompletionListResponseChoiceMessageAssistantContentUnion) AsString ¶
func (u ChatCompletionListResponseChoiceMessageAssistantContentUnion) AsString() (v string)
func (ChatCompletionListResponseChoiceMessageAssistantContentUnion) RawJSON ¶
func (u ChatCompletionListResponseChoiceMessageAssistantContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageAssistantContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageAssistantContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageAssistantToolCall ¶
type ChatCompletionListResponseChoiceMessageAssistantToolCall struct { // Must be "function" to identify this as a function call Type constant.Function `json:"type,required"` // (Optional) Unique identifier for the tool call ID string `json:"id"` // (Optional) Function call details Function ChatCompletionListResponseChoiceMessageAssistantToolCallFunction `json:"function"` // (Optional) Index of the tool call in the list Index int64 `json:"index"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Type respjson.Field ID respjson.Field Function respjson.Field Index respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Tool call specification for OpenAI-compatible chat completion responses.
func (ChatCompletionListResponseChoiceMessageAssistantToolCall) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageAssistantToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageAssistantToolCall) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageAssistantToolCall) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageAssistantToolCallFunction ¶
type ChatCompletionListResponseChoiceMessageAssistantToolCallFunction struct { // (Optional) Arguments to pass to the function as a JSON string Arguments string `json:"arguments"` // (Optional) Name of the function to call Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Function call details
func (ChatCompletionListResponseChoiceMessageAssistantToolCallFunction) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageAssistantToolCallFunction) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageAssistantToolCallFunction) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageAssistantToolCallFunction) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageDeveloper ¶
type ChatCompletionListResponseChoiceMessageDeveloper struct { // The content of the developer message Content ChatCompletionListResponseChoiceMessageDeveloperContentUnion `json:"content,required"` // Must be "developer" to identify this as a developer message Role constant.Developer `json:"role,required"` // (Optional) The name of the developer message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message from the developer in an OpenAI-compatible chat completion request.
func (ChatCompletionListResponseChoiceMessageDeveloper) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageDeveloper) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageDeveloper) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageDeveloper) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem ¶
type ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageDeveloperContentUnion ¶
type ChatCompletionListResponseChoiceMessageDeveloperContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem] instead of // an object. OfChatCompletionListResponseChoiceMessageDeveloperContentArray []ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionListResponseChoiceMessageDeveloperContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseChoiceMessageDeveloperContentUnion contains all possible properties and values from [string], [[]ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionListResponseChoiceMessageDeveloperContentArray]
func (ChatCompletionListResponseChoiceMessageDeveloperContentUnion) AsChatCompletionListResponseChoiceMessageDeveloperContentArray ¶
func (u ChatCompletionListResponseChoiceMessageDeveloperContentUnion) AsChatCompletionListResponseChoiceMessageDeveloperContentArray() (v []ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem)
func (ChatCompletionListResponseChoiceMessageDeveloperContentUnion) AsString ¶
func (u ChatCompletionListResponseChoiceMessageDeveloperContentUnion) AsString() (v string)
func (ChatCompletionListResponseChoiceMessageDeveloperContentUnion) RawJSON ¶
func (u ChatCompletionListResponseChoiceMessageDeveloperContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageDeveloperContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageDeveloperContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageSystem ¶
type ChatCompletionListResponseChoiceMessageSystem struct { // The content of the "system prompt". If multiple system messages are provided, // they are concatenated. The underlying Llama Stack code may also add other system // messages (for example, for formatting tool definitions). Content ChatCompletionListResponseChoiceMessageSystemContentUnion `json:"content,required"` // Must be "system" to identify this as a system message Role constant.System `json:"role,required"` // (Optional) The name of the system message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A system message providing instructions or context to the model.
func (ChatCompletionListResponseChoiceMessageSystem) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageSystem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageSystem) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageSystem) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageSystemContentArrayItem ¶
type ChatCompletionListResponseChoiceMessageSystemContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionListResponseChoiceMessageSystemContentArrayItem) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageSystemContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageSystemContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageSystemContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageSystemContentUnion ¶
type ChatCompletionListResponseChoiceMessageSystemContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseChoiceMessageSystemContentArrayItem] instead of an // object. OfChatCompletionListResponseChoiceMessageSystemContentArray []ChatCompletionListResponseChoiceMessageSystemContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionListResponseChoiceMessageSystemContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseChoiceMessageSystemContentUnion contains all possible properties and values from [string], [[]ChatCompletionListResponseChoiceMessageSystemContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionListResponseChoiceMessageSystemContentArray]
func (ChatCompletionListResponseChoiceMessageSystemContentUnion) AsChatCompletionListResponseChoiceMessageSystemContentArray ¶
func (u ChatCompletionListResponseChoiceMessageSystemContentUnion) AsChatCompletionListResponseChoiceMessageSystemContentArray() (v []ChatCompletionListResponseChoiceMessageSystemContentArrayItem)
func (ChatCompletionListResponseChoiceMessageSystemContentUnion) AsString ¶
func (u ChatCompletionListResponseChoiceMessageSystemContentUnion) AsString() (v string)
func (ChatCompletionListResponseChoiceMessageSystemContentUnion) RawJSON ¶
func (u ChatCompletionListResponseChoiceMessageSystemContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageSystemContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageSystemContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageTool ¶
type ChatCompletionListResponseChoiceMessageTool struct { // The response content from the tool Content ChatCompletionListResponseChoiceMessageToolContentUnion `json:"content,required"` // Must be "tool" to identify this as a tool response Role constant.Tool `json:"role,required"` // Unique identifier for the tool call this response is for ToolCallID string `json:"tool_call_id,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field ToolCallID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message representing the result of a tool invocation in an OpenAI-compatible chat completion request.
func (ChatCompletionListResponseChoiceMessageTool) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageTool) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageTool) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageToolContentArrayItem ¶
type ChatCompletionListResponseChoiceMessageToolContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionListResponseChoiceMessageToolContentArrayItem) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageToolContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageToolContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageToolContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageToolContentUnion ¶
type ChatCompletionListResponseChoiceMessageToolContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseChoiceMessageToolContentArrayItem] instead of an // object. OfChatCompletionListResponseChoiceMessageToolContentArray []ChatCompletionListResponseChoiceMessageToolContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionListResponseChoiceMessageToolContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseChoiceMessageToolContentUnion contains all possible properties and values from [string], [[]ChatCompletionListResponseChoiceMessageToolContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionListResponseChoiceMessageToolContentArray]
func (ChatCompletionListResponseChoiceMessageToolContentUnion) AsChatCompletionListResponseChoiceMessageToolContentArray ¶
func (u ChatCompletionListResponseChoiceMessageToolContentUnion) AsChatCompletionListResponseChoiceMessageToolContentArray() (v []ChatCompletionListResponseChoiceMessageToolContentArrayItem)
func (ChatCompletionListResponseChoiceMessageToolContentUnion) AsString ¶
func (u ChatCompletionListResponseChoiceMessageToolContentUnion) AsString() (v string)
func (ChatCompletionListResponseChoiceMessageToolContentUnion) RawJSON ¶
func (u ChatCompletionListResponseChoiceMessageToolContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageToolContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageToolContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageUnion ¶
type ChatCompletionListResponseChoiceMessageUnion struct { // This field is a union of // [ChatCompletionListResponseChoiceMessageUserContentUnion], // [ChatCompletionListResponseChoiceMessageSystemContentUnion], // [ChatCompletionListResponseChoiceMessageAssistantContentUnion], // [ChatCompletionListResponseChoiceMessageToolContentUnion], // [ChatCompletionListResponseChoiceMessageDeveloperContentUnion] Content ChatCompletionListResponseChoiceMessageUnionContent `json:"content"` // Any of "user", "system", "assistant", "tool", "developer". Role string `json:"role"` Name string `json:"name"` // This field is from variant [ChatCompletionListResponseChoiceMessageAssistant]. ToolCalls []ChatCompletionListResponseChoiceMessageAssistantToolCall `json:"tool_calls"` // This field is from variant [ChatCompletionListResponseChoiceMessageTool]. ToolCallID string `json:"tool_call_id"` JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ToolCalls respjson.Field ToolCallID respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseChoiceMessageUnion contains all possible properties and values from ChatCompletionListResponseChoiceMessageUser, ChatCompletionListResponseChoiceMessageSystem, ChatCompletionListResponseChoiceMessageAssistant, ChatCompletionListResponseChoiceMessageTool, ChatCompletionListResponseChoiceMessageDeveloper.
Use the ChatCompletionListResponseChoiceMessageUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ChatCompletionListResponseChoiceMessageUnion) AsAny ¶
func (u ChatCompletionListResponseChoiceMessageUnion) AsAny() anyChatCompletionListResponseChoiceMessage
Use the following switch statement to find the correct variant
switch variant := ChatCompletionListResponseChoiceMessageUnion.AsAny().(type) { case llamastackclient.ChatCompletionListResponseChoiceMessageUser: case llamastackclient.ChatCompletionListResponseChoiceMessageSystem: case llamastackclient.ChatCompletionListResponseChoiceMessageAssistant: case llamastackclient.ChatCompletionListResponseChoiceMessageTool: case llamastackclient.ChatCompletionListResponseChoiceMessageDeveloper: default: fmt.Errorf("no variant present") }
func (ChatCompletionListResponseChoiceMessageUnion) AsAssistant ¶
func (u ChatCompletionListResponseChoiceMessageUnion) AsAssistant() (v ChatCompletionListResponseChoiceMessageAssistant)
func (ChatCompletionListResponseChoiceMessageUnion) AsDeveloper ¶
func (u ChatCompletionListResponseChoiceMessageUnion) AsDeveloper() (v ChatCompletionListResponseChoiceMessageDeveloper)
func (ChatCompletionListResponseChoiceMessageUnion) AsSystem ¶
func (u ChatCompletionListResponseChoiceMessageUnion) AsSystem() (v ChatCompletionListResponseChoiceMessageSystem)
func (ChatCompletionListResponseChoiceMessageUnion) AsTool ¶
func (u ChatCompletionListResponseChoiceMessageUnion) AsTool() (v ChatCompletionListResponseChoiceMessageTool)
func (ChatCompletionListResponseChoiceMessageUnion) AsUser ¶
func (u ChatCompletionListResponseChoiceMessageUnion) AsUser() (v ChatCompletionListResponseChoiceMessageUser)
func (ChatCompletionListResponseChoiceMessageUnion) RawJSON ¶
func (u ChatCompletionListResponseChoiceMessageUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageUnionContent ¶
type ChatCompletionListResponseChoiceMessageUnionContent struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion] instead of // an object. OfChatCompletionListResponseChoiceMessageUserContentArray []ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseChoiceMessageSystemContentArrayItem] instead of an // object. OfChatCompletionListResponseChoiceMessageSystemContentArray []ChatCompletionListResponseChoiceMessageSystemContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseChoiceMessageAssistantContentArrayItem] instead of // an object. OfChatCompletionListResponseChoiceMessageAssistantContentArray []ChatCompletionListResponseChoiceMessageAssistantContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseChoiceMessageToolContentArrayItem] instead of an // object. OfChatCompletionListResponseChoiceMessageToolContentArray []ChatCompletionListResponseChoiceMessageToolContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem] instead of // an object. OfChatCompletionListResponseChoiceMessageDeveloperContentArray []ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionListResponseChoiceMessageUserContentArray respjson.Field OfChatCompletionListResponseChoiceMessageSystemContentArray respjson.Field OfChatCompletionListResponseChoiceMessageAssistantContentArray respjson.Field OfChatCompletionListResponseChoiceMessageToolContentArray respjson.Field OfChatCompletionListResponseChoiceMessageDeveloperContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseChoiceMessageUnionContent is an implicit subunion of ChatCompletionListResponseChoiceMessageUnion. ChatCompletionListResponseChoiceMessageUnionContent provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ChatCompletionListResponseChoiceMessageUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionListResponseChoiceMessageUserContentArray OfChatCompletionListResponseChoiceMessageSystemContentArray OfChatCompletionListResponseChoiceMessageAssistantContentArray OfChatCompletionListResponseChoiceMessageToolContentArray OfChatCompletionListResponseChoiceMessageDeveloperContentArray]
func (*ChatCompletionListResponseChoiceMessageUnionContent) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageUnionContent) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageUser ¶
type ChatCompletionListResponseChoiceMessageUser struct { // The content of the message, which can include text and other media Content ChatCompletionListResponseChoiceMessageUserContentUnion `json:"content,required"` // Must be "user" to identify this as a user message Role constant.User `json:"role,required"` // (Optional) The name of the user message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message from the user in an OpenAI-compatible chat completion request.
func (ChatCompletionListResponseChoiceMessageUser) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageUser) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageUser) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageUserContentArrayItemFile ¶
type ChatCompletionListResponseChoiceMessageUserContentArrayItemFile struct { File ChatCompletionListResponseChoiceMessageUserContentArrayItemFileFile `json:"file,required"` Type constant.File `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { File respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ChatCompletionListResponseChoiceMessageUserContentArrayItemFile) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageUserContentArrayItemFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageUserContentArrayItemFile) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageUserContentArrayItemFile) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageUserContentArrayItemFileFile ¶
type ChatCompletionListResponseChoiceMessageUserContentArrayItemFileFile struct { FileData string `json:"file_data"` FileID string `json:"file_id"` Filename string `json:"filename"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileData respjson.Field FileID respjson.Field Filename respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ChatCompletionListResponseChoiceMessageUserContentArrayItemFileFile) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageUserContentArrayItemFileFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageUserContentArrayItemFileFile) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageUserContentArrayItemFileFile) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURL ¶
type ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURL struct { // Image URL specification and processing details ImageURL ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURLImageURL `json:"image_url,required"` // Must be "image_url" to identify this as image content Type constant.ImageURL `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ImageURL respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image content part for OpenAI-compatible chat completion messages.
func (ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURL) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURL) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURL) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURLImageURL ¶
type ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURLImageURL struct { // URL of the image to include in the message URL string `json:"url,required"` // (Optional) Level of detail for image processing. Can be "low", "high", or "auto" Detail string `json:"detail"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { URL respjson.Field Detail respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image URL specification and processing details
func (ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURLImageURL) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURLImageURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageUserContentArrayItemText ¶
type ChatCompletionListResponseChoiceMessageUserContentArrayItemText struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionListResponseChoiceMessageUserContentArrayItemText) RawJSON ¶
func (r ChatCompletionListResponseChoiceMessageUserContentArrayItemText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageUserContentArrayItemText) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageUserContentArrayItemText) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion ¶
type ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion struct { // This field is from variant // [ChatCompletionListResponseChoiceMessageUserContentArrayItemText]. Text string `json:"text"` // Any of "text", "image_url", "file". Type string `json:"type"` // This field is from variant // [ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURL]. ImageURL ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURLImageURL `json:"image_url"` // This field is from variant // [ChatCompletionListResponseChoiceMessageUserContentArrayItemFile]. File ChatCompletionListResponseChoiceMessageUserContentArrayItemFileFile `json:"file"` JSON struct { Text respjson.Field Type respjson.Field ImageURL respjson.Field File respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion contains all possible properties and values from ChatCompletionListResponseChoiceMessageUserContentArrayItemText, ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURL, ChatCompletionListResponseChoiceMessageUserContentArrayItemFile.
Use the ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) AsAny ¶
func (u ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) AsAny() anyChatCompletionListResponseChoiceMessageUserContentArrayItem
Use the following switch statement to find the correct variant
switch variant := ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion.AsAny().(type) { case llamastackclient.ChatCompletionListResponseChoiceMessageUserContentArrayItemText: case llamastackclient.ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURL: case llamastackclient.ChatCompletionListResponseChoiceMessageUserContentArrayItemFile: default: fmt.Errorf("no variant present") }
func (ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) AsImageURL ¶
func (ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) RawJSON ¶
func (u ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseChoiceMessageUserContentUnion ¶
type ChatCompletionListResponseChoiceMessageUserContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion] instead of // an object. OfChatCompletionListResponseChoiceMessageUserContentArray []ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionListResponseChoiceMessageUserContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseChoiceMessageUserContentUnion contains all possible properties and values from [string], [[]ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionListResponseChoiceMessageUserContentArray]
func (ChatCompletionListResponseChoiceMessageUserContentUnion) AsChatCompletionListResponseChoiceMessageUserContentArray ¶
func (u ChatCompletionListResponseChoiceMessageUserContentUnion) AsChatCompletionListResponseChoiceMessageUserContentArray() (v []ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion)
func (ChatCompletionListResponseChoiceMessageUserContentUnion) AsString ¶
func (u ChatCompletionListResponseChoiceMessageUserContentUnion) AsString() (v string)
func (ChatCompletionListResponseChoiceMessageUserContentUnion) RawJSON ¶
func (u ChatCompletionListResponseChoiceMessageUserContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseChoiceMessageUserContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseChoiceMessageUserContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageAssistant ¶
type ChatCompletionListResponseInputMessageAssistant struct { // Must be "assistant" to identify this as the model's response Role constant.Assistant `json:"role,required"` // The content of the model's response Content ChatCompletionListResponseInputMessageAssistantContentUnion `json:"content"` // (Optional) The name of the assistant message participant. Name string `json:"name"` // List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object. ToolCalls []ChatCompletionListResponseInputMessageAssistantToolCall `json:"tool_calls"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Role respjson.Field Content respjson.Field Name respjson.Field ToolCalls respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.
func (ChatCompletionListResponseInputMessageAssistant) RawJSON ¶
func (r ChatCompletionListResponseInputMessageAssistant) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageAssistant) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageAssistant) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageAssistantContentArrayItem ¶
type ChatCompletionListResponseInputMessageAssistantContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionListResponseInputMessageAssistantContentArrayItem) RawJSON ¶
func (r ChatCompletionListResponseInputMessageAssistantContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageAssistantContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageAssistantContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageAssistantContentUnion ¶
type ChatCompletionListResponseInputMessageAssistantContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseInputMessageAssistantContentArrayItem] instead of // an object. OfChatCompletionListResponseInputMessageAssistantContentArray []ChatCompletionListResponseInputMessageAssistantContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionListResponseInputMessageAssistantContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseInputMessageAssistantContentUnion contains all possible properties and values from [string], [[]ChatCompletionListResponseInputMessageAssistantContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionListResponseInputMessageAssistantContentArray]
func (ChatCompletionListResponseInputMessageAssistantContentUnion) AsChatCompletionListResponseInputMessageAssistantContentArray ¶
func (u ChatCompletionListResponseInputMessageAssistantContentUnion) AsChatCompletionListResponseInputMessageAssistantContentArray() (v []ChatCompletionListResponseInputMessageAssistantContentArrayItem)
func (ChatCompletionListResponseInputMessageAssistantContentUnion) AsString ¶
func (u ChatCompletionListResponseInputMessageAssistantContentUnion) AsString() (v string)
func (ChatCompletionListResponseInputMessageAssistantContentUnion) RawJSON ¶
func (u ChatCompletionListResponseInputMessageAssistantContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageAssistantContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageAssistantContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageAssistantToolCall ¶
type ChatCompletionListResponseInputMessageAssistantToolCall struct { // Must be "function" to identify this as a function call Type constant.Function `json:"type,required"` // (Optional) Unique identifier for the tool call ID string `json:"id"` // (Optional) Function call details Function ChatCompletionListResponseInputMessageAssistantToolCallFunction `json:"function"` // (Optional) Index of the tool call in the list Index int64 `json:"index"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Type respjson.Field ID respjson.Field Function respjson.Field Index respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Tool call specification for OpenAI-compatible chat completion responses.
func (ChatCompletionListResponseInputMessageAssistantToolCall) RawJSON ¶
func (r ChatCompletionListResponseInputMessageAssistantToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageAssistantToolCall) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageAssistantToolCall) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageAssistantToolCallFunction ¶
type ChatCompletionListResponseInputMessageAssistantToolCallFunction struct { // (Optional) Arguments to pass to the function as a JSON string Arguments string `json:"arguments"` // (Optional) Name of the function to call Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Function call details
func (ChatCompletionListResponseInputMessageAssistantToolCallFunction) RawJSON ¶
func (r ChatCompletionListResponseInputMessageAssistantToolCallFunction) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageAssistantToolCallFunction) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageAssistantToolCallFunction) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageDeveloper ¶
type ChatCompletionListResponseInputMessageDeveloper struct { // The content of the developer message Content ChatCompletionListResponseInputMessageDeveloperContentUnion `json:"content,required"` // Must be "developer" to identify this as a developer message Role constant.Developer `json:"role,required"` // (Optional) The name of the developer message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message from the developer in an OpenAI-compatible chat completion request.
func (ChatCompletionListResponseInputMessageDeveloper) RawJSON ¶
func (r ChatCompletionListResponseInputMessageDeveloper) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageDeveloper) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageDeveloper) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageDeveloperContentArrayItem ¶
type ChatCompletionListResponseInputMessageDeveloperContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionListResponseInputMessageDeveloperContentArrayItem) RawJSON ¶
func (r ChatCompletionListResponseInputMessageDeveloperContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageDeveloperContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageDeveloperContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageDeveloperContentUnion ¶
type ChatCompletionListResponseInputMessageDeveloperContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseInputMessageDeveloperContentArrayItem] instead of // an object. OfChatCompletionListResponseInputMessageDeveloperContentArray []ChatCompletionListResponseInputMessageDeveloperContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionListResponseInputMessageDeveloperContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseInputMessageDeveloperContentUnion contains all possible properties and values from [string], [[]ChatCompletionListResponseInputMessageDeveloperContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionListResponseInputMessageDeveloperContentArray]
func (ChatCompletionListResponseInputMessageDeveloperContentUnion) AsChatCompletionListResponseInputMessageDeveloperContentArray ¶
func (u ChatCompletionListResponseInputMessageDeveloperContentUnion) AsChatCompletionListResponseInputMessageDeveloperContentArray() (v []ChatCompletionListResponseInputMessageDeveloperContentArrayItem)
func (ChatCompletionListResponseInputMessageDeveloperContentUnion) AsString ¶
func (u ChatCompletionListResponseInputMessageDeveloperContentUnion) AsString() (v string)
func (ChatCompletionListResponseInputMessageDeveloperContentUnion) RawJSON ¶
func (u ChatCompletionListResponseInputMessageDeveloperContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageDeveloperContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageDeveloperContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageSystem ¶
type ChatCompletionListResponseInputMessageSystem struct { // The content of the "system prompt". If multiple system messages are provided, // they are concatenated. The underlying Llama Stack code may also add other system // messages (for example, for formatting tool definitions). Content ChatCompletionListResponseInputMessageSystemContentUnion `json:"content,required"` // Must be "system" to identify this as a system message Role constant.System `json:"role,required"` // (Optional) The name of the system message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A system message providing instructions or context to the model.
func (ChatCompletionListResponseInputMessageSystem) RawJSON ¶
func (r ChatCompletionListResponseInputMessageSystem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageSystem) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageSystem) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageSystemContentArrayItem ¶
type ChatCompletionListResponseInputMessageSystemContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionListResponseInputMessageSystemContentArrayItem) RawJSON ¶
func (r ChatCompletionListResponseInputMessageSystemContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageSystemContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageSystemContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageSystemContentUnion ¶
type ChatCompletionListResponseInputMessageSystemContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseInputMessageSystemContentArrayItem] instead of an // object. OfChatCompletionListResponseInputMessageSystemContentArray []ChatCompletionListResponseInputMessageSystemContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionListResponseInputMessageSystemContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseInputMessageSystemContentUnion contains all possible properties and values from [string], [[]ChatCompletionListResponseInputMessageSystemContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionListResponseInputMessageSystemContentArray]
func (ChatCompletionListResponseInputMessageSystemContentUnion) AsChatCompletionListResponseInputMessageSystemContentArray ¶
func (u ChatCompletionListResponseInputMessageSystemContentUnion) AsChatCompletionListResponseInputMessageSystemContentArray() (v []ChatCompletionListResponseInputMessageSystemContentArrayItem)
func (ChatCompletionListResponseInputMessageSystemContentUnion) AsString ¶
func (u ChatCompletionListResponseInputMessageSystemContentUnion) AsString() (v string)
func (ChatCompletionListResponseInputMessageSystemContentUnion) RawJSON ¶
func (u ChatCompletionListResponseInputMessageSystemContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageSystemContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageSystemContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageTool ¶
type ChatCompletionListResponseInputMessageTool struct { // The response content from the tool Content ChatCompletionListResponseInputMessageToolContentUnion `json:"content,required"` // Must be "tool" to identify this as a tool response Role constant.Tool `json:"role,required"` // Unique identifier for the tool call this response is for ToolCallID string `json:"tool_call_id,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field ToolCallID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message representing the result of a tool invocation in an OpenAI-compatible chat completion request.
func (ChatCompletionListResponseInputMessageTool) RawJSON ¶
func (r ChatCompletionListResponseInputMessageTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageTool) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageTool) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageToolContentArrayItem ¶
type ChatCompletionListResponseInputMessageToolContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionListResponseInputMessageToolContentArrayItem) RawJSON ¶
func (r ChatCompletionListResponseInputMessageToolContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageToolContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageToolContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageToolContentUnion ¶
type ChatCompletionListResponseInputMessageToolContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseInputMessageToolContentArrayItem] instead of an // object. OfChatCompletionListResponseInputMessageToolContentArray []ChatCompletionListResponseInputMessageToolContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionListResponseInputMessageToolContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseInputMessageToolContentUnion contains all possible properties and values from [string], [[]ChatCompletionListResponseInputMessageToolContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionListResponseInputMessageToolContentArray]
func (ChatCompletionListResponseInputMessageToolContentUnion) AsChatCompletionListResponseInputMessageToolContentArray ¶
func (u ChatCompletionListResponseInputMessageToolContentUnion) AsChatCompletionListResponseInputMessageToolContentArray() (v []ChatCompletionListResponseInputMessageToolContentArrayItem)
func (ChatCompletionListResponseInputMessageToolContentUnion) AsString ¶
func (u ChatCompletionListResponseInputMessageToolContentUnion) AsString() (v string)
func (ChatCompletionListResponseInputMessageToolContentUnion) RawJSON ¶
func (u ChatCompletionListResponseInputMessageToolContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageToolContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageToolContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageUnion ¶
type ChatCompletionListResponseInputMessageUnion struct { // This field is a union of // [ChatCompletionListResponseInputMessageUserContentUnion], // [ChatCompletionListResponseInputMessageSystemContentUnion], // [ChatCompletionListResponseInputMessageAssistantContentUnion], // [ChatCompletionListResponseInputMessageToolContentUnion], // [ChatCompletionListResponseInputMessageDeveloperContentUnion] Content ChatCompletionListResponseInputMessageUnionContent `json:"content"` // Any of "user", "system", "assistant", "tool", "developer". Role string `json:"role"` Name string `json:"name"` // This field is from variant [ChatCompletionListResponseInputMessageAssistant]. ToolCalls []ChatCompletionListResponseInputMessageAssistantToolCall `json:"tool_calls"` // This field is from variant [ChatCompletionListResponseInputMessageTool]. ToolCallID string `json:"tool_call_id"` JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ToolCalls respjson.Field ToolCallID respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseInputMessageUnion contains all possible properties and values from ChatCompletionListResponseInputMessageUser, ChatCompletionListResponseInputMessageSystem, ChatCompletionListResponseInputMessageAssistant, ChatCompletionListResponseInputMessageTool, ChatCompletionListResponseInputMessageDeveloper.
Use the ChatCompletionListResponseInputMessageUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ChatCompletionListResponseInputMessageUnion) AsAny ¶
func (u ChatCompletionListResponseInputMessageUnion) AsAny() anyChatCompletionListResponseInputMessage
Use the following switch statement to find the correct variant
switch variant := ChatCompletionListResponseInputMessageUnion.AsAny().(type) { case llamastackclient.ChatCompletionListResponseInputMessageUser: case llamastackclient.ChatCompletionListResponseInputMessageSystem: case llamastackclient.ChatCompletionListResponseInputMessageAssistant: case llamastackclient.ChatCompletionListResponseInputMessageTool: case llamastackclient.ChatCompletionListResponseInputMessageDeveloper: default: fmt.Errorf("no variant present") }
func (ChatCompletionListResponseInputMessageUnion) AsAssistant ¶
func (u ChatCompletionListResponseInputMessageUnion) AsAssistant() (v ChatCompletionListResponseInputMessageAssistant)
func (ChatCompletionListResponseInputMessageUnion) AsDeveloper ¶
func (u ChatCompletionListResponseInputMessageUnion) AsDeveloper() (v ChatCompletionListResponseInputMessageDeveloper)
func (ChatCompletionListResponseInputMessageUnion) AsSystem ¶
func (u ChatCompletionListResponseInputMessageUnion) AsSystem() (v ChatCompletionListResponseInputMessageSystem)
func (ChatCompletionListResponseInputMessageUnion) AsTool ¶
func (u ChatCompletionListResponseInputMessageUnion) AsTool() (v ChatCompletionListResponseInputMessageTool)
func (ChatCompletionListResponseInputMessageUnion) AsUser ¶
func (u ChatCompletionListResponseInputMessageUnion) AsUser() (v ChatCompletionListResponseInputMessageUser)
func (ChatCompletionListResponseInputMessageUnion) RawJSON ¶
func (u ChatCompletionListResponseInputMessageUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageUnionContent ¶
type ChatCompletionListResponseInputMessageUnionContent struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseInputMessageUserContentArrayItemUnion] instead of // an object. OfChatCompletionListResponseInputMessageUserContentArray []ChatCompletionListResponseInputMessageUserContentArrayItemUnion `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseInputMessageSystemContentArrayItem] instead of an // object. OfChatCompletionListResponseInputMessageSystemContentArray []ChatCompletionListResponseInputMessageSystemContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseInputMessageAssistantContentArrayItem] instead of // an object. OfChatCompletionListResponseInputMessageAssistantContentArray []ChatCompletionListResponseInputMessageAssistantContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseInputMessageToolContentArrayItem] instead of an // object. OfChatCompletionListResponseInputMessageToolContentArray []ChatCompletionListResponseInputMessageToolContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseInputMessageDeveloperContentArrayItem] instead of // an object. OfChatCompletionListResponseInputMessageDeveloperContentArray []ChatCompletionListResponseInputMessageDeveloperContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionListResponseInputMessageUserContentArray respjson.Field OfChatCompletionListResponseInputMessageSystemContentArray respjson.Field OfChatCompletionListResponseInputMessageAssistantContentArray respjson.Field OfChatCompletionListResponseInputMessageToolContentArray respjson.Field OfChatCompletionListResponseInputMessageDeveloperContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseInputMessageUnionContent is an implicit subunion of ChatCompletionListResponseInputMessageUnion. ChatCompletionListResponseInputMessageUnionContent provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ChatCompletionListResponseInputMessageUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionListResponseInputMessageUserContentArray OfChatCompletionListResponseInputMessageSystemContentArray OfChatCompletionListResponseInputMessageAssistantContentArray OfChatCompletionListResponseInputMessageToolContentArray OfChatCompletionListResponseInputMessageDeveloperContentArray]
func (*ChatCompletionListResponseInputMessageUnionContent) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageUnionContent) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageUser ¶
type ChatCompletionListResponseInputMessageUser struct { // The content of the message, which can include text and other media Content ChatCompletionListResponseInputMessageUserContentUnion `json:"content,required"` // Must be "user" to identify this as a user message Role constant.User `json:"role,required"` // (Optional) The name of the user message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message from the user in an OpenAI-compatible chat completion request.
func (ChatCompletionListResponseInputMessageUser) RawJSON ¶
func (r ChatCompletionListResponseInputMessageUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageUser) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageUser) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageUserContentArrayItemFile ¶
type ChatCompletionListResponseInputMessageUserContentArrayItemFile struct { File ChatCompletionListResponseInputMessageUserContentArrayItemFileFile `json:"file,required"` Type constant.File `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { File respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ChatCompletionListResponseInputMessageUserContentArrayItemFile) RawJSON ¶
func (r ChatCompletionListResponseInputMessageUserContentArrayItemFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageUserContentArrayItemFile) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageUserContentArrayItemFile) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageUserContentArrayItemFileFile ¶
type ChatCompletionListResponseInputMessageUserContentArrayItemFileFile struct { FileData string `json:"file_data"` FileID string `json:"file_id"` Filename string `json:"filename"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileData respjson.Field FileID respjson.Field Filename respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ChatCompletionListResponseInputMessageUserContentArrayItemFileFile) RawJSON ¶
func (r ChatCompletionListResponseInputMessageUserContentArrayItemFileFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageUserContentArrayItemFileFile) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageUserContentArrayItemFileFile) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageUserContentArrayItemImageURL ¶
type ChatCompletionListResponseInputMessageUserContentArrayItemImageURL struct { // Image URL specification and processing details ImageURL ChatCompletionListResponseInputMessageUserContentArrayItemImageURLImageURL `json:"image_url,required"` // Must be "image_url" to identify this as image content Type constant.ImageURL `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ImageURL respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image content part for OpenAI-compatible chat completion messages.
func (ChatCompletionListResponseInputMessageUserContentArrayItemImageURL) RawJSON ¶
func (r ChatCompletionListResponseInputMessageUserContentArrayItemImageURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageUserContentArrayItemImageURL) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageUserContentArrayItemImageURL) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageUserContentArrayItemImageURLImageURL ¶
type ChatCompletionListResponseInputMessageUserContentArrayItemImageURLImageURL struct { // URL of the image to include in the message URL string `json:"url,required"` // (Optional) Level of detail for image processing. Can be "low", "high", or "auto" Detail string `json:"detail"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { URL respjson.Field Detail respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image URL specification and processing details
func (ChatCompletionListResponseInputMessageUserContentArrayItemImageURLImageURL) RawJSON ¶
func (r ChatCompletionListResponseInputMessageUserContentArrayItemImageURLImageURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageUserContentArrayItemText ¶
type ChatCompletionListResponseInputMessageUserContentArrayItemText struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionListResponseInputMessageUserContentArrayItemText) RawJSON ¶
func (r ChatCompletionListResponseInputMessageUserContentArrayItemText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageUserContentArrayItemText) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageUserContentArrayItemText) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageUserContentArrayItemUnion ¶
type ChatCompletionListResponseInputMessageUserContentArrayItemUnion struct { // This field is from variant // [ChatCompletionListResponseInputMessageUserContentArrayItemText]. Text string `json:"text"` // Any of "text", "image_url", "file". Type string `json:"type"` // This field is from variant // [ChatCompletionListResponseInputMessageUserContentArrayItemImageURL]. ImageURL ChatCompletionListResponseInputMessageUserContentArrayItemImageURLImageURL `json:"image_url"` // This field is from variant // [ChatCompletionListResponseInputMessageUserContentArrayItemFile]. File ChatCompletionListResponseInputMessageUserContentArrayItemFileFile `json:"file"` JSON struct { Text respjson.Field Type respjson.Field ImageURL respjson.Field File respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseInputMessageUserContentArrayItemUnion contains all possible properties and values from ChatCompletionListResponseInputMessageUserContentArrayItemText, ChatCompletionListResponseInputMessageUserContentArrayItemImageURL, ChatCompletionListResponseInputMessageUserContentArrayItemFile.
Use the ChatCompletionListResponseInputMessageUserContentArrayItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ChatCompletionListResponseInputMessageUserContentArrayItemUnion) AsAny ¶
func (u ChatCompletionListResponseInputMessageUserContentArrayItemUnion) AsAny() anyChatCompletionListResponseInputMessageUserContentArrayItem
Use the following switch statement to find the correct variant
switch variant := ChatCompletionListResponseInputMessageUserContentArrayItemUnion.AsAny().(type) { case llamastackclient.ChatCompletionListResponseInputMessageUserContentArrayItemText: case llamastackclient.ChatCompletionListResponseInputMessageUserContentArrayItemImageURL: case llamastackclient.ChatCompletionListResponseInputMessageUserContentArrayItemFile: default: fmt.Errorf("no variant present") }
func (ChatCompletionListResponseInputMessageUserContentArrayItemUnion) AsImageURL ¶
func (ChatCompletionListResponseInputMessageUserContentArrayItemUnion) RawJSON ¶
func (u ChatCompletionListResponseInputMessageUserContentArrayItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageUserContentArrayItemUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageUserContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ChatCompletionListResponseInputMessageUserContentUnion ¶
type ChatCompletionListResponseInputMessageUserContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionListResponseInputMessageUserContentArrayItemUnion] instead of // an object. OfChatCompletionListResponseInputMessageUserContentArray []ChatCompletionListResponseInputMessageUserContentArrayItemUnion `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionListResponseInputMessageUserContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionListResponseInputMessageUserContentUnion contains all possible properties and values from [string], [[]ChatCompletionListResponseInputMessageUserContentArrayItemUnion].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionListResponseInputMessageUserContentArray]
func (ChatCompletionListResponseInputMessageUserContentUnion) AsChatCompletionListResponseInputMessageUserContentArray ¶
func (u ChatCompletionListResponseInputMessageUserContentUnion) AsChatCompletionListResponseInputMessageUserContentArray() (v []ChatCompletionListResponseInputMessageUserContentArrayItemUnion)
func (ChatCompletionListResponseInputMessageUserContentUnion) AsString ¶
func (u ChatCompletionListResponseInputMessageUserContentUnion) AsString() (v string)
func (ChatCompletionListResponseInputMessageUserContentUnion) RawJSON ¶
func (u ChatCompletionListResponseInputMessageUserContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionListResponseInputMessageUserContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionListResponseInputMessageUserContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParams ¶
type ChatCompletionNewParams struct { // List of messages in the conversation. Messages []ChatCompletionNewParamsMessageUnion `json:"messages,omitzero,required"` // The identifier of the model to use. The model must be registered with Llama // Stack and available via the /models endpoint. Model string `json:"model,required"` // (Optional) The penalty for repeated tokens. FrequencyPenalty param.Opt[float64] `json:"frequency_penalty,omitzero"` // (Optional) The log probabilities to use. Logprobs param.Opt[bool] `json:"logprobs,omitzero"` // (Optional) The maximum number of tokens to generate. MaxCompletionTokens param.Opt[int64] `json:"max_completion_tokens,omitzero"` // (Optional) The maximum number of tokens to generate. MaxTokens param.Opt[int64] `json:"max_tokens,omitzero"` // (Optional) The number of completions to generate. N param.Opt[int64] `json:"n,omitzero"` // (Optional) Whether to parallelize tool calls. ParallelToolCalls param.Opt[bool] `json:"parallel_tool_calls,omitzero"` // (Optional) The penalty for repeated tokens. PresencePenalty param.Opt[float64] `json:"presence_penalty,omitzero"` // (Optional) The seed to use. Seed param.Opt[int64] `json:"seed,omitzero"` // (Optional) The temperature to use. Temperature param.Opt[float64] `json:"temperature,omitzero"` // (Optional) The top log probabilities to use. TopLogprobs param.Opt[int64] `json:"top_logprobs,omitzero"` // (Optional) The top p to use. TopP param.Opt[float64] `json:"top_p,omitzero"` // (Optional) The user to use. User param.Opt[string] `json:"user,omitzero"` // (Optional) The function call to use. FunctionCall ChatCompletionNewParamsFunctionCallUnion `json:"function_call,omitzero"` // (Optional) List of functions to use. Functions []map[string]ChatCompletionNewParamsFunctionUnion `json:"functions,omitzero"` // (Optional) The logit bias to use. LogitBias map[string]float64 `json:"logit_bias,omitzero"` // (Optional) The response format to use. ResponseFormat ChatCompletionNewParamsResponseFormatUnion `json:"response_format,omitzero"` // (Optional) The stop tokens to use. Stop ChatCompletionNewParamsStopUnion `json:"stop,omitzero"` // (Optional) The stream options to use. StreamOptions map[string]ChatCompletionNewParamsStreamOptionUnion `json:"stream_options,omitzero"` // (Optional) The tool choice to use. ToolChoice ChatCompletionNewParamsToolChoiceUnion `json:"tool_choice,omitzero"` // (Optional) The tools to use. Tools []map[string]ChatCompletionNewParamsToolUnion `json:"tools,omitzero"` // contains filtered or unexported fields }
func (ChatCompletionNewParams) MarshalJSON ¶
func (r ChatCompletionNewParams) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParams) UnmarshalJSON ¶
func (r *ChatCompletionNewParams) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsFunctionCallMapItemUnion ¶
type ChatCompletionNewParamsFunctionCallMapItemUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsFunctionCallMapItemUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsFunctionCallMapItemUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsFunctionCallMapItemUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsFunctionCallMapItemUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsFunctionCallUnion ¶
type ChatCompletionNewParamsFunctionCallUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfChatCompletionNewsFunctionCallMapMap map[string]ChatCompletionNewParamsFunctionCallMapItemUnion `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsFunctionCallUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsFunctionCallUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsFunctionCallUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsFunctionCallUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsFunctionUnion ¶
type ChatCompletionNewParamsFunctionUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsFunctionUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsFunctionUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsFunctionUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsFunctionUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageAssistant ¶
type ChatCompletionNewParamsMessageAssistant struct { // (Optional) The name of the assistant message participant. Name param.Opt[string] `json:"name,omitzero"` // The content of the model's response Content ChatCompletionNewParamsMessageAssistantContentUnion `json:"content,omitzero"` // List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object. ToolCalls []ChatCompletionNewParamsMessageAssistantToolCall `json:"tool_calls,omitzero"` // Must be "assistant" to identify this as the model's response // // This field can be elided, and will marshal its zero value as "assistant". Role constant.Assistant `json:"role,required"` // contains filtered or unexported fields }
A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.
The property Role is required.
func (ChatCompletionNewParamsMessageAssistant) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageAssistant) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageAssistant) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageAssistant) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageAssistantContentArrayItem ¶
type ChatCompletionNewParamsMessageAssistantContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content // // This field can be elided, and will marshal its zero value as "text". Type constant.Text `json:"type,required"` // contains filtered or unexported fields }
Text content part for OpenAI-compatible chat completion messages.
The properties Text, Type are required.
func (ChatCompletionNewParamsMessageAssistantContentArrayItem) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageAssistantContentArrayItem) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageAssistantContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageAssistantContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageAssistantContentUnion ¶
type ChatCompletionNewParamsMessageAssistantContentUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfChatCompletionNewsMessageAssistantContentArray []ChatCompletionNewParamsMessageAssistantContentArrayItem `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsMessageAssistantContentUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsMessageAssistantContentUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsMessageAssistantContentUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsMessageAssistantContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageAssistantToolCall ¶
type ChatCompletionNewParamsMessageAssistantToolCall struct { // (Optional) Unique identifier for the tool call ID param.Opt[string] `json:"id,omitzero"` // (Optional) Index of the tool call in the list Index param.Opt[int64] `json:"index,omitzero"` // (Optional) Function call details Function ChatCompletionNewParamsMessageAssistantToolCallFunction `json:"function,omitzero"` // Must be "function" to identify this as a function call // // This field can be elided, and will marshal its zero value as "function". Type constant.Function `json:"type,required"` // contains filtered or unexported fields }
Tool call specification for OpenAI-compatible chat completion responses.
The property Type is required.
func (ChatCompletionNewParamsMessageAssistantToolCall) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageAssistantToolCall) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageAssistantToolCall) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageAssistantToolCall) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageAssistantToolCallFunction ¶
type ChatCompletionNewParamsMessageAssistantToolCallFunction struct { // (Optional) Arguments to pass to the function as a JSON string Arguments param.Opt[string] `json:"arguments,omitzero"` // (Optional) Name of the function to call Name param.Opt[string] `json:"name,omitzero"` // contains filtered or unexported fields }
(Optional) Function call details
func (ChatCompletionNewParamsMessageAssistantToolCallFunction) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageAssistantToolCallFunction) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageAssistantToolCallFunction) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageAssistantToolCallFunction) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageDeveloper ¶
type ChatCompletionNewParamsMessageDeveloper struct { // The content of the developer message Content ChatCompletionNewParamsMessageDeveloperContentUnion `json:"content,omitzero,required"` // (Optional) The name of the developer message participant. Name param.Opt[string] `json:"name,omitzero"` // Must be "developer" to identify this as a developer message // // This field can be elided, and will marshal its zero value as "developer". Role constant.Developer `json:"role,required"` // contains filtered or unexported fields }
A message from the developer in an OpenAI-compatible chat completion request.
The properties Content, Role are required.
func (ChatCompletionNewParamsMessageDeveloper) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageDeveloper) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageDeveloper) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageDeveloper) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageDeveloperContentArrayItem ¶
type ChatCompletionNewParamsMessageDeveloperContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content // // This field can be elided, and will marshal its zero value as "text". Type constant.Text `json:"type,required"` // contains filtered or unexported fields }
Text content part for OpenAI-compatible chat completion messages.
The properties Text, Type are required.
func (ChatCompletionNewParamsMessageDeveloperContentArrayItem) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageDeveloperContentArrayItem) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageDeveloperContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageDeveloperContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageDeveloperContentUnion ¶
type ChatCompletionNewParamsMessageDeveloperContentUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfChatCompletionNewsMessageDeveloperContentArray []ChatCompletionNewParamsMessageDeveloperContentArrayItem `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsMessageDeveloperContentUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsMessageDeveloperContentUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsMessageDeveloperContentUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsMessageDeveloperContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageSystem ¶
type ChatCompletionNewParamsMessageSystem struct { // The content of the "system prompt". If multiple system messages are provided, // they are concatenated. The underlying Llama Stack code may also add other system // messages (for example, for formatting tool definitions). Content ChatCompletionNewParamsMessageSystemContentUnion `json:"content,omitzero,required"` // (Optional) The name of the system message participant. Name param.Opt[string] `json:"name,omitzero"` // Must be "system" to identify this as a system message // // This field can be elided, and will marshal its zero value as "system". Role constant.System `json:"role,required"` // contains filtered or unexported fields }
A system message providing instructions or context to the model.
The properties Content, Role are required.
func (ChatCompletionNewParamsMessageSystem) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageSystem) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageSystem) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageSystem) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageSystemContentArrayItem ¶
type ChatCompletionNewParamsMessageSystemContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content // // This field can be elided, and will marshal its zero value as "text". Type constant.Text `json:"type,required"` // contains filtered or unexported fields }
Text content part for OpenAI-compatible chat completion messages.
The properties Text, Type are required.
func (ChatCompletionNewParamsMessageSystemContentArrayItem) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageSystemContentArrayItem) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageSystemContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageSystemContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageSystemContentUnion ¶
type ChatCompletionNewParamsMessageSystemContentUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfChatCompletionNewsMessageSystemContentArray []ChatCompletionNewParamsMessageSystemContentArrayItem `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsMessageSystemContentUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsMessageSystemContentUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsMessageSystemContentUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsMessageSystemContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageTool ¶
type ChatCompletionNewParamsMessageTool struct { // The response content from the tool Content ChatCompletionNewParamsMessageToolContentUnion `json:"content,omitzero,required"` // Unique identifier for the tool call this response is for ToolCallID string `json:"tool_call_id,required"` // Must be "tool" to identify this as a tool response // // This field can be elided, and will marshal its zero value as "tool". Role constant.Tool `json:"role,required"` // contains filtered or unexported fields }
A message representing the result of a tool invocation in an OpenAI-compatible chat completion request.
The properties Content, Role, ToolCallID are required.
func (ChatCompletionNewParamsMessageTool) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageTool) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageTool) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageTool) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageToolContentArrayItem ¶
type ChatCompletionNewParamsMessageToolContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content // // This field can be elided, and will marshal its zero value as "text". Type constant.Text `json:"type,required"` // contains filtered or unexported fields }
Text content part for OpenAI-compatible chat completion messages.
The properties Text, Type are required.
func (ChatCompletionNewParamsMessageToolContentArrayItem) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageToolContentArrayItem) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageToolContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageToolContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageToolContentUnion ¶
type ChatCompletionNewParamsMessageToolContentUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfChatCompletionNewsMessageToolContentArray []ChatCompletionNewParamsMessageToolContentArrayItem `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsMessageToolContentUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsMessageToolContentUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsMessageToolContentUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsMessageToolContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageUnion ¶
type ChatCompletionNewParamsMessageUnion struct { OfUser *ChatCompletionNewParamsMessageUser `json:",omitzero,inline"` OfSystem *ChatCompletionNewParamsMessageSystem `json:",omitzero,inline"` OfAssistant *ChatCompletionNewParamsMessageAssistant `json:",omitzero,inline"` OfTool *ChatCompletionNewParamsMessageTool `json:",omitzero,inline"` OfDeveloper *ChatCompletionNewParamsMessageDeveloper `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsMessageUnion) GetContent ¶
func (u ChatCompletionNewParamsMessageUnion) GetContent() (res chatCompletionNewParamsMessageUnionContent)
Returns a subunion which exports methods to access subproperties
Or use AsAny() to get the underlying value
func (ChatCompletionNewParamsMessageUnion) GetName ¶
func (u ChatCompletionNewParamsMessageUnion) GetName() *string
Returns a pointer to the underlying variant's property, if present.
func (ChatCompletionNewParamsMessageUnion) GetRole ¶
func (u ChatCompletionNewParamsMessageUnion) GetRole() *string
Returns a pointer to the underlying variant's property, if present.
func (ChatCompletionNewParamsMessageUnion) GetToolCallID ¶
func (u ChatCompletionNewParamsMessageUnion) GetToolCallID() *string
Returns a pointer to the underlying variant's property, if present.
func (ChatCompletionNewParamsMessageUnion) GetToolCalls ¶
func (u ChatCompletionNewParamsMessageUnion) GetToolCalls() []ChatCompletionNewParamsMessageAssistantToolCall
Returns a pointer to the underlying variant's property, if present.
func (ChatCompletionNewParamsMessageUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsMessageUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsMessageUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsMessageUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageUser ¶
type ChatCompletionNewParamsMessageUser struct { // The content of the message, which can include text and other media Content ChatCompletionNewParamsMessageUserContentUnion `json:"content,omitzero,required"` // (Optional) The name of the user message participant. Name param.Opt[string] `json:"name,omitzero"` // Must be "user" to identify this as a user message // // This field can be elided, and will marshal its zero value as "user". Role constant.User `json:"role,required"` // contains filtered or unexported fields }
A message from the user in an OpenAI-compatible chat completion request.
The properties Content, Role are required.
func (ChatCompletionNewParamsMessageUser) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageUser) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageUser) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageUser) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageUserContentArrayItemFile ¶
type ChatCompletionNewParamsMessageUserContentArrayItemFile struct { File ChatCompletionNewParamsMessageUserContentArrayItemFileFile `json:"file,omitzero,required"` // This field can be elided, and will marshal its zero value as "file". Type constant.File `json:"type,required"` // contains filtered or unexported fields }
The properties File, Type are required.
func (ChatCompletionNewParamsMessageUserContentArrayItemFile) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageUserContentArrayItemFile) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageUserContentArrayItemFile) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageUserContentArrayItemFile) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageUserContentArrayItemFileFile ¶
type ChatCompletionNewParamsMessageUserContentArrayItemFileFile struct { FileData param.Opt[string] `json:"file_data,omitzero"` FileID param.Opt[string] `json:"file_id,omitzero"` Filename param.Opt[string] `json:"filename,omitzero"` // contains filtered or unexported fields }
func (ChatCompletionNewParamsMessageUserContentArrayItemFileFile) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageUserContentArrayItemFileFile) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageUserContentArrayItemFileFile) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageUserContentArrayItemFileFile) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageUserContentArrayItemImageURL ¶
type ChatCompletionNewParamsMessageUserContentArrayItemImageURL struct { // Image URL specification and processing details ImageURL ChatCompletionNewParamsMessageUserContentArrayItemImageURLImageURL `json:"image_url,omitzero,required"` // Must be "image_url" to identify this as image content // // This field can be elided, and will marshal its zero value as "image_url". Type constant.ImageURL `json:"type,required"` // contains filtered or unexported fields }
Image content part for OpenAI-compatible chat completion messages.
The properties ImageURL, Type are required.
func (ChatCompletionNewParamsMessageUserContentArrayItemImageURL) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageUserContentArrayItemImageURL) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageUserContentArrayItemImageURL) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageUserContentArrayItemImageURL) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageUserContentArrayItemImageURLImageURL ¶
type ChatCompletionNewParamsMessageUserContentArrayItemImageURLImageURL struct { // URL of the image to include in the message URL string `json:"url,required"` // (Optional) Level of detail for image processing. Can be "low", "high", or "auto" Detail param.Opt[string] `json:"detail,omitzero"` // contains filtered or unexported fields }
Image URL specification and processing details
The property URL is required.
func (ChatCompletionNewParamsMessageUserContentArrayItemImageURLImageURL) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageUserContentArrayItemImageURLImageURL) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageUserContentArrayItemText ¶
type ChatCompletionNewParamsMessageUserContentArrayItemText struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content // // This field can be elided, and will marshal its zero value as "text". Type constant.Text `json:"type,required"` // contains filtered or unexported fields }
Text content part for OpenAI-compatible chat completion messages.
The properties Text, Type are required.
func (ChatCompletionNewParamsMessageUserContentArrayItemText) MarshalJSON ¶
func (r ChatCompletionNewParamsMessageUserContentArrayItemText) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsMessageUserContentArrayItemText) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsMessageUserContentArrayItemText) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageUserContentArrayItemUnion ¶
type ChatCompletionNewParamsMessageUserContentArrayItemUnion struct { OfText *ChatCompletionNewParamsMessageUserContentArrayItemText `json:",omitzero,inline"` OfImageURL *ChatCompletionNewParamsMessageUserContentArrayItemImageURL `json:",omitzero,inline"` OfFile *ChatCompletionNewParamsMessageUserContentArrayItemFile `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetFile ¶
func (u ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetFile() *ChatCompletionNewParamsMessageUserContentArrayItemFileFile
Returns a pointer to the underlying variant's property, if present.
func (ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetImageURL ¶
func (u ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetImageURL() *ChatCompletionNewParamsMessageUserContentArrayItemImageURLImageURL
Returns a pointer to the underlying variant's property, if present.
func (ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetText ¶
func (u ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetText() *string
Returns a pointer to the underlying variant's property, if present.
func (ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetType ¶
func (u ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (ChatCompletionNewParamsMessageUserContentArrayItemUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsMessageUserContentArrayItemUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsMessageUserContentArrayItemUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsMessageUserContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsMessageUserContentUnion ¶
type ChatCompletionNewParamsMessageUserContentUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfChatCompletionNewsMessageUserContentArray []ChatCompletionNewParamsMessageUserContentArrayItemUnion `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsMessageUserContentUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsMessageUserContentUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsMessageUserContentUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsMessageUserContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsResponseFormatJsonObject ¶
type ChatCompletionNewParamsResponseFormatJsonObject struct { // Must be "json_object" to indicate generic JSON object response format Type constant.JsonObject `json:"type,required"` // contains filtered or unexported fields }
JSON object response format for OpenAI-compatible chat completion requests.
This struct has a constant value, construct it with NewChatCompletionNewParamsResponseFormatJsonObject.
func NewChatCompletionNewParamsResponseFormatJsonObject ¶
func NewChatCompletionNewParamsResponseFormatJsonObject() ChatCompletionNewParamsResponseFormatJsonObject
func (ChatCompletionNewParamsResponseFormatJsonObject) MarshalJSON ¶
func (r ChatCompletionNewParamsResponseFormatJsonObject) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsResponseFormatJsonObject) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsResponseFormatJsonObject) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsResponseFormatJsonSchema ¶
type ChatCompletionNewParamsResponseFormatJsonSchema struct { // The JSON schema specification for the response JsonSchema ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchema `json:"json_schema,omitzero,required"` // Must be "json_schema" to indicate structured JSON response format // // This field can be elided, and will marshal its zero value as "json_schema". Type constant.JsonSchema `json:"type,required"` // contains filtered or unexported fields }
JSON schema response format for OpenAI-compatible chat completion requests.
The properties JsonSchema, Type are required.
func (ChatCompletionNewParamsResponseFormatJsonSchema) MarshalJSON ¶
func (r ChatCompletionNewParamsResponseFormatJsonSchema) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsResponseFormatJsonSchema) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsResponseFormatJsonSchema) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchema ¶
type ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchema struct { // Name of the schema Name string `json:"name,required"` // (Optional) Description of the schema Description param.Opt[string] `json:"description,omitzero"` // (Optional) Whether to enforce strict adherence to the schema Strict param.Opt[bool] `json:"strict,omitzero"` // (Optional) The JSON schema definition Schema map[string]ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchemaSchemaUnion `json:"schema,omitzero"` // contains filtered or unexported fields }
The JSON schema specification for the response
The property Name is required.
func (ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchema) MarshalJSON ¶
func (r ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchema) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchema) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchema) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchemaSchemaUnion ¶
type ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchemaSchemaUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchemaSchemaUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchemaSchemaUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchemaSchemaUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchemaSchemaUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsResponseFormatText ¶
type ChatCompletionNewParamsResponseFormatText struct { // Must be "text" to indicate plain text response format Type constant.Text `json:"type,required"` // contains filtered or unexported fields }
Text response format for OpenAI-compatible chat completion requests.
This struct has a constant value, construct it with NewChatCompletionNewParamsResponseFormatText.
func NewChatCompletionNewParamsResponseFormatText ¶
func NewChatCompletionNewParamsResponseFormatText() ChatCompletionNewParamsResponseFormatText
func (ChatCompletionNewParamsResponseFormatText) MarshalJSON ¶
func (r ChatCompletionNewParamsResponseFormatText) MarshalJSON() (data []byte, err error)
func (*ChatCompletionNewParamsResponseFormatText) UnmarshalJSON ¶
func (r *ChatCompletionNewParamsResponseFormatText) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsResponseFormatUnion ¶
type ChatCompletionNewParamsResponseFormatUnion struct { OfText *ChatCompletionNewParamsResponseFormatText `json:",omitzero,inline"` OfJsonSchema *ChatCompletionNewParamsResponseFormatJsonSchema `json:",omitzero,inline"` OfJsonObject *ChatCompletionNewParamsResponseFormatJsonObject `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsResponseFormatUnion) GetJsonSchema ¶
func (u ChatCompletionNewParamsResponseFormatUnion) GetJsonSchema() *ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchema
Returns a pointer to the underlying variant's property, if present.
func (ChatCompletionNewParamsResponseFormatUnion) GetType ¶
func (u ChatCompletionNewParamsResponseFormatUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (ChatCompletionNewParamsResponseFormatUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsResponseFormatUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsResponseFormatUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsResponseFormatUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsStopUnion ¶
type ChatCompletionNewParamsStopUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfStringArray []string `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsStopUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsStopUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsStopUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsStopUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsStreamOptionUnion ¶
type ChatCompletionNewParamsStreamOptionUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsStreamOptionUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsStreamOptionUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsStreamOptionUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsStreamOptionUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsToolChoiceMapItemUnion ¶
type ChatCompletionNewParamsToolChoiceMapItemUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsToolChoiceMapItemUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsToolChoiceMapItemUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsToolChoiceMapItemUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsToolChoiceMapItemUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsToolChoiceUnion ¶
type ChatCompletionNewParamsToolChoiceUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfChatCompletionNewsToolChoiceMapMap map[string]ChatCompletionNewParamsToolChoiceMapItemUnion `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsToolChoiceUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsToolChoiceUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsToolChoiceUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsToolChoiceUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewParamsToolUnion ¶
type ChatCompletionNewParamsToolUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ChatCompletionNewParamsToolUnion) MarshalJSON ¶
func (u ChatCompletionNewParamsToolUnion) MarshalJSON() ([]byte, error)
func (*ChatCompletionNewParamsToolUnion) UnmarshalJSON ¶
func (u *ChatCompletionNewParamsToolUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletion ¶
type ChatCompletionNewResponseOpenAIChatCompletion struct { // The ID of the chat completion ID string `json:"id,required"` // List of choices Choices []ChatCompletionNewResponseOpenAIChatCompletionChoice `json:"choices,required"` // The Unix timestamp in seconds when the chat completion was created Created int64 `json:"created,required"` // The model that was used to generate the chat completion Model string `json:"model,required"` // The object type, which will be "chat.completion" Object constant.ChatCompletion `json:"object,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Choices respjson.Field Created respjson.Field Model respjson.Field Object respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from an OpenAI-compatible chat completion request.
func (ChatCompletionNewResponseOpenAIChatCompletion) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletion) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletion) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoice ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoice struct { // The reason the model stopped generating FinishReason string `json:"finish_reason,required"` // The index of the choice Index int64 `json:"index,required"` // The message from the model Message ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion `json:"message,required"` // (Optional) The log probabilities for the tokens in the message Logprobs ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobs `json:"logprobs"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FinishReason respjson.Field Index respjson.Field Message respjson.Field Logprobs respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A choice from an OpenAI-compatible chat completion response.
func (ChatCompletionNewResponseOpenAIChatCompletionChoice) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoice) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoice) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoice) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobs ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobs struct { // (Optional) The log probabilities for the tokens in the message Content []ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContent `json:"content"` // (Optional) The log probabilities for the tokens in the message Refusal []ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusal `json:"refusal"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Refusal respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) The log probabilities for the tokens in the message
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobs) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobs) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobs) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobs) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContent ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContent struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` TopLogprobs []ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContentTopLogprob `json:"top_logprobs,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field TopLogprobs respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContent) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContent) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContent) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContent) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContentTopLogprob ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContentTopLogprob struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The top log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContentTopLogprob) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContentTopLogprob) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContentTopLogprob) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContentTopLogprob) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusal ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusal struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` TopLogprobs []ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusalTopLogprob `json:"top_logprobs,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field TopLogprobs respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusal) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusal) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusal) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusal) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusalTopLogprob ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusalTopLogprob struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The top log probability for a token from an OpenAI-compatible chat completion response.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusalTopLogprob) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusalTopLogprob) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusalTopLogprob) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusalTopLogprob) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistant ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistant struct { // Must be "assistant" to identify this as the model's response Role constant.Assistant `json:"role,required"` // The content of the model's response Content ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion `json:"content"` // (Optional) The name of the assistant message participant. Name string `json:"name"` // List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object. ToolCalls []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCall `json:"tool_calls"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Role respjson.Field Content respjson.Field Name respjson.Field ToolCalls respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message containing the model's (assistant) response in an OpenAI-compatible chat completion request.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistant) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistant) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistant) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistant) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem] // instead of an object. OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArray []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion contains all possible properties and values from [string], [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArray]
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArray ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArray() (v []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem)
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) AsString ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) AsString() (v string)
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) RawJSON ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCall ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCall struct { // Must be "function" to identify this as a function call Type constant.Function `json:"type,required"` // (Optional) Unique identifier for the tool call ID string `json:"id"` // (Optional) Function call details Function ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCallFunction `json:"function"` // (Optional) Index of the tool call in the list Index int64 `json:"index"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Type respjson.Field ID respjson.Field Function respjson.Field Index respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Tool call specification for OpenAI-compatible chat completion responses.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCall) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCall) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCall) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCallFunction ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCallFunction struct { // (Optional) Arguments to pass to the function as a JSON string Arguments string `json:"arguments"` // (Optional) Name of the function to call Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Function call details
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCallFunction) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCallFunction) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCallFunction) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCallFunction) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloper ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloper struct { // The content of the developer message Content ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion `json:"content,required"` // Must be "developer" to identify this as a developer message Role constant.Developer `json:"role,required"` // (Optional) The name of the developer message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message from the developer in an OpenAI-compatible chat completion request.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloper) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloper) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloper) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloper) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem] // instead of an object. OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArray []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion contains all possible properties and values from [string], [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArray]
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArray ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArray() (v []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem)
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) AsString ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) AsString() (v string)
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) RawJSON ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystem ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystem struct { // The content of the "system prompt". If multiple system messages are provided, // they are concatenated. The underlying Llama Stack code may also add other system // messages (for example, for formatting tool definitions). Content ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion `json:"content,required"` // Must be "system" to identify this as a system message Role constant.System `json:"role,required"` // (Optional) The name of the system message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A system message providing instructions or context to the model.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystem) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystem) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystem) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem] // instead of an object. OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArray []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion contains all possible properties and values from [string], [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArray]
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArray ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArray() (v []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem)
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) AsString ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) AsString() (v string)
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) RawJSON ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageTool ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageTool struct { // The response content from the tool Content ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion `json:"content,required"` // Must be "tool" to identify this as a tool response Role constant.Tool `json:"role,required"` // Unique identifier for the tool call this response is for ToolCallID string `json:"tool_call_id,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field ToolCallID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message representing the result of a tool invocation in an OpenAI-compatible chat completion request.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageTool) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageTool) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageTool) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem] // instead of an object. OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArray []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion contains all possible properties and values from [string], [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArray]
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArray ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArray() (v []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem)
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) AsString ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) AsString() (v string)
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) RawJSON ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion struct { // This field is a union of // [ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion], // [ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion], // [ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion], // [ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion], // [ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion] Content ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnionContent `json:"content"` // Any of "user", "system", "assistant", "tool", "developer". Role string `json:"role"` Name string `json:"name"` // This field is from variant // [ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistant]. ToolCalls []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCall `json:"tool_calls"` // This field is from variant // [ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageTool]. ToolCallID string `json:"tool_call_id"` JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ToolCalls respjson.Field ToolCallID respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion contains all possible properties and values from ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUser, ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystem, ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistant, ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageTool, ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloper.
Use the ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) AsAny ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) AsAny() anyChatCompletionNewResponseOpenAIChatCompletionChoiceMessage
Use the following switch statement to find the correct variant
switch variant := ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion.AsAny().(type) { case llamastackclient.ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUser: case llamastackclient.ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystem: case llamastackclient.ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistant: case llamastackclient.ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageTool: case llamastackclient.ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloper: default: fmt.Errorf("no variant present") }
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) AsAssistant ¶
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) AsDeveloper ¶
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) RawJSON ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnionContent ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnionContent struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion] // instead of an object. OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArray []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem] // instead of an object. OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArray []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem] // instead of an object. OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArray []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem] // instead of an object. OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArray []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem] // instead of an object. OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArray []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArray respjson.Field OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArray respjson.Field OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArray respjson.Field OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArray respjson.Field OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnionContent is an implicit subunion of ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion. ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnionContent provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArray OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArray OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArray OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArray OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArray]
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnionContent) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnionContent) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUser ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUser struct { // The content of the message, which can include text and other media Content ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion `json:"content,required"` // Must be "user" to identify this as a user message Role constant.User `json:"role,required"` // (Optional) The name of the user message participant. Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A message from the user in an OpenAI-compatible chat completion request.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUser) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUser) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUser) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFile ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFile struct { File ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFileFile `json:"file,required"` Type constant.File `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { File respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFile) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFile) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFile) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFileFile ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFileFile struct { FileData string `json:"file_data"` FileID string `json:"file_id"` Filename string `json:"filename"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileData respjson.Field FileID respjson.Field Filename respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFileFile) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFileFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFileFile) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFileFile) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURL ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURL struct { // Image URL specification and processing details ImageURL ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURLImageURL `json:"image_url,required"` // Must be "image_url" to identify this as image content Type constant.ImageURL `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ImageURL respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image content part for OpenAI-compatible chat completion messages.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURL) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURL) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURL) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURLImageURL ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURLImageURL struct { // URL of the image to include in the message URL string `json:"url,required"` // (Optional) Level of detail for image processing. Can be "low", "high", or "auto" Detail string `json:"detail"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { URL respjson.Field Detail respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image URL specification and processing details
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURLImageURL) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURLImageURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemText ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemText struct { // The text content of the message Text string `json:"text,required"` // Must be "text" to identify this as text content Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content part for OpenAI-compatible chat completion messages.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemText) RawJSON ¶
func (r ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemText) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemText) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion struct { // This field is from variant // [ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemText]. Text string `json:"text"` // Any of "text", "image_url", "file". Type string `json:"type"` // This field is from variant // [ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURL]. ImageURL ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURLImageURL `json:"image_url"` // This field is from variant // [ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFile]. File ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFileFile `json:"file"` JSON struct { Text respjson.Field Type respjson.Field ImageURL respjson.Field File respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion contains all possible properties and values from ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemText, ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURL, ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFile.
Use the ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) AsAny ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) AsAny() anyChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItem
Use the following switch statement to find the correct variant
switch variant := ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion.AsAny().(type) { case llamastackclient.ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemText: case llamastackclient.ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURL: case llamastackclient.ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFile: default: fmt.Errorf("no variant present") }
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) AsImageURL ¶
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) RawJSON ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion ¶
type ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion] // instead of an object. OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArray []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion `json:",inline"` JSON struct { OfString respjson.Field OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion contains all possible properties and values from [string], [[]ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArray]
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArray ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) AsChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArray() (v []ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion)
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) AsString ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) AsString() (v string)
func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) RawJSON ¶
func (u ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseUnion ¶
type ChatCompletionNewResponseUnion struct { ID string `json:"id"` // This field is a union of // [[]ChatCompletionNewResponseOpenAIChatCompletionChoice], // [[]ChatCompletionChunkChoice] Choices ChatCompletionNewResponseUnionChoices `json:"choices"` Created int64 `json:"created"` Model string `json:"model"` Object string `json:"object"` JSON struct { ID respjson.Field Choices respjson.Field Created respjson.Field Model respjson.Field Object respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionNewResponseUnion contains all possible properties and values from ChatCompletionNewResponseOpenAIChatCompletion, ChatCompletionChunk.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ChatCompletionNewResponseUnion) AsOpenAIChatCompletion ¶
func (u ChatCompletionNewResponseUnion) AsOpenAIChatCompletion() (v ChatCompletionNewResponseOpenAIChatCompletion)
func (ChatCompletionNewResponseUnion) AsOpenAIChatCompletionChunk ¶
func (u ChatCompletionNewResponseUnion) AsOpenAIChatCompletionChunk() (v ChatCompletionChunk)
func (ChatCompletionNewResponseUnion) RawJSON ¶
func (u ChatCompletionNewResponseUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionNewResponseUnion) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseUnion) UnmarshalJSON(data []byte) error
type ChatCompletionNewResponseUnionChoices ¶
type ChatCompletionNewResponseUnionChoices struct { // This field will be present if the value is a // [[]ChatCompletionNewResponseOpenAIChatCompletionChoice] instead of an object. OfChatCompletionNewResponseOpenAIChatCompletionChoices []ChatCompletionNewResponseOpenAIChatCompletionChoice `json:",inline"` // This field will be present if the value is a [[]ChatCompletionChunkChoice] // instead of an object. OfChatCompletionChunkChoices []ChatCompletionChunkChoice `json:",inline"` JSON struct { OfChatCompletionNewResponseOpenAIChatCompletionChoices respjson.Field OfChatCompletionChunkChoices respjson.Field // contains filtered or unexported fields } `json:"-"` }
ChatCompletionNewResponseUnionChoices is an implicit subunion of ChatCompletionNewResponseUnion. ChatCompletionNewResponseUnionChoices provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ChatCompletionNewResponseUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfChatCompletionNewResponseOpenAIChatCompletionChoices OfChatCompletionChunkChoices]
func (*ChatCompletionNewResponseUnionChoices) UnmarshalJSON ¶
func (r *ChatCompletionNewResponseUnionChoices) UnmarshalJSON(data []byte) error
type ChatCompletionResponse ¶
type ChatCompletionResponse = shared.ChatCompletionResponse
Response from a chat completion request.
This is an alias to an internal type.
type ChatCompletionResponseLogprob ¶
type ChatCompletionResponseLogprob = shared.ChatCompletionResponseLogprob
Log probabilities for generated tokens.
This is an alias to an internal type.
type ChatCompletionResponseMetric ¶
type ChatCompletionResponseMetric = shared.ChatCompletionResponseMetric
A metric value included in API responses.
This is an alias to an internal type.
type ChatCompletionResponseStreamChunk ¶
type ChatCompletionResponseStreamChunk struct { // The event containing the new content Event ChatCompletionResponseStreamChunkEvent `json:"event,required"` // (Optional) List of metrics associated with the API response Metrics []ChatCompletionResponseStreamChunkMetric `json:"metrics"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Event respjson.Field Metrics respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A chunk of a streamed chat completion response.
func (ChatCompletionResponseStreamChunk) RawJSON ¶
func (r ChatCompletionResponseStreamChunk) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionResponseStreamChunk) UnmarshalJSON ¶
func (r *ChatCompletionResponseStreamChunk) UnmarshalJSON(data []byte) error
type ChatCompletionResponseStreamChunkEvent ¶
type ChatCompletionResponseStreamChunkEvent struct { // Content generated since last event. This can be one or more tokens, or a tool // call. Delta shared.ContentDeltaUnion `json:"delta,required"` // Type of the event // // Any of "start", "complete", "progress". EventType string `json:"event_type,required"` // Optional log probabilities for generated tokens Logprobs []ChatCompletionResponseStreamChunkEventLogprob `json:"logprobs"` // Optional reason why generation stopped, if complete // // Any of "end_of_turn", "end_of_message", "out_of_tokens". StopReason string `json:"stop_reason"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Delta respjson.Field EventType respjson.Field Logprobs respjson.Field StopReason respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The event containing the new content
func (ChatCompletionResponseStreamChunkEvent) RawJSON ¶
func (r ChatCompletionResponseStreamChunkEvent) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionResponseStreamChunkEvent) UnmarshalJSON ¶
func (r *ChatCompletionResponseStreamChunkEvent) UnmarshalJSON(data []byte) error
type ChatCompletionResponseStreamChunkEventLogprob ¶
type ChatCompletionResponseStreamChunkEventLogprob struct { // Dictionary mapping tokens to their log probabilities LogprobsByToken map[string]float64 `json:"logprobs_by_token,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { LogprobsByToken respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Log probabilities for generated tokens.
func (ChatCompletionResponseStreamChunkEventLogprob) RawJSON ¶
func (r ChatCompletionResponseStreamChunkEventLogprob) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionResponseStreamChunkEventLogprob) UnmarshalJSON ¶
func (r *ChatCompletionResponseStreamChunkEventLogprob) UnmarshalJSON(data []byte) error
type ChatCompletionResponseStreamChunkMetric ¶
type ChatCompletionResponseStreamChunkMetric struct { // The name of the metric Metric string `json:"metric,required"` // The numeric value of the metric Value float64 `json:"value,required"` // (Optional) The unit of measurement for the metric value Unit string `json:"unit"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Metric respjson.Field Value respjson.Field Unit respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A metric value included in API responses.
func (ChatCompletionResponseStreamChunkMetric) RawJSON ¶
func (r ChatCompletionResponseStreamChunkMetric) RawJSON() string
Returns the unmodified JSON received from the API
func (*ChatCompletionResponseStreamChunkMetric) UnmarshalJSON ¶
func (r *ChatCompletionResponseStreamChunkMetric) UnmarshalJSON(data []byte) error
type ChatCompletionService ¶
type ChatCompletionService struct {
Options []option.RequestOption
}
ChatCompletionService contains methods and other services that help with interacting with the llama-stack-client 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) Get ¶
func (r *ChatCompletionService) Get(ctx context.Context, completionID string, opts ...option.RequestOption) (res *ChatCompletionGetResponse, err error)
Describe a chat completion by its ID.
func (*ChatCompletionService) List ¶
func (r *ChatCompletionService) List(ctx context.Context, query ChatCompletionListParams, opts ...option.RequestOption) (res *pagination.OpenAICursorPage[ChatCompletionListResponse], err error)
List all chat completions.
func (*ChatCompletionService) ListAutoPaging ¶
func (r *ChatCompletionService) ListAutoPaging(ctx context.Context, query ChatCompletionListParams, opts ...option.RequestOption) *pagination.OpenAICursorPageAutoPager[ChatCompletionListResponse]
List all chat completions.
func (*ChatCompletionService) New ¶
func (r *ChatCompletionService) New(ctx context.Context, body ChatCompletionNewParams, opts ...option.RequestOption) (res *ChatCompletionNewResponseUnion, err error)
Generate an OpenAI-compatible chat completion for the given messages using the specified model.
func (*ChatCompletionService) NewStreaming ¶
func (r *ChatCompletionService) NewStreaming(ctx context.Context, body ChatCompletionNewParams, opts ...option.RequestOption) (stream *ssestream.Stream[ChatCompletionChunk])
Generate an OpenAI-compatible chat completion for the given messages using the specified model.
type ChatService ¶
type ChatService struct { Options []option.RequestOption Completions ChatCompletionService }
ChatService contains methods and other services that help with interacting with the llama-stack-client 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 Toolgroups ToolgroupService Tools ToolService ToolRuntime ToolRuntimeService Responses ResponseService Agents AgentService Datasets DatasetService Eval EvalService Inspect InspectService Inference InferenceService Embeddings EmbeddingService Chat ChatService Completions CompletionService VectorIo VectorIoService VectorDBs VectorDBService VectorStores VectorStoreService Models ModelService PostTraining PostTrainingService Providers ProviderService Routes RouteService Moderations ModerationService Safety SafetyService Shields ShieldService SyntheticDataGeneration SyntheticDataGenerationService Telemetry TelemetryService Scoring ScoringService ScoringFunctions ScoringFunctionService Benchmarks BenchmarkService Files FileService }
Client creates a struct with services and top level methods that help with interacting with the llama-stack-client 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 (LLAMA_STACK_CLIENT_API_KEY, LLAMA_STACK_CLIENT_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 any, res any, 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 any, res any, 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 any, res any, 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) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params any, res any, 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.
type CompletionMessage ¶
type CompletionMessage = shared.CompletionMessage
A message containing the model's (assistant) response in a chat conversation.
This is an alias to an internal type.
type CompletionMessageParam ¶
type CompletionMessageParam = shared.CompletionMessageParam
A message containing the model's (assistant) response in a chat conversation.
This is an alias to an internal type.
type CompletionMessageStopReason ¶
type CompletionMessageStopReason = shared.CompletionMessageStopReason
Reason why the model stopped generating. Options are: - `StopReason.end_of_turn`: The model finished generating the entire response. - `StopReason.end_of_message`: The model finished generating but generated a partial response -- usually, a tool call. The user may call the tool and continue the conversation with the tool's response. - `StopReason.out_of_tokens`: The model ran out of token budget.
This is an alias to an internal type.
type CompletionNewParams ¶
type CompletionNewParams struct { // The identifier of the model to use. The model must be registered with Llama // Stack and available via the /models endpoint. Model string `json:"model,required"` // The prompt to generate a completion for. Prompt CompletionNewParamsPromptUnion `json:"prompt,omitzero,required"` // (Optional) The number of completions to generate. BestOf param.Opt[int64] `json:"best_of,omitzero"` // (Optional) Whether to echo the prompt. Echo param.Opt[bool] `json:"echo,omitzero"` // (Optional) The penalty for repeated tokens. FrequencyPenalty param.Opt[float64] `json:"frequency_penalty,omitzero"` // (Optional) The log probabilities to use. Logprobs param.Opt[bool] `json:"logprobs,omitzero"` // (Optional) The maximum number of tokens to generate. MaxTokens param.Opt[int64] `json:"max_tokens,omitzero"` // (Optional) The number of completions to generate. N param.Opt[int64] `json:"n,omitzero"` // (Optional) The penalty for repeated tokens. PresencePenalty param.Opt[float64] `json:"presence_penalty,omitzero"` PromptLogprobs param.Opt[int64] `json:"prompt_logprobs,omitzero"` // (Optional) The seed to use. Seed param.Opt[int64] `json:"seed,omitzero"` // (Optional) The suffix that should be appended to the completion. Suffix param.Opt[string] `json:"suffix,omitzero"` // (Optional) The temperature to use. Temperature param.Opt[float64] `json:"temperature,omitzero"` // (Optional) The top p to use. TopP param.Opt[float64] `json:"top_p,omitzero"` // (Optional) The user to use. User param.Opt[string] `json:"user,omitzero"` GuidedChoice []string `json:"guided_choice,omitzero"` // (Optional) The logit bias to use. LogitBias map[string]float64 `json:"logit_bias,omitzero"` // (Optional) The stop tokens to use. Stop CompletionNewParamsStopUnion `json:"stop,omitzero"` // (Optional) The stream options to use. StreamOptions map[string]CompletionNewParamsStreamOptionUnion `json:"stream_options,omitzero"` // contains filtered or unexported fields }
func (CompletionNewParams) MarshalJSON ¶
func (r CompletionNewParams) MarshalJSON() (data []byte, err error)
func (*CompletionNewParams) UnmarshalJSON ¶
func (r *CompletionNewParams) UnmarshalJSON(data []byte) error
type CompletionNewParamsPromptUnion ¶
type CompletionNewParamsPromptUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfStringArray []string `json:",omitzero,inline"` OfIntArray []int64 `json:",omitzero,inline"` OfArrayOfIntArray [][]int64 `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (CompletionNewParamsPromptUnion) MarshalJSON ¶
func (u CompletionNewParamsPromptUnion) MarshalJSON() ([]byte, error)
func (*CompletionNewParamsPromptUnion) UnmarshalJSON ¶
func (u *CompletionNewParamsPromptUnion) UnmarshalJSON(data []byte) error
type CompletionNewParamsStopUnion ¶
type CompletionNewParamsStopUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfStringArray []string `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (CompletionNewParamsStopUnion) MarshalJSON ¶
func (u CompletionNewParamsStopUnion) MarshalJSON() ([]byte, error)
func (*CompletionNewParamsStopUnion) UnmarshalJSON ¶
func (u *CompletionNewParamsStopUnion) UnmarshalJSON(data []byte) error
type CompletionNewParamsStreamOptionUnion ¶
type CompletionNewParamsStreamOptionUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (CompletionNewParamsStreamOptionUnion) MarshalJSON ¶
func (u CompletionNewParamsStreamOptionUnion) MarshalJSON() ([]byte, error)
func (*CompletionNewParamsStreamOptionUnion) UnmarshalJSON ¶
func (u *CompletionNewParamsStreamOptionUnion) UnmarshalJSON(data []byte) error
type CompletionNewResponse ¶
type CompletionNewResponse struct { ID string `json:"id,required"` Choices []CompletionNewResponseChoice `json:"choices,required"` Created int64 `json:"created,required"` Model string `json:"model,required"` Object constant.TextCompletion `json:"object,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Choices respjson.Field Created respjson.Field Model respjson.Field Object respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from an OpenAI-compatible completion request.
func (CompletionNewResponse) RawJSON ¶
func (r CompletionNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompletionNewResponse) UnmarshalJSON ¶
func (r *CompletionNewResponse) UnmarshalJSON(data []byte) error
type CompletionNewResponseChoice ¶
type CompletionNewResponseChoice struct { FinishReason string `json:"finish_reason,required"` Index int64 `json:"index,required"` Text string `json:"text,required"` // The log probabilities for the tokens in the message from an OpenAI-compatible // chat completion response. Logprobs CompletionNewResponseChoiceLogprobs `json:"logprobs"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FinishReason respjson.Field Index respjson.Field Text respjson.Field Logprobs respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A choice from an OpenAI-compatible completion response.
func (CompletionNewResponseChoice) RawJSON ¶
func (r CompletionNewResponseChoice) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompletionNewResponseChoice) UnmarshalJSON ¶
func (r *CompletionNewResponseChoice) UnmarshalJSON(data []byte) error
type CompletionNewResponseChoiceLogprobs ¶
type CompletionNewResponseChoiceLogprobs struct { // (Optional) The log probabilities for the tokens in the message Content []CompletionNewResponseChoiceLogprobsContent `json:"content"` // (Optional) The log probabilities for the tokens in the message Refusal []CompletionNewResponseChoiceLogprobsRefusal `json:"refusal"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Refusal respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The log probabilities for the tokens in the message from an OpenAI-compatible chat completion response.
func (CompletionNewResponseChoiceLogprobs) RawJSON ¶
func (r CompletionNewResponseChoiceLogprobs) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompletionNewResponseChoiceLogprobs) UnmarshalJSON ¶
func (r *CompletionNewResponseChoiceLogprobs) UnmarshalJSON(data []byte) error
type CompletionNewResponseChoiceLogprobsContent ¶
type CompletionNewResponseChoiceLogprobsContent struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` TopLogprobs []CompletionNewResponseChoiceLogprobsContentTopLogprob `json:"top_logprobs,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field TopLogprobs respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The log probability for a token from an OpenAI-compatible chat completion response.
func (CompletionNewResponseChoiceLogprobsContent) RawJSON ¶
func (r CompletionNewResponseChoiceLogprobsContent) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompletionNewResponseChoiceLogprobsContent) UnmarshalJSON ¶
func (r *CompletionNewResponseChoiceLogprobsContent) UnmarshalJSON(data []byte) error
type CompletionNewResponseChoiceLogprobsContentTopLogprob ¶
type CompletionNewResponseChoiceLogprobsContentTopLogprob struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The top log probability for a token from an OpenAI-compatible chat completion response.
func (CompletionNewResponseChoiceLogprobsContentTopLogprob) RawJSON ¶
func (r CompletionNewResponseChoiceLogprobsContentTopLogprob) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompletionNewResponseChoiceLogprobsContentTopLogprob) UnmarshalJSON ¶
func (r *CompletionNewResponseChoiceLogprobsContentTopLogprob) UnmarshalJSON(data []byte) error
type CompletionNewResponseChoiceLogprobsRefusal ¶
type CompletionNewResponseChoiceLogprobsRefusal struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` TopLogprobs []CompletionNewResponseChoiceLogprobsRefusalTopLogprob `json:"top_logprobs,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field TopLogprobs respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The log probability for a token from an OpenAI-compatible chat completion response.
func (CompletionNewResponseChoiceLogprobsRefusal) RawJSON ¶
func (r CompletionNewResponseChoiceLogprobsRefusal) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompletionNewResponseChoiceLogprobsRefusal) UnmarshalJSON ¶
func (r *CompletionNewResponseChoiceLogprobsRefusal) UnmarshalJSON(data []byte) error
type CompletionNewResponseChoiceLogprobsRefusalTopLogprob ¶
type CompletionNewResponseChoiceLogprobsRefusalTopLogprob struct { Token string `json:"token,required"` Logprob float64 `json:"logprob,required"` Bytes []int64 `json:"bytes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field Logprob respjson.Field Bytes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The top log probability for a token from an OpenAI-compatible chat completion response.
func (CompletionNewResponseChoiceLogprobsRefusalTopLogprob) RawJSON ¶
func (r CompletionNewResponseChoiceLogprobsRefusalTopLogprob) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompletionNewResponseChoiceLogprobsRefusalTopLogprob) UnmarshalJSON ¶
func (r *CompletionNewResponseChoiceLogprobsRefusalTopLogprob) UnmarshalJSON(data []byte) error
type CompletionService ¶
type CompletionService struct {
Options []option.RequestOption
}
CompletionService contains methods and other services that help with interacting with the llama-stack-client 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)
Generate an OpenAI-compatible completion for the given prompt using the specified model.
func (*CompletionService) NewStreaming ¶
func (r *CompletionService) NewStreaming(ctx context.Context, body CompletionNewParams, opts ...option.RequestOption) (stream *ssestream.Stream[CompletionNewResponse])
Generate an OpenAI-compatible completion for the given prompt using the specified model.
type ContentDeltaImage ¶
type ContentDeltaImage = shared.ContentDeltaImage
An image content delta for streaming responses.
This is an alias to an internal type.
type ContentDeltaText ¶
type ContentDeltaText = shared.ContentDeltaText
A text content delta for streaming responses.
This is an alias to an internal type.
type ContentDeltaToolCall ¶
type ContentDeltaToolCall = shared.ContentDeltaToolCall
A tool call content delta for streaming responses.
This is an alias to an internal type.
type ContentDeltaUnion ¶
type ContentDeltaUnion = shared.ContentDeltaUnion
A text content delta for streaming responses.
This is an alias to an internal type.
type CreateEmbeddingsResponse ¶
type CreateEmbeddingsResponse struct { // List of embedding data objects Data []CreateEmbeddingsResponseData `json:"data,required"` // The model that was used to generate the embeddings Model string `json:"model,required"` // The object type, which will be "list" Object constant.List `json:"object,required"` // Usage information Usage CreateEmbeddingsResponseUsage `json:"usage,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field Model respjson.Field Object respjson.Field Usage respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from an OpenAI-compatible embeddings request.
func (CreateEmbeddingsResponse) RawJSON ¶
func (r CreateEmbeddingsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreateEmbeddingsResponse) UnmarshalJSON ¶
func (r *CreateEmbeddingsResponse) UnmarshalJSON(data []byte) error
type CreateEmbeddingsResponseData ¶
type CreateEmbeddingsResponseData struct { // The embedding vector as a list of floats (when encoding_format="float") or as a // base64-encoded string (when encoding_format="base64") Embedding CreateEmbeddingsResponseDataEmbeddingUnion `json:"embedding,required"` // The index of the embedding in the input list Index int64 `json:"index,required"` // The object type, which will be "embedding" Object constant.Embedding `json:"object,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Embedding respjson.Field Index respjson.Field Object respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A single embedding data object from an OpenAI-compatible embeddings response.
func (CreateEmbeddingsResponseData) RawJSON ¶
func (r CreateEmbeddingsResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreateEmbeddingsResponseData) UnmarshalJSON ¶
func (r *CreateEmbeddingsResponseData) UnmarshalJSON(data []byte) error
type CreateEmbeddingsResponseDataEmbeddingUnion ¶
type CreateEmbeddingsResponseDataEmbeddingUnion struct { // This field will be present if the value is a [[]float64] instead of an object. OfFloatArray []float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` JSON struct { OfFloatArray respjson.Field OfString respjson.Field // contains filtered or unexported fields } `json:"-"` }
CreateEmbeddingsResponseDataEmbeddingUnion contains all possible properties and values from [[]float64], [string].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfFloatArray OfString]
func (CreateEmbeddingsResponseDataEmbeddingUnion) AsFloatArray ¶
func (u CreateEmbeddingsResponseDataEmbeddingUnion) AsFloatArray() (v []float64)
func (CreateEmbeddingsResponseDataEmbeddingUnion) AsString ¶
func (u CreateEmbeddingsResponseDataEmbeddingUnion) AsString() (v string)
func (CreateEmbeddingsResponseDataEmbeddingUnion) RawJSON ¶
func (u CreateEmbeddingsResponseDataEmbeddingUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreateEmbeddingsResponseDataEmbeddingUnion) UnmarshalJSON ¶
func (r *CreateEmbeddingsResponseDataEmbeddingUnion) UnmarshalJSON(data []byte) error
type CreateEmbeddingsResponseUsage ¶
type CreateEmbeddingsResponseUsage struct { // The number of tokens in the input PromptTokens int64 `json:"prompt_tokens,required"` // The total number of tokens used TotalTokens int64 `json:"total_tokens,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { PromptTokens respjson.Field TotalTokens respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Usage information
func (CreateEmbeddingsResponseUsage) RawJSON ¶
func (r CreateEmbeddingsResponseUsage) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreateEmbeddingsResponseUsage) UnmarshalJSON ¶
func (r *CreateEmbeddingsResponseUsage) UnmarshalJSON(data []byte) error
type CreateResponse ¶
type CreateResponse struct { // The unique identifier for the moderation request. ID string `json:"id,required"` // The model used to generate the moderation results. Model string `json:"model,required"` // A list of moderation objects Results []CreateResponseResult `json:"results,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Model respjson.Field Results respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A moderation object.
func (CreateResponse) RawJSON ¶
func (r CreateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreateResponse) UnmarshalJSON ¶
func (r *CreateResponse) UnmarshalJSON(data []byte) error
type CreateResponseResult ¶
type CreateResponseResult struct { // Whether any of the below categories are flagged. Flagged bool `json:"flagged,required"` Metadata map[string]CreateResponseResultMetadataUnion `json:"metadata,required"` // A list of the categories, and whether they are flagged or not. Categories map[string]bool `json:"categories"` // A list of the categories along with the input type(s) that the score applies to. CategoryAppliedInputTypes map[string][]string `json:"category_applied_input_types"` // A list of the categories along with their scores as predicted by model. Required // set of categories that need to be in response - violence - violence/graphic - // harassment - harassment/threatening - hate - hate/threatening - illicit - // illicit/violent - sexual - sexual/minors - self-harm - self-harm/intent - // self-harm/instructions CategoryScores map[string]float64 `json:"category_scores"` UserMessage string `json:"user_message"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Flagged respjson.Field Metadata respjson.Field Categories respjson.Field CategoryAppliedInputTypes respjson.Field CategoryScores respjson.Field UserMessage respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A moderation object.
func (CreateResponseResult) RawJSON ¶
func (r CreateResponseResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreateResponseResult) UnmarshalJSON ¶
func (r *CreateResponseResult) UnmarshalJSON(data []byte) error
type CreateResponseResultMetadataUnion ¶
type CreateResponseResultMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
CreateResponseResultMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (CreateResponseResultMetadataUnion) AsAnyArray ¶
func (u CreateResponseResultMetadataUnion) AsAnyArray() (v []any)
func (CreateResponseResultMetadataUnion) AsBool ¶
func (u CreateResponseResultMetadataUnion) AsBool() (v bool)
func (CreateResponseResultMetadataUnion) AsFloat ¶
func (u CreateResponseResultMetadataUnion) AsFloat() (v float64)
func (CreateResponseResultMetadataUnion) AsString ¶
func (u CreateResponseResultMetadataUnion) AsString() (v string)
func (CreateResponseResultMetadataUnion) RawJSON ¶
func (u CreateResponseResultMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreateResponseResultMetadataUnion) UnmarshalJSON ¶
func (r *CreateResponseResultMetadataUnion) UnmarshalJSON(data []byte) error
type DatasetAppendrowsParams ¶
type DatasetAppendrowsParams struct { // The rows to append to the dataset. Rows []map[string]DatasetAppendrowsParamsRowUnion `json:"rows,omitzero,required"` // contains filtered or unexported fields }
func (DatasetAppendrowsParams) MarshalJSON ¶
func (r DatasetAppendrowsParams) MarshalJSON() (data []byte, err error)
func (*DatasetAppendrowsParams) UnmarshalJSON ¶
func (r *DatasetAppendrowsParams) UnmarshalJSON(data []byte) error
type DatasetAppendrowsParamsRowUnion ¶
type DatasetAppendrowsParamsRowUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (DatasetAppendrowsParamsRowUnion) MarshalJSON ¶
func (u DatasetAppendrowsParamsRowUnion) MarshalJSON() ([]byte, error)
func (*DatasetAppendrowsParamsRowUnion) UnmarshalJSON ¶
func (u *DatasetAppendrowsParamsRowUnion) UnmarshalJSON(data []byte) error
type DatasetGetResponse ¶
type DatasetGetResponse struct { Identifier string `json:"identifier,required"` // Additional metadata for the dataset Metadata map[string]DatasetGetResponseMetadataUnion `json:"metadata,required"` ProviderID string `json:"provider_id,required"` // Purpose of the dataset indicating its intended use // // Any of "post-training/messages", "eval/question-answer", "eval/messages-answer". Purpose DatasetGetResponsePurpose `json:"purpose,required"` // Data source configuration for the dataset Source DatasetGetResponseSourceUnion `json:"source,required"` // Type of resource, always 'dataset' for datasets Type constant.Dataset `json:"type,required"` ProviderResourceID string `json:"provider_resource_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Identifier respjson.Field Metadata respjson.Field ProviderID respjson.Field Purpose respjson.Field Source respjson.Field Type respjson.Field ProviderResourceID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Dataset resource for storing and accessing training or evaluation data.
func (DatasetGetResponse) RawJSON ¶
func (r DatasetGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetGetResponse) UnmarshalJSON ¶
func (r *DatasetGetResponse) UnmarshalJSON(data []byte) error
type DatasetGetResponseMetadataUnion ¶
type DatasetGetResponseMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
DatasetGetResponseMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (DatasetGetResponseMetadataUnion) AsAnyArray ¶
func (u DatasetGetResponseMetadataUnion) AsAnyArray() (v []any)
func (DatasetGetResponseMetadataUnion) AsBool ¶
func (u DatasetGetResponseMetadataUnion) AsBool() (v bool)
func (DatasetGetResponseMetadataUnion) AsFloat ¶
func (u DatasetGetResponseMetadataUnion) AsFloat() (v float64)
func (DatasetGetResponseMetadataUnion) AsString ¶
func (u DatasetGetResponseMetadataUnion) AsString() (v string)
func (DatasetGetResponseMetadataUnion) RawJSON ¶
func (u DatasetGetResponseMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetGetResponseMetadataUnion) UnmarshalJSON ¶
func (r *DatasetGetResponseMetadataUnion) UnmarshalJSON(data []byte) error
type DatasetGetResponsePurpose ¶
type DatasetGetResponsePurpose string
Purpose of the dataset indicating its intended use
const ( DatasetGetResponsePurposePostTrainingMessages DatasetGetResponsePurpose = "post-training/messages" DatasetGetResponsePurposeEvalQuestionAnswer DatasetGetResponsePurpose = "eval/question-answer" DatasetGetResponsePurposeEvalMessagesAnswer DatasetGetResponsePurpose = "eval/messages-answer" )
type DatasetGetResponseSourceRows ¶
type DatasetGetResponseSourceRows struct { // The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", // "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]} // ] Rows []map[string]DatasetGetResponseSourceRowsRowUnion `json:"rows,required"` Type constant.Rows `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Rows respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A dataset stored in rows.
func (DatasetGetResponseSourceRows) RawJSON ¶
func (r DatasetGetResponseSourceRows) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetGetResponseSourceRows) UnmarshalJSON ¶
func (r *DatasetGetResponseSourceRows) UnmarshalJSON(data []byte) error
type DatasetGetResponseSourceRowsRowUnion ¶
type DatasetGetResponseSourceRowsRowUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
DatasetGetResponseSourceRowsRowUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (DatasetGetResponseSourceRowsRowUnion) AsAnyArray ¶
func (u DatasetGetResponseSourceRowsRowUnion) AsAnyArray() (v []any)
func (DatasetGetResponseSourceRowsRowUnion) AsBool ¶
func (u DatasetGetResponseSourceRowsRowUnion) AsBool() (v bool)
func (DatasetGetResponseSourceRowsRowUnion) AsFloat ¶
func (u DatasetGetResponseSourceRowsRowUnion) AsFloat() (v float64)
func (DatasetGetResponseSourceRowsRowUnion) AsString ¶
func (u DatasetGetResponseSourceRowsRowUnion) AsString() (v string)
func (DatasetGetResponseSourceRowsRowUnion) RawJSON ¶
func (u DatasetGetResponseSourceRowsRowUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetGetResponseSourceRowsRowUnion) UnmarshalJSON ¶
func (r *DatasetGetResponseSourceRowsRowUnion) UnmarshalJSON(data []byte) error
type DatasetGetResponseSourceUnion ¶
type DatasetGetResponseSourceUnion struct { // Any of "uri", "rows". Type string `json:"type"` // This field is from variant [DatasetGetResponseSourceUri]. Uri string `json:"uri"` // This field is from variant [DatasetGetResponseSourceRows]. Rows []map[string]DatasetGetResponseSourceRowsRowUnion `json:"rows"` JSON struct { Type respjson.Field Uri respjson.Field Rows respjson.Field // contains filtered or unexported fields } `json:"-"` }
DatasetGetResponseSourceUnion contains all possible properties and values from DatasetGetResponseSourceUri, DatasetGetResponseSourceRows.
Use the DatasetGetResponseSourceUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (DatasetGetResponseSourceUnion) AsAny ¶
func (u DatasetGetResponseSourceUnion) AsAny() anyDatasetGetResponseSource
Use the following switch statement to find the correct variant
switch variant := DatasetGetResponseSourceUnion.AsAny().(type) { case llamastackclient.DatasetGetResponseSourceUri: case llamastackclient.DatasetGetResponseSourceRows: default: fmt.Errorf("no variant present") }
func (DatasetGetResponseSourceUnion) AsRows ¶
func (u DatasetGetResponseSourceUnion) AsRows() (v DatasetGetResponseSourceRows)
func (DatasetGetResponseSourceUnion) AsUri ¶
func (u DatasetGetResponseSourceUnion) AsUri() (v DatasetGetResponseSourceUri)
func (DatasetGetResponseSourceUnion) RawJSON ¶
func (u DatasetGetResponseSourceUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetGetResponseSourceUnion) UnmarshalJSON ¶
func (r *DatasetGetResponseSourceUnion) UnmarshalJSON(data []byte) error
type DatasetGetResponseSourceUri ¶
type DatasetGetResponseSourceUri struct { Type constant.Uri `json:"type,required"` // The dataset can be obtained from a URI. E.g. - // "https://mywebsite.com/mydata.jsonl" - "lsfs://mydata.jsonl" - // "data:csv;base64,{base64_content}" Uri string `json:"uri,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Type respjson.Field Uri respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A dataset that can be obtained from a URI.
func (DatasetGetResponseSourceUri) RawJSON ¶
func (r DatasetGetResponseSourceUri) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetGetResponseSourceUri) UnmarshalJSON ¶
func (r *DatasetGetResponseSourceUri) UnmarshalJSON(data []byte) error
type DatasetIterrowsParams ¶
type DatasetIterrowsParams struct { // The number of rows to get. Limit param.Opt[int64] `query:"limit,omitzero" json:"-"` // Index into dataset for the first row to get. Get all rows if None. StartIndex param.Opt[int64] `query:"start_index,omitzero" json:"-"` // contains filtered or unexported fields }
func (DatasetIterrowsParams) URLQuery ¶
func (r DatasetIterrowsParams) URLQuery() (v url.Values, err error)
URLQuery serializes DatasetIterrowsParams's query parameters as `url.Values`.
type DatasetIterrowsResponse ¶
type DatasetIterrowsResponse struct { // The list of items for the current page Data []map[string]DatasetIterrowsResponseDataUnion `json:"data,required"` // Whether there are more items available after this set HasMore bool `json:"has_more,required"` // The URL for accessing this list URL string `json:"url"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field HasMore respjson.Field URL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A generic paginated response that follows a simple format.
func (DatasetIterrowsResponse) RawJSON ¶
func (r DatasetIterrowsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetIterrowsResponse) UnmarshalJSON ¶
func (r *DatasetIterrowsResponse) UnmarshalJSON(data []byte) error
type DatasetIterrowsResponseDataUnion ¶
type DatasetIterrowsResponseDataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
DatasetIterrowsResponseDataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (DatasetIterrowsResponseDataUnion) AsAnyArray ¶
func (u DatasetIterrowsResponseDataUnion) AsAnyArray() (v []any)
func (DatasetIterrowsResponseDataUnion) AsBool ¶
func (u DatasetIterrowsResponseDataUnion) AsBool() (v bool)
func (DatasetIterrowsResponseDataUnion) AsFloat ¶
func (u DatasetIterrowsResponseDataUnion) AsFloat() (v float64)
func (DatasetIterrowsResponseDataUnion) AsString ¶
func (u DatasetIterrowsResponseDataUnion) AsString() (v string)
func (DatasetIterrowsResponseDataUnion) RawJSON ¶
func (u DatasetIterrowsResponseDataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetIterrowsResponseDataUnion) UnmarshalJSON ¶
func (r *DatasetIterrowsResponseDataUnion) UnmarshalJSON(data []byte) error
type DatasetRegisterParams ¶
type DatasetRegisterParams struct { // The purpose of the dataset. One of: - "post-training/messages": The dataset // contains a messages column with list of messages for post-training. { // "messages": [ {"role": "user", "content": "Hello, world!"}, {"role": // "assistant", "content": "Hello, world!"}, ] } - "eval/question-answer": The // dataset contains a question column and an answer column for evaluation. { // "question": "What is the capital of France?", "answer": "Paris" } - // "eval/messages-answer": The dataset contains a messages column with list of // messages and an answer column for evaluation. { "messages": [ {"role": "user", // "content": "Hello, my name is John Doe."}, {"role": "assistant", "content": // "Hello, John Doe. How can I help you today?"}, {"role": "user", "content": // "What's my name?"}, ], "answer": "John Doe" } // // Any of "post-training/messages", "eval/question-answer", "eval/messages-answer". Purpose DatasetRegisterParamsPurpose `json:"purpose,omitzero,required"` // The data source of the dataset. Ensure that the data source schema is compatible // with the purpose of the dataset. Examples: - { "type": "uri", "uri": // "https://mywebsite.com/mydata.jsonl" } - { "type": "uri", "uri": // "lsfs://mydata.jsonl" } - { "type": "uri", "uri": // "data:csv;base64,{base64_content}" } - { "type": "uri", "uri": // "huggingface://llamastack/simpleqa?split=train" } - { "type": "rows", "rows": [ // { "messages": [ {"role": "user", "content": "Hello, world!"}, {"role": // "assistant", "content": "Hello, world!"}, ] } ] } Source DatasetRegisterParamsSourceUnion `json:"source,omitzero,required"` // The ID of the dataset. If not provided, an ID will be generated. DatasetID param.Opt[string] `json:"dataset_id,omitzero"` // The metadata for the dataset. - E.g. {"description": "My dataset"}. Metadata map[string]DatasetRegisterParamsMetadataUnion `json:"metadata,omitzero"` // contains filtered or unexported fields }
func (DatasetRegisterParams) MarshalJSON ¶
func (r DatasetRegisterParams) MarshalJSON() (data []byte, err error)
func (*DatasetRegisterParams) UnmarshalJSON ¶
func (r *DatasetRegisterParams) UnmarshalJSON(data []byte) error
type DatasetRegisterParamsMetadataUnion ¶
type DatasetRegisterParamsMetadataUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (DatasetRegisterParamsMetadataUnion) MarshalJSON ¶
func (u DatasetRegisterParamsMetadataUnion) MarshalJSON() ([]byte, error)
func (*DatasetRegisterParamsMetadataUnion) UnmarshalJSON ¶
func (u *DatasetRegisterParamsMetadataUnion) UnmarshalJSON(data []byte) error
type DatasetRegisterParamsPurpose ¶
type DatasetRegisterParamsPurpose string
The purpose of the dataset. One of: - "post-training/messages": The dataset contains a messages column with list of messages for post-training. { "messages": [ {"role": "user", "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}, ] } - "eval/question-answer": The dataset contains a question column and an answer column for evaluation. { "question": "What is the capital of France?", "answer": "Paris" } - "eval/messages-answer": The dataset contains a messages column with list of messages and an answer column for evaluation. { "messages": [ {"role": "user", "content": "Hello, my name is John Doe."}, {"role": "assistant", "content": "Hello, John Doe. How can I help you today?"}, {"role": "user", "content": "What's my name?"}, ], "answer": "John Doe" }
const ( DatasetRegisterParamsPurposePostTrainingMessages DatasetRegisterParamsPurpose = "post-training/messages" DatasetRegisterParamsPurposeEvalQuestionAnswer DatasetRegisterParamsPurpose = "eval/question-answer" DatasetRegisterParamsPurposeEvalMessagesAnswer DatasetRegisterParamsPurpose = "eval/messages-answer" )
type DatasetRegisterParamsSourceRows ¶
type DatasetRegisterParamsSourceRows struct { // The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", // "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]} // ] Rows []map[string]DatasetRegisterParamsSourceRowsRowUnion `json:"rows,omitzero,required"` // This field can be elided, and will marshal its zero value as "rows". Type constant.Rows `json:"type,required"` // contains filtered or unexported fields }
A dataset stored in rows.
The properties Rows, Type are required.
func (DatasetRegisterParamsSourceRows) MarshalJSON ¶
func (r DatasetRegisterParamsSourceRows) MarshalJSON() (data []byte, err error)
func (*DatasetRegisterParamsSourceRows) UnmarshalJSON ¶
func (r *DatasetRegisterParamsSourceRows) UnmarshalJSON(data []byte) error
type DatasetRegisterParamsSourceRowsRowUnion ¶
type DatasetRegisterParamsSourceRowsRowUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (DatasetRegisterParamsSourceRowsRowUnion) MarshalJSON ¶
func (u DatasetRegisterParamsSourceRowsRowUnion) MarshalJSON() ([]byte, error)
func (*DatasetRegisterParamsSourceRowsRowUnion) UnmarshalJSON ¶
func (u *DatasetRegisterParamsSourceRowsRowUnion) UnmarshalJSON(data []byte) error
type DatasetRegisterParamsSourceUnion ¶
type DatasetRegisterParamsSourceUnion struct { OfUri *DatasetRegisterParamsSourceUri `json:",omitzero,inline"` OfRows *DatasetRegisterParamsSourceRows `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (DatasetRegisterParamsSourceUnion) GetRows ¶
func (u DatasetRegisterParamsSourceUnion) GetRows() []map[string]DatasetRegisterParamsSourceRowsRowUnion
Returns a pointer to the underlying variant's property, if present.
func (DatasetRegisterParamsSourceUnion) GetType ¶
func (u DatasetRegisterParamsSourceUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (DatasetRegisterParamsSourceUnion) GetUri ¶
func (u DatasetRegisterParamsSourceUnion) GetUri() *string
Returns a pointer to the underlying variant's property, if present.
func (DatasetRegisterParamsSourceUnion) MarshalJSON ¶
func (u DatasetRegisterParamsSourceUnion) MarshalJSON() ([]byte, error)
func (*DatasetRegisterParamsSourceUnion) UnmarshalJSON ¶
func (u *DatasetRegisterParamsSourceUnion) UnmarshalJSON(data []byte) error
type DatasetRegisterParamsSourceUri ¶
type DatasetRegisterParamsSourceUri struct { // The dataset can be obtained from a URI. E.g. - // "https://mywebsite.com/mydata.jsonl" - "lsfs://mydata.jsonl" - // "data:csv;base64,{base64_content}" Uri string `json:"uri,required"` // This field can be elided, and will marshal its zero value as "uri". Type constant.Uri `json:"type,required"` // contains filtered or unexported fields }
A dataset that can be obtained from a URI.
The properties Type, Uri are required.
func (DatasetRegisterParamsSourceUri) MarshalJSON ¶
func (r DatasetRegisterParamsSourceUri) MarshalJSON() (data []byte, err error)
func (*DatasetRegisterParamsSourceUri) UnmarshalJSON ¶
func (r *DatasetRegisterParamsSourceUri) UnmarshalJSON(data []byte) error
type DatasetRegisterResponse ¶
type DatasetRegisterResponse struct { Identifier string `json:"identifier,required"` // Additional metadata for the dataset Metadata map[string]DatasetRegisterResponseMetadataUnion `json:"metadata,required"` ProviderID string `json:"provider_id,required"` // Purpose of the dataset indicating its intended use // // Any of "post-training/messages", "eval/question-answer", "eval/messages-answer". Purpose DatasetRegisterResponsePurpose `json:"purpose,required"` // Data source configuration for the dataset Source DatasetRegisterResponseSourceUnion `json:"source,required"` // Type of resource, always 'dataset' for datasets Type constant.Dataset `json:"type,required"` ProviderResourceID string `json:"provider_resource_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Identifier respjson.Field Metadata respjson.Field ProviderID respjson.Field Purpose respjson.Field Source respjson.Field Type respjson.Field ProviderResourceID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Dataset resource for storing and accessing training or evaluation data.
func (DatasetRegisterResponse) RawJSON ¶
func (r DatasetRegisterResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetRegisterResponse) UnmarshalJSON ¶
func (r *DatasetRegisterResponse) UnmarshalJSON(data []byte) error
type DatasetRegisterResponseMetadataUnion ¶
type DatasetRegisterResponseMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
DatasetRegisterResponseMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (DatasetRegisterResponseMetadataUnion) AsAnyArray ¶
func (u DatasetRegisterResponseMetadataUnion) AsAnyArray() (v []any)
func (DatasetRegisterResponseMetadataUnion) AsBool ¶
func (u DatasetRegisterResponseMetadataUnion) AsBool() (v bool)
func (DatasetRegisterResponseMetadataUnion) AsFloat ¶
func (u DatasetRegisterResponseMetadataUnion) AsFloat() (v float64)
func (DatasetRegisterResponseMetadataUnion) AsString ¶
func (u DatasetRegisterResponseMetadataUnion) AsString() (v string)
func (DatasetRegisterResponseMetadataUnion) RawJSON ¶
func (u DatasetRegisterResponseMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetRegisterResponseMetadataUnion) UnmarshalJSON ¶
func (r *DatasetRegisterResponseMetadataUnion) UnmarshalJSON(data []byte) error
type DatasetRegisterResponsePurpose ¶
type DatasetRegisterResponsePurpose string
Purpose of the dataset indicating its intended use
const ( DatasetRegisterResponsePurposePostTrainingMessages DatasetRegisterResponsePurpose = "post-training/messages" DatasetRegisterResponsePurposeEvalQuestionAnswer DatasetRegisterResponsePurpose = "eval/question-answer" DatasetRegisterResponsePurposeEvalMessagesAnswer DatasetRegisterResponsePurpose = "eval/messages-answer" )
type DatasetRegisterResponseSourceRows ¶
type DatasetRegisterResponseSourceRows struct { // The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", // "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]} // ] Rows []map[string]DatasetRegisterResponseSourceRowsRowUnion `json:"rows,required"` Type constant.Rows `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Rows respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A dataset stored in rows.
func (DatasetRegisterResponseSourceRows) RawJSON ¶
func (r DatasetRegisterResponseSourceRows) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetRegisterResponseSourceRows) UnmarshalJSON ¶
func (r *DatasetRegisterResponseSourceRows) UnmarshalJSON(data []byte) error
type DatasetRegisterResponseSourceRowsRowUnion ¶
type DatasetRegisterResponseSourceRowsRowUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
DatasetRegisterResponseSourceRowsRowUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (DatasetRegisterResponseSourceRowsRowUnion) AsAnyArray ¶
func (u DatasetRegisterResponseSourceRowsRowUnion) AsAnyArray() (v []any)
func (DatasetRegisterResponseSourceRowsRowUnion) AsBool ¶
func (u DatasetRegisterResponseSourceRowsRowUnion) AsBool() (v bool)
func (DatasetRegisterResponseSourceRowsRowUnion) AsFloat ¶
func (u DatasetRegisterResponseSourceRowsRowUnion) AsFloat() (v float64)
func (DatasetRegisterResponseSourceRowsRowUnion) AsString ¶
func (u DatasetRegisterResponseSourceRowsRowUnion) AsString() (v string)
func (DatasetRegisterResponseSourceRowsRowUnion) RawJSON ¶
func (u DatasetRegisterResponseSourceRowsRowUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetRegisterResponseSourceRowsRowUnion) UnmarshalJSON ¶
func (r *DatasetRegisterResponseSourceRowsRowUnion) UnmarshalJSON(data []byte) error
type DatasetRegisterResponseSourceUnion ¶
type DatasetRegisterResponseSourceUnion struct { // Any of "uri", "rows". Type string `json:"type"` // This field is from variant [DatasetRegisterResponseSourceUri]. Uri string `json:"uri"` // This field is from variant [DatasetRegisterResponseSourceRows]. Rows []map[string]DatasetRegisterResponseSourceRowsRowUnion `json:"rows"` JSON struct { Type respjson.Field Uri respjson.Field Rows respjson.Field // contains filtered or unexported fields } `json:"-"` }
DatasetRegisterResponseSourceUnion contains all possible properties and values from DatasetRegisterResponseSourceUri, DatasetRegisterResponseSourceRows.
Use the DatasetRegisterResponseSourceUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (DatasetRegisterResponseSourceUnion) AsAny ¶
func (u DatasetRegisterResponseSourceUnion) AsAny() anyDatasetRegisterResponseSource
Use the following switch statement to find the correct variant
switch variant := DatasetRegisterResponseSourceUnion.AsAny().(type) { case llamastackclient.DatasetRegisterResponseSourceUri: case llamastackclient.DatasetRegisterResponseSourceRows: default: fmt.Errorf("no variant present") }
func (DatasetRegisterResponseSourceUnion) AsRows ¶
func (u DatasetRegisterResponseSourceUnion) AsRows() (v DatasetRegisterResponseSourceRows)
func (DatasetRegisterResponseSourceUnion) AsUri ¶
func (u DatasetRegisterResponseSourceUnion) AsUri() (v DatasetRegisterResponseSourceUri)
func (DatasetRegisterResponseSourceUnion) RawJSON ¶
func (u DatasetRegisterResponseSourceUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetRegisterResponseSourceUnion) UnmarshalJSON ¶
func (r *DatasetRegisterResponseSourceUnion) UnmarshalJSON(data []byte) error
type DatasetRegisterResponseSourceUri ¶
type DatasetRegisterResponseSourceUri struct { Type constant.Uri `json:"type,required"` // The dataset can be obtained from a URI. E.g. - // "https://mywebsite.com/mydata.jsonl" - "lsfs://mydata.jsonl" - // "data:csv;base64,{base64_content}" Uri string `json:"uri,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Type respjson.Field Uri respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A dataset that can be obtained from a URI.
func (DatasetRegisterResponseSourceUri) RawJSON ¶
func (r DatasetRegisterResponseSourceUri) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatasetRegisterResponseSourceUri) UnmarshalJSON ¶
func (r *DatasetRegisterResponseSourceUri) UnmarshalJSON(data []byte) error
type DatasetService ¶
type DatasetService struct {
Options []option.RequestOption
}
DatasetService contains methods and other services that help with interacting with the llama-stack-client 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 NewDatasetService method instead.
func NewDatasetService ¶
func NewDatasetService(opts ...option.RequestOption) (r DatasetService)
NewDatasetService 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 (*DatasetService) Appendrows ¶
func (r *DatasetService) Appendrows(ctx context.Context, datasetID string, body DatasetAppendrowsParams, opts ...option.RequestOption) (err error)
Append rows to a dataset.
func (*DatasetService) Get ¶
func (r *DatasetService) Get(ctx context.Context, datasetID string, opts ...option.RequestOption) (res *DatasetGetResponse, err error)
Get a dataset by its ID.
func (*DatasetService) Iterrows ¶
func (r *DatasetService) Iterrows(ctx context.Context, datasetID string, query DatasetIterrowsParams, opts ...option.RequestOption) (res *DatasetIterrowsResponse, err error)
Get a paginated list of rows from a dataset. Uses offset-based pagination where:
- start_index: The starting index (0-based). If None, starts from beginning. - limit: Number of items to return. If None or -1, returns all items.
The response includes:
- data: List of items for the current page. - has_more: Whether there are more items available after this set.
func (*DatasetService) List ¶
func (r *DatasetService) List(ctx context.Context, opts ...option.RequestOption) (res *[]ListDatasetsResponseData, err error)
List all datasets.
func (*DatasetService) Register ¶
func (r *DatasetService) Register(ctx context.Context, body DatasetRegisterParams, opts ...option.RequestOption) (res *DatasetRegisterResponse, err error)
Register a new dataset.
func (*DatasetService) Unregister ¶
func (r *DatasetService) Unregister(ctx context.Context, datasetID string, opts ...option.RequestOption) (err error)
Unregister a dataset by its ID.
type DeleteFileResponse ¶
type DeleteFileResponse struct { // The file identifier that was deleted ID string `json:"id,required"` // Whether the file was successfully deleted Deleted bool `json:"deleted,required"` // The object type, which is always "file" Object constant.File `json:"object,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Deleted respjson.Field Object respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response for deleting a file in OpenAI Files API.
func (DeleteFileResponse) RawJSON ¶
func (r DeleteFileResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*DeleteFileResponse) UnmarshalJSON ¶
func (r *DeleteFileResponse) UnmarshalJSON(data []byte) error
type DocumentContentImageContentItemImageParam ¶
type DocumentContentImageContentItemImageParam = shared.DocumentContentImageContentItemImageParam
Image as a base64 encoded string or an URL
This is an alias to an internal type.
type DocumentContentImageContentItemImageURLParam ¶
type DocumentContentImageContentItemImageURLParam = shared.DocumentContentImageContentItemImageURLParam
A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits.
This is an alias to an internal type.
type DocumentContentImageContentItemParam ¶
type DocumentContentImageContentItemParam = shared.DocumentContentImageContentItemParam
A image content item
This is an alias to an internal type.
type DocumentContentTextContentItemParam ¶
type DocumentContentTextContentItemParam = shared.DocumentContentTextContentItemParam
A text content item
This is an alias to an internal type.
type DocumentContentURLParam ¶
type DocumentContentURLParam = shared.DocumentContentURLParam
A URL reference to external content.
This is an alias to an internal type.
type DocumentContentUnionParam ¶
type DocumentContentUnionParam = shared.DocumentContentUnionParam
The content of the document.
This is an alias to an internal type.
type DocumentMetadataUnionParam ¶
type DocumentMetadataUnionParam = shared.DocumentMetadataUnionParam
This is an alias to an internal type.
type DocumentParam ¶
type DocumentParam = shared.DocumentParam
A document to be used for document ingestion in the RAG Tool.
This is an alias to an internal type.
type EmbeddingNewParams ¶
type EmbeddingNewParams struct { // Input text to embed, encoded as a string or array of strings. To embed multiple // inputs in a single request, pass an array of strings. Input EmbeddingNewParamsInputUnion `json:"input,omitzero,required"` // The identifier of the model to use. The model must be an embedding model // registered with Llama Stack and available via the /models endpoint. Model string `json:"model,required"` // (Optional) The number of dimensions the resulting output embeddings should have. // Only supported in text-embedding-3 and later models. Dimensions param.Opt[int64] `json:"dimensions,omitzero"` // (Optional) The format to return the embeddings in. Can be either "float" or // "base64". Defaults to "float". EncodingFormat param.Opt[string] `json:"encoding_format,omitzero"` // (Optional) A unique identifier representing your end-user, which can help OpenAI // to monitor and detect abuse. User param.Opt[string] `json:"user,omitzero"` // contains filtered or unexported fields }
func (EmbeddingNewParams) MarshalJSON ¶
func (r EmbeddingNewParams) MarshalJSON() (data []byte, err error)
func (*EmbeddingNewParams) UnmarshalJSON ¶
func (r *EmbeddingNewParams) UnmarshalJSON(data []byte) error
type EmbeddingNewParamsInputUnion ¶
type EmbeddingNewParamsInputUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfStringArray []string `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (EmbeddingNewParamsInputUnion) MarshalJSON ¶
func (u EmbeddingNewParamsInputUnion) MarshalJSON() ([]byte, error)
func (*EmbeddingNewParamsInputUnion) UnmarshalJSON ¶
func (u *EmbeddingNewParamsInputUnion) UnmarshalJSON(data []byte) error
type EmbeddingService ¶
type EmbeddingService struct {
Options []option.RequestOption
}
EmbeddingService contains methods and other services that help with interacting with the llama-stack-client 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 *CreateEmbeddingsResponse, err error)
Generate OpenAI-compatible embeddings for the given input using the specified model.
type EmbeddingsResponse ¶
type EmbeddingsResponse struct { // List of embedding vectors, one per input content. Each embedding is a list of // floats. The dimensionality of the embedding is model-specific; you can check // model metadata using /models/{model_id} Embeddings [][]float64 `json:"embeddings,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Embeddings respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response containing generated embeddings.
func (EmbeddingsResponse) RawJSON ¶
func (r EmbeddingsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmbeddingsResponse) UnmarshalJSON ¶
func (r *EmbeddingsResponse) UnmarshalJSON(data []byte) error
type EvalCandidateAgentParam ¶
type EvalCandidateAgentParam struct { // The configuration for the agent candidate. Config shared.AgentConfigParam `json:"config,omitzero,required"` // This field can be elided, and will marshal its zero value as "agent". Type constant.Agent `json:"type,required"` // contains filtered or unexported fields }
An agent candidate for evaluation.
The properties Config, Type are required.
func (EvalCandidateAgentParam) MarshalJSON ¶
func (r EvalCandidateAgentParam) MarshalJSON() (data []byte, err error)
func (*EvalCandidateAgentParam) UnmarshalJSON ¶
func (r *EvalCandidateAgentParam) UnmarshalJSON(data []byte) error
type EvalCandidateModelParam ¶
type EvalCandidateModelParam struct { // The model ID to evaluate. Model string `json:"model,required"` // The sampling parameters for the model. SamplingParams shared.SamplingParams `json:"sampling_params,omitzero,required"` // (Optional) The system message providing instructions or context to the model. SystemMessage shared.SystemMessageParam `json:"system_message,omitzero"` // This field can be elided, and will marshal its zero value as "model". Type constant.Model `json:"type,required"` // contains filtered or unexported fields }
A model candidate for evaluation.
The properties Model, SamplingParams, Type are required.
func (EvalCandidateModelParam) MarshalJSON ¶
func (r EvalCandidateModelParam) MarshalJSON() (data []byte, err error)
func (*EvalCandidateModelParam) UnmarshalJSON ¶
func (r *EvalCandidateModelParam) UnmarshalJSON(data []byte) error
type EvalCandidateUnionParam ¶
type EvalCandidateUnionParam struct { OfModel *EvalCandidateModelParam `json:",omitzero,inline"` OfAgent *EvalCandidateAgentParam `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func EvalCandidateParamOfAgent ¶
func EvalCandidateParamOfAgent(config shared.AgentConfigParam) EvalCandidateUnionParam
func EvalCandidateParamOfModel ¶
func EvalCandidateParamOfModel(model string, samplingParams shared.SamplingParams) EvalCandidateUnionParam
func (EvalCandidateUnionParam) GetConfig ¶
func (u EvalCandidateUnionParam) GetConfig() *shared.AgentConfigParam
Returns a pointer to the underlying variant's property, if present.
func (EvalCandidateUnionParam) GetModel ¶
func (u EvalCandidateUnionParam) GetModel() *string
Returns a pointer to the underlying variant's property, if present.
func (EvalCandidateUnionParam) GetSamplingParams ¶
func (u EvalCandidateUnionParam) GetSamplingParams() *shared.SamplingParams
Returns a pointer to the underlying variant's property, if present.
func (EvalCandidateUnionParam) GetSystemMessage ¶
func (u EvalCandidateUnionParam) GetSystemMessage() *shared.SystemMessageParam
Returns a pointer to the underlying variant's property, if present.
func (EvalCandidateUnionParam) GetType ¶
func (u EvalCandidateUnionParam) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (EvalCandidateUnionParam) MarshalJSON ¶
func (u EvalCandidateUnionParam) MarshalJSON() ([]byte, error)
func (*EvalCandidateUnionParam) UnmarshalJSON ¶
func (u *EvalCandidateUnionParam) UnmarshalJSON(data []byte) error
type EvalEvaluateRowsAlphaParams ¶
type EvalEvaluateRowsAlphaParams struct { // The configuration for the benchmark. BenchmarkConfig BenchmarkConfigParam `json:"benchmark_config,omitzero,required"` // The rows to evaluate. InputRows []map[string]EvalEvaluateRowsAlphaParamsInputRowUnion `json:"input_rows,omitzero,required"` // The scoring functions to use for the evaluation. ScoringFunctions []string `json:"scoring_functions,omitzero,required"` // contains filtered or unexported fields }
func (EvalEvaluateRowsAlphaParams) MarshalJSON ¶
func (r EvalEvaluateRowsAlphaParams) MarshalJSON() (data []byte, err error)
func (*EvalEvaluateRowsAlphaParams) UnmarshalJSON ¶
func (r *EvalEvaluateRowsAlphaParams) UnmarshalJSON(data []byte) error
type EvalEvaluateRowsAlphaParamsInputRowUnion ¶
type EvalEvaluateRowsAlphaParamsInputRowUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (EvalEvaluateRowsAlphaParamsInputRowUnion) MarshalJSON ¶
func (u EvalEvaluateRowsAlphaParamsInputRowUnion) MarshalJSON() ([]byte, error)
func (*EvalEvaluateRowsAlphaParamsInputRowUnion) UnmarshalJSON ¶
func (u *EvalEvaluateRowsAlphaParamsInputRowUnion) UnmarshalJSON(data []byte) error
type EvalEvaluateRowsParams ¶
type EvalEvaluateRowsParams struct { // The configuration for the benchmark. BenchmarkConfig BenchmarkConfigParam `json:"benchmark_config,omitzero,required"` // The rows to evaluate. InputRows []map[string]EvalEvaluateRowsParamsInputRowUnion `json:"input_rows,omitzero,required"` // The scoring functions to use for the evaluation. ScoringFunctions []string `json:"scoring_functions,omitzero,required"` // contains filtered or unexported fields }
func (EvalEvaluateRowsParams) MarshalJSON ¶
func (r EvalEvaluateRowsParams) MarshalJSON() (data []byte, err error)
func (*EvalEvaluateRowsParams) UnmarshalJSON ¶
func (r *EvalEvaluateRowsParams) UnmarshalJSON(data []byte) error
type EvalEvaluateRowsParamsInputRowUnion ¶
type EvalEvaluateRowsParamsInputRowUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (EvalEvaluateRowsParamsInputRowUnion) MarshalJSON ¶
func (u EvalEvaluateRowsParamsInputRowUnion) MarshalJSON() ([]byte, error)
func (*EvalEvaluateRowsParamsInputRowUnion) UnmarshalJSON ¶
func (u *EvalEvaluateRowsParamsInputRowUnion) UnmarshalJSON(data []byte) error
type EvalJobCancelParams ¶
type EvalJobCancelParams struct { BenchmarkID string `path:"benchmark_id,required" json:"-"` // contains filtered or unexported fields }
type EvalJobGetParams ¶
type EvalJobGetParams struct { BenchmarkID string `path:"benchmark_id,required" json:"-"` // contains filtered or unexported fields }
type EvalJobService ¶
type EvalJobService struct {
Options []option.RequestOption
}
EvalJobService contains methods and other services that help with interacting with the llama-stack-client 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 NewEvalJobService method instead.
func NewEvalJobService ¶
func NewEvalJobService(opts ...option.RequestOption) (r EvalJobService)
NewEvalJobService 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 (*EvalJobService) Cancel ¶
func (r *EvalJobService) Cancel(ctx context.Context, jobID string, body EvalJobCancelParams, opts ...option.RequestOption) (err error)
Cancel a job.
func (*EvalJobService) Get ¶
func (r *EvalJobService) Get(ctx context.Context, jobID string, query EvalJobGetParams, opts ...option.RequestOption) (res *EvaluateResponse, err error)
Get the result of a job.
func (*EvalJobService) Status ¶
func (r *EvalJobService) Status(ctx context.Context, jobID string, query EvalJobStatusParams, opts ...option.RequestOption) (res *Job, err error)
Get the status of a job.
type EvalJobStatusParams ¶
type EvalJobStatusParams struct { BenchmarkID string `path:"benchmark_id,required" json:"-"` // contains filtered or unexported fields }
type EvalRunEvalAlphaParams ¶
type EvalRunEvalAlphaParams struct { // The configuration for the benchmark. BenchmarkConfig BenchmarkConfigParam `json:"benchmark_config,omitzero,required"` // contains filtered or unexported fields }
func (EvalRunEvalAlphaParams) MarshalJSON ¶
func (r EvalRunEvalAlphaParams) MarshalJSON() (data []byte, err error)
func (*EvalRunEvalAlphaParams) UnmarshalJSON ¶
func (r *EvalRunEvalAlphaParams) UnmarshalJSON(data []byte) error
type EvalRunEvalParams ¶
type EvalRunEvalParams struct { // The configuration for the benchmark. BenchmarkConfig BenchmarkConfigParam `json:"benchmark_config,omitzero,required"` // contains filtered or unexported fields }
func (EvalRunEvalParams) MarshalJSON ¶
func (r EvalRunEvalParams) MarshalJSON() (data []byte, err error)
func (*EvalRunEvalParams) UnmarshalJSON ¶
func (r *EvalRunEvalParams) UnmarshalJSON(data []byte) error
type EvalService ¶
type EvalService struct { Options []option.RequestOption Jobs EvalJobService }
EvalService contains methods and other services that help with interacting with the llama-stack-client 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 NewEvalService method instead.
func NewEvalService ¶
func NewEvalService(opts ...option.RequestOption) (r EvalService)
NewEvalService 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 (*EvalService) EvaluateRows ¶
func (r *EvalService) EvaluateRows(ctx context.Context, benchmarkID string, body EvalEvaluateRowsParams, opts ...option.RequestOption) (res *EvaluateResponse, err error)
Evaluate a list of rows on a benchmark.
func (*EvalService) EvaluateRowsAlpha ¶
func (r *EvalService) EvaluateRowsAlpha(ctx context.Context, benchmarkID string, body EvalEvaluateRowsAlphaParams, opts ...option.RequestOption) (res *EvaluateResponse, err error)
Evaluate a list of rows on a benchmark.
func (*EvalService) RunEval ¶
func (r *EvalService) RunEval(ctx context.Context, benchmarkID string, body EvalRunEvalParams, opts ...option.RequestOption) (res *Job, err error)
Run an evaluation on a benchmark.
func (*EvalService) RunEvalAlpha ¶
func (r *EvalService) RunEvalAlpha(ctx context.Context, benchmarkID string, body EvalRunEvalAlphaParams, opts ...option.RequestOption) (res *Job, err error)
Run an evaluation on a benchmark.
type EvaluateResponse ¶
type EvaluateResponse struct { // The generations from the evaluation. Generations []map[string]EvaluateResponseGenerationUnion `json:"generations,required"` // The scores from the evaluation. Scores map[string]shared.ScoringResult `json:"scores,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Generations respjson.Field Scores respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The response from an evaluation.
func (EvaluateResponse) RawJSON ¶
func (r EvaluateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EvaluateResponse) UnmarshalJSON ¶
func (r *EvaluateResponse) UnmarshalJSON(data []byte) error
type EvaluateResponseGenerationUnion ¶
type EvaluateResponseGenerationUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
EvaluateResponseGenerationUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (EvaluateResponseGenerationUnion) AsAnyArray ¶
func (u EvaluateResponseGenerationUnion) AsAnyArray() (v []any)
func (EvaluateResponseGenerationUnion) AsBool ¶
func (u EvaluateResponseGenerationUnion) AsBool() (v bool)
func (EvaluateResponseGenerationUnion) AsFloat ¶
func (u EvaluateResponseGenerationUnion) AsFloat() (v float64)
func (EvaluateResponseGenerationUnion) AsString ¶
func (u EvaluateResponseGenerationUnion) AsString() (v string)
func (EvaluateResponseGenerationUnion) RawJSON ¶
func (u EvaluateResponseGenerationUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*EvaluateResponseGenerationUnion) UnmarshalJSON ¶
func (r *EvaluateResponseGenerationUnion) UnmarshalJSON(data []byte) error
type EventMetricAttributeUnionParam ¶
type EventMetricAttributeUnionParam struct { OfString param.Opt[string] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfBool param.Opt[bool] `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (EventMetricAttributeUnionParam) MarshalJSON ¶
func (u EventMetricAttributeUnionParam) MarshalJSON() ([]byte, error)
func (*EventMetricAttributeUnionParam) UnmarshalJSON ¶
func (u *EventMetricAttributeUnionParam) UnmarshalJSON(data []byte) error
type EventMetricParam ¶
type EventMetricParam struct { // The name of the metric being measured Metric string `json:"metric,required"` // Unique identifier for the span this event belongs to SpanID string `json:"span_id,required"` // Timestamp when the event occurred Timestamp time.Time `json:"timestamp,required" format:"date-time"` // Unique identifier for the trace this event belongs to TraceID string `json:"trace_id,required"` // The unit of measurement for the metric value Unit string `json:"unit,required"` // The numeric value of the metric measurement Value float64 `json:"value,required"` // (Optional) Key-value pairs containing additional metadata about the event Attributes map[string]EventMetricAttributeUnionParam `json:"attributes,omitzero"` // Event type identifier set to METRIC // // This field can be elided, and will marshal its zero value as "metric". Type constant.Metric `json:"type,required"` // contains filtered or unexported fields }
A metric event containing a measured value.
The properties Metric, SpanID, Timestamp, TraceID, Type, Unit, Value are required.
func (EventMetricParam) MarshalJSON ¶
func (r EventMetricParam) MarshalJSON() (data []byte, err error)
func (*EventMetricParam) UnmarshalJSON ¶
func (r *EventMetricParam) UnmarshalJSON(data []byte) error
type EventStructuredLogAttributeUnionParam ¶
type EventStructuredLogAttributeUnionParam struct { OfString param.Opt[string] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfBool param.Opt[bool] `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (EventStructuredLogAttributeUnionParam) MarshalJSON ¶
func (u EventStructuredLogAttributeUnionParam) MarshalJSON() ([]byte, error)
func (*EventStructuredLogAttributeUnionParam) UnmarshalJSON ¶
func (u *EventStructuredLogAttributeUnionParam) UnmarshalJSON(data []byte) error
type EventStructuredLogParam ¶
type EventStructuredLogParam struct { // The structured payload data for the log event Payload EventStructuredLogPayloadUnionParam `json:"payload,omitzero,required"` // Unique identifier for the span this event belongs to SpanID string `json:"span_id,required"` // Timestamp when the event occurred Timestamp time.Time `json:"timestamp,required" format:"date-time"` // Unique identifier for the trace this event belongs to TraceID string `json:"trace_id,required"` // (Optional) Key-value pairs containing additional metadata about the event Attributes map[string]EventStructuredLogAttributeUnionParam `json:"attributes,omitzero"` // Event type identifier set to STRUCTURED_LOG // // This field can be elided, and will marshal its zero value as "structured_log". Type constant.StructuredLog `json:"type,required"` // contains filtered or unexported fields }
A structured log event containing typed payload data.
The properties Payload, SpanID, Timestamp, TraceID, Type are required.
func (EventStructuredLogParam) MarshalJSON ¶
func (r EventStructuredLogParam) MarshalJSON() (data []byte, err error)
func (*EventStructuredLogParam) UnmarshalJSON ¶
func (r *EventStructuredLogParam) UnmarshalJSON(data []byte) error
type EventStructuredLogPayloadSpanEndParam ¶
type EventStructuredLogPayloadSpanEndParam struct { // The final status of the span indicating success or failure // // Any of "ok", "error". Status string `json:"status,omitzero,required"` // Payload type identifier set to SPAN_END // // This field can be elided, and will marshal its zero value as "span_end". Type constant.SpanEnd `json:"type,required"` // contains filtered or unexported fields }
Payload for a span end event.
The properties Status, Type are required.
func (EventStructuredLogPayloadSpanEndParam) MarshalJSON ¶
func (r EventStructuredLogPayloadSpanEndParam) MarshalJSON() (data []byte, err error)
func (*EventStructuredLogPayloadSpanEndParam) UnmarshalJSON ¶
func (r *EventStructuredLogPayloadSpanEndParam) UnmarshalJSON(data []byte) error
type EventStructuredLogPayloadSpanStartParam ¶
type EventStructuredLogPayloadSpanStartParam struct { // Human-readable name describing the operation this span represents Name string `json:"name,required"` // (Optional) Unique identifier for the parent span, if this is a child span ParentSpanID param.Opt[string] `json:"parent_span_id,omitzero"` // Payload type identifier set to SPAN_START // // This field can be elided, and will marshal its zero value as "span_start". Type constant.SpanStart `json:"type,required"` // contains filtered or unexported fields }
Payload for a span start event.
The properties Name, Type are required.
func (EventStructuredLogPayloadSpanStartParam) MarshalJSON ¶
func (r EventStructuredLogPayloadSpanStartParam) MarshalJSON() (data []byte, err error)
func (*EventStructuredLogPayloadSpanStartParam) UnmarshalJSON ¶
func (r *EventStructuredLogPayloadSpanStartParam) UnmarshalJSON(data []byte) error
type EventStructuredLogPayloadUnionParam ¶
type EventStructuredLogPayloadUnionParam struct { OfSpanStart *EventStructuredLogPayloadSpanStartParam `json:",omitzero,inline"` OfSpanEnd *EventStructuredLogPayloadSpanEndParam `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (EventStructuredLogPayloadUnionParam) GetName ¶
func (u EventStructuredLogPayloadUnionParam) GetName() *string
Returns a pointer to the underlying variant's property, if present.
func (EventStructuredLogPayloadUnionParam) GetParentSpanID ¶
func (u EventStructuredLogPayloadUnionParam) GetParentSpanID() *string
Returns a pointer to the underlying variant's property, if present.
func (EventStructuredLogPayloadUnionParam) GetStatus ¶
func (u EventStructuredLogPayloadUnionParam) GetStatus() *string
Returns a pointer to the underlying variant's property, if present.
func (EventStructuredLogPayloadUnionParam) GetType ¶
func (u EventStructuredLogPayloadUnionParam) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (EventStructuredLogPayloadUnionParam) MarshalJSON ¶
func (u EventStructuredLogPayloadUnionParam) MarshalJSON() ([]byte, error)
func (*EventStructuredLogPayloadUnionParam) UnmarshalJSON ¶
func (u *EventStructuredLogPayloadUnionParam) UnmarshalJSON(data []byte) error
type EventUnionParam ¶
type EventUnionParam struct { OfUnstructuredLog *EventUnstructuredLogParam `json:",omitzero,inline"` OfMetric *EventMetricParam `json:",omitzero,inline"` OfStructuredLog *EventStructuredLogParam `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (EventUnionParam) GetAttributes ¶
func (u EventUnionParam) GetAttributes() (res eventUnionParamAttributes)
Returns a subunion which exports methods to access subproperties
Or use AsAny() to get the underlying value
func (EventUnionParam) GetMessage ¶
func (u EventUnionParam) GetMessage() *string
Returns a pointer to the underlying variant's property, if present.
func (EventUnionParam) GetMetric ¶
func (u EventUnionParam) GetMetric() *string
Returns a pointer to the underlying variant's property, if present.
func (EventUnionParam) GetPayload ¶
func (u EventUnionParam) GetPayload() *EventStructuredLogPayloadUnionParam
Returns a pointer to the underlying variant's property, if present.
func (EventUnionParam) GetSeverity ¶
func (u EventUnionParam) GetSeverity() *string
Returns a pointer to the underlying variant's property, if present.
func (EventUnionParam) GetSpanID ¶
func (u EventUnionParam) GetSpanID() *string
Returns a pointer to the underlying variant's property, if present.
func (EventUnionParam) GetTimestamp ¶
func (u EventUnionParam) GetTimestamp() *time.Time
Returns a pointer to the underlying variant's Timestamp property, if present.
func (EventUnionParam) GetTraceID ¶
func (u EventUnionParam) GetTraceID() *string
Returns a pointer to the underlying variant's property, if present.
func (EventUnionParam) GetType ¶
func (u EventUnionParam) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (EventUnionParam) GetUnit ¶
func (u EventUnionParam) GetUnit() *string
Returns a pointer to the underlying variant's property, if present.
func (EventUnionParam) GetValue ¶
func (u EventUnionParam) GetValue() *float64
Returns a pointer to the underlying variant's property, if present.
func (EventUnionParam) MarshalJSON ¶
func (u EventUnionParam) MarshalJSON() ([]byte, error)
func (*EventUnionParam) UnmarshalJSON ¶
func (u *EventUnionParam) UnmarshalJSON(data []byte) error
type EventUnstructuredLogAttributeUnionParam ¶
type EventUnstructuredLogAttributeUnionParam struct { OfString param.Opt[string] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfBool param.Opt[bool] `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (EventUnstructuredLogAttributeUnionParam) MarshalJSON ¶
func (u EventUnstructuredLogAttributeUnionParam) MarshalJSON() ([]byte, error)
func (*EventUnstructuredLogAttributeUnionParam) UnmarshalJSON ¶
func (u *EventUnstructuredLogAttributeUnionParam) UnmarshalJSON(data []byte) error
type EventUnstructuredLogParam ¶
type EventUnstructuredLogParam struct { // The log message text Message string `json:"message,required"` // The severity level of the log message // // Any of "verbose", "debug", "info", "warn", "error", "critical". Severity string `json:"severity,omitzero,required"` // Unique identifier for the span this event belongs to SpanID string `json:"span_id,required"` // Timestamp when the event occurred Timestamp time.Time `json:"timestamp,required" format:"date-time"` // Unique identifier for the trace this event belongs to TraceID string `json:"trace_id,required"` // (Optional) Key-value pairs containing additional metadata about the event Attributes map[string]EventUnstructuredLogAttributeUnionParam `json:"attributes,omitzero"` // Event type identifier set to UNSTRUCTURED_LOG // // This field can be elided, and will marshal its zero value as "unstructured_log". Type constant.UnstructuredLog `json:"type,required"` // contains filtered or unexported fields }
An unstructured log event containing a simple text message.
The properties Message, Severity, SpanID, Timestamp, TraceID, Type are required.
func (EventUnstructuredLogParam) MarshalJSON ¶
func (r EventUnstructuredLogParam) MarshalJSON() (data []byte, err error)
func (*EventUnstructuredLogParam) UnmarshalJSON ¶
func (r *EventUnstructuredLogParam) UnmarshalJSON(data []byte) error
type File ¶
type File struct { // The file identifier, which can be referenced in the API endpoints ID string `json:"id,required"` // The size of the file, in bytes Bytes int64 `json:"bytes,required"` // The Unix timestamp (in seconds) for when the file was created CreatedAt int64 `json:"created_at,required"` // The Unix timestamp (in seconds) for when the file expires ExpiresAt int64 `json:"expires_at,required"` // The name of the file Filename string `json:"filename,required"` // The object type, which is always "file" Object constant.File `json:"object,required"` // The intended purpose of the file // // Any of "assistants". Purpose FilePurpose `json:"purpose,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Bytes respjson.Field CreatedAt respjson.Field ExpiresAt respjson.Field Filename respjson.Field Object respjson.Field Purpose respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
OpenAI File object as defined in the OpenAI Files API.
func (*File) UnmarshalJSON ¶
type FileContentResponse ¶
type FileContentResponse = any
type FileListParams ¶
type FileListParams struct { // A cursor for use in pagination. `after` is an object ID that defines your place // in the list. For instance, if you make a list request and receive 100 objects, // ending with obj_foo, your subsequent call can include after=obj_foo in order to // fetch the next page of the list. After param.Opt[string] `query:"after,omitzero" json:"-"` // A limit on the number of objects to be returned. Limit can range between 1 and // 10,000, and the default is 10,000. Limit param.Opt[int64] `query:"limit,omitzero" json:"-"` // Sort order by the `created_at` timestamp of the objects. `asc` for ascending // order and `desc` for descending order. // // Any of "asc", "desc". Order FileListParamsOrder `query:"order,omitzero" json:"-"` // Only return files with the given purpose. // // Any of "assistants". Purpose FileListParamsPurpose `query:"purpose,omitzero" json:"-"` // contains filtered or unexported fields }
func (FileListParams) URLQuery ¶
func (r FileListParams) URLQuery() (v url.Values, err error)
URLQuery serializes FileListParams's query parameters as `url.Values`.
type FileListParamsOrder ¶
type FileListParamsOrder string
Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
const ( FileListParamsOrderAsc FileListParamsOrder = "asc" FileListParamsOrderDesc FileListParamsOrder = "desc" )
type FileListParamsPurpose ¶
type FileListParamsPurpose string
Only return files with the given purpose.
const (
FileListParamsPurposeAssistants FileListParamsPurpose = "assistants"
)
type FileNewParams ¶
type FileNewParams struct { File io.Reader `json:"file,omitzero,required" format:"binary"` // Valid purpose values for OpenAI Files API. // // Any of "assistants". Purpose FileNewParamsPurpose `json:"purpose,omitzero,required"` // contains filtered or unexported fields }
func (FileNewParams) MarshalMultipart ¶
func (r FileNewParams) MarshalMultipart() (data []byte, contentType string, err error)
type FileNewParamsPurpose ¶
type FileNewParamsPurpose string
Valid purpose values for OpenAI Files API.
const (
FileNewParamsPurposeAssistants FileNewParamsPurpose = "assistants"
)
type FilePurpose ¶
type FilePurpose string
The intended purpose of the file
const (
FilePurposeAssistants FilePurpose = "assistants"
)
type FileService ¶
type FileService struct {
Options []option.RequestOption
}
FileService contains methods and other services that help with interacting with the llama-stack-client 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) Content ¶
func (r *FileService) Content(ctx context.Context, fileID string, opts ...option.RequestOption) (res *FileContentResponse, err error)
Returns the contents of the specified file.
func (*FileService) Delete ¶
func (r *FileService) Delete(ctx context.Context, fileID string, opts ...option.RequestOption) (res *DeleteFileResponse, err error)
Delete a file.
func (*FileService) Get ¶
func (r *FileService) Get(ctx context.Context, fileID string, opts ...option.RequestOption) (res *File, err error)
Returns information about a specific file.
func (*FileService) List ¶
func (r *FileService) List(ctx context.Context, query FileListParams, opts ...option.RequestOption) (res *pagination.OpenAICursorPage[File], err error)
Returns a list of files that belong to the user's organization.
func (*FileService) ListAutoPaging ¶
func (r *FileService) ListAutoPaging(ctx context.Context, query FileListParams, opts ...option.RequestOption) *pagination.OpenAICursorPageAutoPager[File]
Returns a list of files that belong to the user's organization.
func (*FileService) New ¶
func (r *FileService) New(ctx context.Context, body FileNewParams, opts ...option.RequestOption) (res *File, err error)
Upload a file that can be used across various endpoints. The file upload should be a multipart form request with:
- file: The File object (not file name) to be uploaded. - purpose: The intended purpose of the uploaded file.
type HealthInfo ¶
type HealthInfo struct { // Current health status of the service // // Any of "OK", "Error", "Not Implemented". Status HealthInfoStatus `json:"status,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Health status information for the service.
func (HealthInfo) RawJSON ¶
func (r HealthInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*HealthInfo) UnmarshalJSON ¶
func (r *HealthInfo) UnmarshalJSON(data []byte) error
type HealthInfoStatus ¶
type HealthInfoStatus string
Current health status of the service
const ( HealthInfoStatusOk HealthInfoStatus = "OK" HealthInfoStatusError HealthInfoStatus = "Error" HealthInfoStatusNotImplemented HealthInfoStatus = "Not Implemented" )
type InferenceBatchChatCompletionParams ¶
type InferenceBatchChatCompletionParams struct { // The messages to generate completions for. MessagesBatch [][]shared.MessageUnionParam `json:"messages_batch,omitzero,required"` // The identifier of the model to use. The model must be registered with Llama // Stack and available via the /models endpoint. ModelID string `json:"model_id,required"` // (Optional) If specified, log probabilities for each token position will be // returned. Logprobs InferenceBatchChatCompletionParamsLogprobs `json:"logprobs,omitzero"` // (Optional) Grammar specification for guided (structured) decoding. ResponseFormat shared.ResponseFormatUnionParam `json:"response_format,omitzero"` // (Optional) Parameters to control the sampling strategy. SamplingParams shared.SamplingParams `json:"sampling_params,omitzero"` // (Optional) Configuration for tool use. ToolConfig InferenceBatchChatCompletionParamsToolConfig `json:"tool_config,omitzero"` // (Optional) List of tool definitions available to the model. Tools []InferenceBatchChatCompletionParamsTool `json:"tools,omitzero"` // contains filtered or unexported fields }
func (InferenceBatchChatCompletionParams) MarshalJSON ¶
func (r InferenceBatchChatCompletionParams) MarshalJSON() (data []byte, err error)
func (*InferenceBatchChatCompletionParams) UnmarshalJSON ¶
func (r *InferenceBatchChatCompletionParams) UnmarshalJSON(data []byte) error
type InferenceBatchChatCompletionParamsLogprobs ¶
type InferenceBatchChatCompletionParamsLogprobs struct { // How many tokens (for each position) to return log probabilities for. TopK param.Opt[int64] `json:"top_k,omitzero"` // contains filtered or unexported fields }
(Optional) If specified, log probabilities for each token position will be returned.
func (InferenceBatchChatCompletionParamsLogprobs) MarshalJSON ¶
func (r InferenceBatchChatCompletionParamsLogprobs) MarshalJSON() (data []byte, err error)
func (*InferenceBatchChatCompletionParamsLogprobs) UnmarshalJSON ¶
func (r *InferenceBatchChatCompletionParamsLogprobs) UnmarshalJSON(data []byte) error
type InferenceBatchChatCompletionParamsTool ¶
type InferenceBatchChatCompletionParamsTool struct { ToolName string `json:"tool_name,omitzero,required"` Description param.Opt[string] `json:"description,omitzero"` Parameters map[string]shared.ToolParamDefinition `json:"parameters,omitzero"` // contains filtered or unexported fields }
The property ToolName is required.
func (InferenceBatchChatCompletionParamsTool) MarshalJSON ¶
func (r InferenceBatchChatCompletionParamsTool) MarshalJSON() (data []byte, err error)
func (*InferenceBatchChatCompletionParamsTool) UnmarshalJSON ¶
func (r *InferenceBatchChatCompletionParamsTool) UnmarshalJSON(data []byte) error
type InferenceBatchChatCompletionParamsToolConfig ¶
type InferenceBatchChatCompletionParamsToolConfig struct { // (Optional) Config for how to override the default system prompt. - // `SystemMessageBehavior.append`: Appends the provided system message to the // default system prompt. - `SystemMessageBehavior.replace`: Replaces the default // system prompt with the provided system message. The system message can include // the string '{{function_definitions}}' to indicate where the function definitions // should be inserted. // // Any of "append", "replace". SystemMessageBehavior string `json:"system_message_behavior,omitzero"` // (Optional) Whether tool use is automatic, required, or none. Can also specify a // tool name to use a specific tool. Defaults to ToolChoice.auto. ToolChoice string `json:"tool_choice,omitzero"` // (Optional) Instructs the model how to format tool calls. By default, Llama Stack // will attempt to use a format that is best adapted to the model. - // `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. - // `ToolPromptFormat.function_tag`: The tool calls are enclosed in a // <function=function_name> tag. - `ToolPromptFormat.python_list`: The tool calls // are output as Python syntax -- a list of function calls. // // Any of "json", "function_tag", "python_list". ToolPromptFormat string `json:"tool_prompt_format,omitzero"` // contains filtered or unexported fields }
(Optional) Configuration for tool use.
func (InferenceBatchChatCompletionParamsToolConfig) MarshalJSON ¶
func (r InferenceBatchChatCompletionParamsToolConfig) MarshalJSON() (data []byte, err error)
func (*InferenceBatchChatCompletionParamsToolConfig) UnmarshalJSON ¶
func (r *InferenceBatchChatCompletionParamsToolConfig) UnmarshalJSON(data []byte) error
type InferenceBatchChatCompletionResponse ¶
type InferenceBatchChatCompletionResponse struct { // List of chat completion responses, one for each conversation in the batch Batch []shared.ChatCompletionResponse `json:"batch,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Batch respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from a batch chat completion request.
func (InferenceBatchChatCompletionResponse) RawJSON ¶
func (r InferenceBatchChatCompletionResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceBatchChatCompletionResponse) UnmarshalJSON ¶
func (r *InferenceBatchChatCompletionResponse) UnmarshalJSON(data []byte) error
type InferenceBatchCompletionParams ¶
type InferenceBatchCompletionParams struct { // The content to generate completions for. ContentBatch []shared.InterleavedContentUnionParam `json:"content_batch,omitzero,required"` // The identifier of the model to use. The model must be registered with Llama // Stack and available via the /models endpoint. ModelID string `json:"model_id,required"` // (Optional) If specified, log probabilities for each token position will be // returned. Logprobs InferenceBatchCompletionParamsLogprobs `json:"logprobs,omitzero"` // (Optional) Grammar specification for guided (structured) decoding. ResponseFormat shared.ResponseFormatUnionParam `json:"response_format,omitzero"` // (Optional) Parameters to control the sampling strategy. SamplingParams shared.SamplingParams `json:"sampling_params,omitzero"` // contains filtered or unexported fields }
func (InferenceBatchCompletionParams) MarshalJSON ¶
func (r InferenceBatchCompletionParams) MarshalJSON() (data []byte, err error)
func (*InferenceBatchCompletionParams) UnmarshalJSON ¶
func (r *InferenceBatchCompletionParams) UnmarshalJSON(data []byte) error
type InferenceBatchCompletionParamsLogprobs ¶
type InferenceBatchCompletionParamsLogprobs struct { // How many tokens (for each position) to return log probabilities for. TopK param.Opt[int64] `json:"top_k,omitzero"` // contains filtered or unexported fields }
(Optional) If specified, log probabilities for each token position will be returned.
func (InferenceBatchCompletionParamsLogprobs) MarshalJSON ¶
func (r InferenceBatchCompletionParamsLogprobs) MarshalJSON() (data []byte, err error)
func (*InferenceBatchCompletionParamsLogprobs) UnmarshalJSON ¶
func (r *InferenceBatchCompletionParamsLogprobs) UnmarshalJSON(data []byte) error
type InferenceChatCompletionParams ¶
type InferenceChatCompletionParams struct { // List of messages in the conversation. Messages []shared.MessageUnionParam `json:"messages,omitzero,required"` // The identifier of the model to use. The model must be registered with Llama // Stack and available via the /models endpoint. ModelID string `json:"model_id,required"` // (Optional) If specified, log probabilities for each token position will be // returned. Logprobs InferenceChatCompletionParamsLogprobs `json:"logprobs,omitzero"` // (Optional) Grammar specification for guided (structured) decoding. There are two // options: - `ResponseFormat.json_schema`: The grammar is a JSON schema. Most // providers support this format. - `ResponseFormat.grammar`: The grammar is a BNF // grammar. This format is more flexible, but not all providers support it. ResponseFormat shared.ResponseFormatUnionParam `json:"response_format,omitzero"` // Parameters to control the sampling strategy. SamplingParams shared.SamplingParams `json:"sampling_params,omitzero"` // (Optional) Whether tool use is required or automatic. Defaults to // ToolChoice.auto. .. deprecated:: Use tool_config instead. // // Any of "auto", "required", "none". ToolChoice InferenceChatCompletionParamsToolChoice `json:"tool_choice,omitzero"` // (Optional) Configuration for tool use. ToolConfig InferenceChatCompletionParamsToolConfig `json:"tool_config,omitzero"` // (Optional) Instructs the model how to format tool calls. By default, Llama Stack // will attempt to use a format that is best adapted to the model. - // `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. - // `ToolPromptFormat.function_tag`: The tool calls are enclosed in a // <function=function_name> tag. - `ToolPromptFormat.python_list`: The tool calls // are output as Python syntax -- a list of function calls. .. deprecated:: Use // tool_config instead. // // Any of "json", "function_tag", "python_list". ToolPromptFormat InferenceChatCompletionParamsToolPromptFormat `json:"tool_prompt_format,omitzero"` // (Optional) List of tool definitions available to the model. Tools []InferenceChatCompletionParamsTool `json:"tools,omitzero"` // contains filtered or unexported fields }
func (InferenceChatCompletionParams) MarshalJSON ¶
func (r InferenceChatCompletionParams) MarshalJSON() (data []byte, err error)
func (*InferenceChatCompletionParams) UnmarshalJSON ¶
func (r *InferenceChatCompletionParams) UnmarshalJSON(data []byte) error
type InferenceChatCompletionParamsLogprobs ¶
type InferenceChatCompletionParamsLogprobs struct { // How many tokens (for each position) to return log probabilities for. TopK param.Opt[int64] `json:"top_k,omitzero"` // contains filtered or unexported fields }
(Optional) If specified, log probabilities for each token position will be returned.
func (InferenceChatCompletionParamsLogprobs) MarshalJSON ¶
func (r InferenceChatCompletionParamsLogprobs) MarshalJSON() (data []byte, err error)
func (*InferenceChatCompletionParamsLogprobs) UnmarshalJSON ¶
func (r *InferenceChatCompletionParamsLogprobs) UnmarshalJSON(data []byte) error
type InferenceChatCompletionParamsTool ¶
type InferenceChatCompletionParamsTool struct { ToolName string `json:"tool_name,omitzero,required"` Description param.Opt[string] `json:"description,omitzero"` Parameters map[string]shared.ToolParamDefinition `json:"parameters,omitzero"` // contains filtered or unexported fields }
The property ToolName is required.
func (InferenceChatCompletionParamsTool) MarshalJSON ¶
func (r InferenceChatCompletionParamsTool) MarshalJSON() (data []byte, err error)
func (*InferenceChatCompletionParamsTool) UnmarshalJSON ¶
func (r *InferenceChatCompletionParamsTool) UnmarshalJSON(data []byte) error
type InferenceChatCompletionParamsToolChoice ¶
type InferenceChatCompletionParamsToolChoice string
(Optional) Whether tool use is required or automatic. Defaults to ToolChoice.auto. .. deprecated:: Use tool_config instead.
const ( InferenceChatCompletionParamsToolChoiceAuto InferenceChatCompletionParamsToolChoice = "auto" InferenceChatCompletionParamsToolChoiceRequired InferenceChatCompletionParamsToolChoice = "required" InferenceChatCompletionParamsToolChoiceNone InferenceChatCompletionParamsToolChoice = "none" )
type InferenceChatCompletionParamsToolConfig ¶
type InferenceChatCompletionParamsToolConfig struct { // (Optional) Config for how to override the default system prompt. - // `SystemMessageBehavior.append`: Appends the provided system message to the // default system prompt. - `SystemMessageBehavior.replace`: Replaces the default // system prompt with the provided system message. The system message can include // the string '{{function_definitions}}' to indicate where the function definitions // should be inserted. // // Any of "append", "replace". SystemMessageBehavior string `json:"system_message_behavior,omitzero"` // (Optional) Whether tool use is automatic, required, or none. Can also specify a // tool name to use a specific tool. Defaults to ToolChoice.auto. ToolChoice string `json:"tool_choice,omitzero"` // (Optional) Instructs the model how to format tool calls. By default, Llama Stack // will attempt to use a format that is best adapted to the model. - // `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. - // `ToolPromptFormat.function_tag`: The tool calls are enclosed in a // <function=function_name> tag. - `ToolPromptFormat.python_list`: The tool calls // are output as Python syntax -- a list of function calls. // // Any of "json", "function_tag", "python_list". ToolPromptFormat string `json:"tool_prompt_format,omitzero"` // contains filtered or unexported fields }
(Optional) Configuration for tool use.
func (InferenceChatCompletionParamsToolConfig) MarshalJSON ¶
func (r InferenceChatCompletionParamsToolConfig) MarshalJSON() (data []byte, err error)
func (*InferenceChatCompletionParamsToolConfig) UnmarshalJSON ¶
func (r *InferenceChatCompletionParamsToolConfig) UnmarshalJSON(data []byte) error
type InferenceChatCompletionParamsToolPromptFormat ¶
type InferenceChatCompletionParamsToolPromptFormat string
(Optional) Instructs the model how to format tool calls. By default, Llama Stack will attempt to use a format that is best adapted to the model. - `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. - `ToolPromptFormat.function_tag`: The tool calls are enclosed in a <function=function_name> tag. - `ToolPromptFormat.python_list`: The tool calls are output as Python syntax -- a list of function calls. .. deprecated:: Use tool_config instead.
const ( InferenceChatCompletionParamsToolPromptFormatJson InferenceChatCompletionParamsToolPromptFormat = "json" InferenceChatCompletionParamsToolPromptFormatFunctionTag InferenceChatCompletionParamsToolPromptFormat = "function_tag" InferenceChatCompletionParamsToolPromptFormatPythonList InferenceChatCompletionParamsToolPromptFormat = "python_list" )
type InferenceCompletionParams ¶
type InferenceCompletionParams struct { // The content to generate a completion for. Content shared.InterleavedContentUnionParam `json:"content,omitzero,required"` // The identifier of the model to use. The model must be registered with Llama // Stack and available via the /models endpoint. ModelID string `json:"model_id,required"` // (Optional) If specified, log probabilities for each token position will be // returned. Logprobs InferenceCompletionParamsLogprobs `json:"logprobs,omitzero"` // (Optional) Grammar specification for guided (structured) decoding. ResponseFormat shared.ResponseFormatUnionParam `json:"response_format,omitzero"` // (Optional) Parameters to control the sampling strategy. SamplingParams shared.SamplingParams `json:"sampling_params,omitzero"` // contains filtered or unexported fields }
func (InferenceCompletionParams) MarshalJSON ¶
func (r InferenceCompletionParams) MarshalJSON() (data []byte, err error)
func (*InferenceCompletionParams) UnmarshalJSON ¶
func (r *InferenceCompletionParams) UnmarshalJSON(data []byte) error
type InferenceCompletionParamsLogprobs ¶
type InferenceCompletionParamsLogprobs struct { // How many tokens (for each position) to return log probabilities for. TopK param.Opt[int64] `json:"top_k,omitzero"` // contains filtered or unexported fields }
(Optional) If specified, log probabilities for each token position will be returned.
func (InferenceCompletionParamsLogprobs) MarshalJSON ¶
func (r InferenceCompletionParamsLogprobs) MarshalJSON() (data []byte, err error)
func (*InferenceCompletionParamsLogprobs) UnmarshalJSON ¶
func (r *InferenceCompletionParamsLogprobs) UnmarshalJSON(data []byte) error
type InferenceEmbeddingsParams ¶
type InferenceEmbeddingsParams struct { // List of contents to generate embeddings for. Each content can be a string or an // InterleavedContentItem (and hence can be multimodal). The behavior depends on // the model and provider. Some models may only support text. Contents InferenceEmbeddingsParamsContentsUnion `json:"contents,omitzero,required"` // The identifier of the model to use. The model must be an embedding model // registered with Llama Stack and available via the /models endpoint. ModelID string `json:"model_id,required"` // (Optional) Output dimensionality for the embeddings. Only supported by // Matryoshka models. OutputDimension param.Opt[int64] `json:"output_dimension,omitzero"` // (Optional) How is the embedding being used? This is only supported by asymmetric // embedding models. // // Any of "query", "document". TaskType InferenceEmbeddingsParamsTaskType `json:"task_type,omitzero"` // (Optional) Config for how to truncate text for embedding when text is longer // than the model's max sequence length. // // Any of "none", "start", "end". TextTruncation InferenceEmbeddingsParamsTextTruncation `json:"text_truncation,omitzero"` // contains filtered or unexported fields }
func (InferenceEmbeddingsParams) MarshalJSON ¶
func (r InferenceEmbeddingsParams) MarshalJSON() (data []byte, err error)
func (*InferenceEmbeddingsParams) UnmarshalJSON ¶
func (r *InferenceEmbeddingsParams) UnmarshalJSON(data []byte) error
type InferenceEmbeddingsParamsContentsUnion ¶
type InferenceEmbeddingsParamsContentsUnion struct { OfStringArray []string `json:",omitzero,inline"` OfInterleavedContentItemArray []shared.InterleavedContentItemUnionParam `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (InferenceEmbeddingsParamsContentsUnion) MarshalJSON ¶
func (u InferenceEmbeddingsParamsContentsUnion) MarshalJSON() ([]byte, error)
func (*InferenceEmbeddingsParamsContentsUnion) UnmarshalJSON ¶
func (u *InferenceEmbeddingsParamsContentsUnion) UnmarshalJSON(data []byte) error
type InferenceEmbeddingsParamsTaskType ¶
type InferenceEmbeddingsParamsTaskType string
(Optional) How is the embedding being used? This is only supported by asymmetric embedding models.
const ( InferenceEmbeddingsParamsTaskTypeQuery InferenceEmbeddingsParamsTaskType = "query" InferenceEmbeddingsParamsTaskTypeDocument InferenceEmbeddingsParamsTaskType = "document" )
type InferenceEmbeddingsParamsTextTruncation ¶
type InferenceEmbeddingsParamsTextTruncation string
(Optional) Config for how to truncate text for embedding when text is longer than the model's max sequence length.
const ( InferenceEmbeddingsParamsTextTruncationNone InferenceEmbeddingsParamsTextTruncation = "none" InferenceEmbeddingsParamsTextTruncationStart InferenceEmbeddingsParamsTextTruncation = "start" InferenceEmbeddingsParamsTextTruncationEnd InferenceEmbeddingsParamsTextTruncation = "end" )
type InferenceService ¶
type InferenceService struct {
Options []option.RequestOption
}
InferenceService contains methods and other services that help with interacting with the llama-stack-client 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 NewInferenceService method instead.
func NewInferenceService ¶
func NewInferenceService(opts ...option.RequestOption) (r InferenceService)
NewInferenceService 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 (*InferenceService) BatchChatCompletion ¶
func (r *InferenceService) BatchChatCompletion(ctx context.Context, body InferenceBatchChatCompletionParams, opts ...option.RequestOption) (res *InferenceBatchChatCompletionResponse, err error)
Generate chat completions for a batch of messages using the specified model.
func (*InferenceService) BatchCompletion ¶
func (r *InferenceService) BatchCompletion(ctx context.Context, body InferenceBatchCompletionParams, opts ...option.RequestOption) (res *shared.BatchCompletion, err error)
Generate completions for a batch of content using the specified model.
func (*InferenceService) ChatCompletion
deprecated
func (r *InferenceService) ChatCompletion(ctx context.Context, body InferenceChatCompletionParams, opts ...option.RequestOption) (res *shared.ChatCompletionResponse, err error)
Generate a chat completion for the given messages using the specified model.
Deprecated: /v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions.
func (*InferenceService) ChatCompletionStreaming
deprecated
func (r *InferenceService) ChatCompletionStreaming(ctx context.Context, body InferenceChatCompletionParams, opts ...option.RequestOption) (stream *ssestream.Stream[ChatCompletionResponseStreamChunk])
Generate a chat completion for the given messages using the specified model.
Deprecated: /v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions.
func (*InferenceService) Completion
deprecated
func (r *InferenceService) Completion(ctx context.Context, body InferenceCompletionParams, opts ...option.RequestOption) (res *shared.SharedCompletionResponse, err error)
Generate a completion for the given content using the specified model.
Deprecated: /v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.
func (*InferenceService) CompletionStreaming
deprecated
func (r *InferenceService) CompletionStreaming(ctx context.Context, body InferenceCompletionParams, opts ...option.RequestOption) (stream *ssestream.Stream[shared.SharedCompletionResponse])
Generate a completion for the given content using the specified model.
Deprecated: /v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.
func (*InferenceService) Embeddings
deprecated
func (r *InferenceService) Embeddings(ctx context.Context, body InferenceEmbeddingsParams, opts ...option.RequestOption) (res *EmbeddingsResponse, err error)
Generate embeddings for content pieces using the specified model.
Deprecated: /v1/inference/embeddings is deprecated. Please use /v1/openai/v1/embeddings.
type InferenceStep ¶
type InferenceStep struct { // The response from the LLM. ModelResponse shared.CompletionMessage `json:"model_response,required"` // The ID of the step. StepID string `json:"step_id,required"` // Type of the step in an agent turn. StepType constant.Inference `json:"step_type,required"` // The ID of the turn. TurnID string `json:"turn_id,required"` // The time the step completed. CompletedAt time.Time `json:"completed_at" format:"date-time"` // The time the step started. StartedAt time.Time `json:"started_at" format:"date-time"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ModelResponse respjson.Field StepID respjson.Field StepType respjson.Field TurnID respjson.Field CompletedAt respjson.Field StartedAt respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
An inference step in an agent turn.
func (InferenceStep) RawJSON ¶
func (r InferenceStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*InferenceStep) UnmarshalJSON ¶
func (r *InferenceStep) UnmarshalJSON(data []byte) error
type InspectService ¶
type InspectService struct {
Options []option.RequestOption
}
InspectService contains methods and other services that help with interacting with the llama-stack-client 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 NewInspectService method instead.
func NewInspectService ¶
func NewInspectService(opts ...option.RequestOption) (r InspectService)
NewInspectService 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 (*InspectService) Health ¶
func (r *InspectService) Health(ctx context.Context, opts ...option.RequestOption) (res *HealthInfo, err error)
Get the current health status of the service.
func (*InspectService) Version ¶
func (r *InspectService) Version(ctx context.Context, opts ...option.RequestOption) (res *VersionInfo, err error)
Get the version of the service.
type InterleavedContentImageContentItem ¶
type InterleavedContentImageContentItem = shared.InterleavedContentImageContentItem
A image content item
This is an alias to an internal type.
type InterleavedContentImageContentItemImage ¶
type InterleavedContentImageContentItemImage = shared.InterleavedContentImageContentItemImage
Image as a base64 encoded string or an URL
This is an alias to an internal type.
type InterleavedContentImageContentItemImageParam ¶
type InterleavedContentImageContentItemImageParam = shared.InterleavedContentImageContentItemImageParam
Image as a base64 encoded string or an URL
This is an alias to an internal type.
type InterleavedContentImageContentItemImageURL ¶
type InterleavedContentImageContentItemImageURL = shared.InterleavedContentImageContentItemImageURL
A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits.
This is an alias to an internal type.
type InterleavedContentImageContentItemImageURLParam ¶
type InterleavedContentImageContentItemImageURLParam = shared.InterleavedContentImageContentItemImageURLParam
A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits.
This is an alias to an internal type.
type InterleavedContentImageContentItemParam ¶
type InterleavedContentImageContentItemParam = shared.InterleavedContentImageContentItemParam
A image content item
This is an alias to an internal type.
type InterleavedContentItemImage ¶
type InterleavedContentItemImage = shared.InterleavedContentItemImage
A image content item
This is an alias to an internal type.
type InterleavedContentItemImageImage ¶
type InterleavedContentItemImageImage = shared.InterleavedContentItemImageImage
Image as a base64 encoded string or an URL
This is an alias to an internal type.
type InterleavedContentItemImageImageParam ¶
type InterleavedContentItemImageImageParam = shared.InterleavedContentItemImageImageParam
Image as a base64 encoded string or an URL
This is an alias to an internal type.
type InterleavedContentItemImageImageURL ¶
type InterleavedContentItemImageImageURL = shared.InterleavedContentItemImageImageURL
A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits.
This is an alias to an internal type.
type InterleavedContentItemImageImageURLParam ¶
type InterleavedContentItemImageImageURLParam = shared.InterleavedContentItemImageImageURLParam
A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits.
This is an alias to an internal type.
type InterleavedContentItemImageParam ¶
type InterleavedContentItemImageParam = shared.InterleavedContentItemImageParam
A image content item
This is an alias to an internal type.
type InterleavedContentItemText ¶
type InterleavedContentItemText = shared.InterleavedContentItemText
A text content item
This is an alias to an internal type.
type InterleavedContentItemTextParam ¶
type InterleavedContentItemTextParam = shared.InterleavedContentItemTextParam
A text content item
This is an alias to an internal type.
type InterleavedContentItemUnion ¶
type InterleavedContentItemUnion = shared.InterleavedContentItemUnion
A image content item
This is an alias to an internal type.
type InterleavedContentItemUnionParam ¶
type InterleavedContentItemUnionParam = shared.InterleavedContentItemUnionParam
A image content item
This is an alias to an internal type.
type InterleavedContentTextContentItem ¶
type InterleavedContentTextContentItem = shared.InterleavedContentTextContentItem
A text content item
This is an alias to an internal type.
type InterleavedContentTextContentItemParam ¶
type InterleavedContentTextContentItemParam = shared.InterleavedContentTextContentItemParam
A text content item
This is an alias to an internal type.
type InterleavedContentUnion ¶
type InterleavedContentUnion = shared.InterleavedContentUnion
A image content item
This is an alias to an internal type.
type InterleavedContentUnionParam ¶
type InterleavedContentUnionParam = shared.InterleavedContentUnionParam
A image content item
This is an alias to an internal type.
type Job ¶
type Job struct { // Unique identifier for the job JobID string `json:"job_id,required"` // Current execution status of the job // // Any of "completed", "in_progress", "failed", "scheduled", "cancelled". Status JobStatus `json:"status,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { JobID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A job execution instance with status tracking.
func (*Job) UnmarshalJSON ¶
type ListBenchmarksResponse ¶
type ListBenchmarksResponse struct { Data []Benchmark `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ListBenchmarksResponse) RawJSON ¶
func (r ListBenchmarksResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListBenchmarksResponse) UnmarshalJSON ¶
func (r *ListBenchmarksResponse) UnmarshalJSON(data []byte) error
type ListDatasetsResponse ¶
type ListDatasetsResponse struct { // List of datasets Data []ListDatasetsResponseData `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from listing datasets.
func (ListDatasetsResponse) RawJSON ¶
func (r ListDatasetsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDatasetsResponse) UnmarshalJSON ¶
func (r *ListDatasetsResponse) UnmarshalJSON(data []byte) error
type ListDatasetsResponseData ¶
type ListDatasetsResponseData struct { Identifier string `json:"identifier,required"` // Additional metadata for the dataset Metadata map[string]ListDatasetsResponseDataMetadataUnion `json:"metadata,required"` ProviderID string `json:"provider_id,required"` // Purpose of the dataset indicating its intended use // // Any of "post-training/messages", "eval/question-answer", "eval/messages-answer". Purpose string `json:"purpose,required"` // Data source configuration for the dataset Source ListDatasetsResponseDataSourceUnion `json:"source,required"` // Type of resource, always 'dataset' for datasets Type constant.Dataset `json:"type,required"` ProviderResourceID string `json:"provider_resource_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Identifier respjson.Field Metadata respjson.Field ProviderID respjson.Field Purpose respjson.Field Source respjson.Field Type respjson.Field ProviderResourceID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Dataset resource for storing and accessing training or evaluation data.
func (ListDatasetsResponseData) RawJSON ¶
func (r ListDatasetsResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDatasetsResponseData) UnmarshalJSON ¶
func (r *ListDatasetsResponseData) UnmarshalJSON(data []byte) error
type ListDatasetsResponseDataMetadataUnion ¶
type ListDatasetsResponseDataMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ListDatasetsResponseDataMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ListDatasetsResponseDataMetadataUnion) AsAnyArray ¶
func (u ListDatasetsResponseDataMetadataUnion) AsAnyArray() (v []any)
func (ListDatasetsResponseDataMetadataUnion) AsBool ¶
func (u ListDatasetsResponseDataMetadataUnion) AsBool() (v bool)
func (ListDatasetsResponseDataMetadataUnion) AsFloat ¶
func (u ListDatasetsResponseDataMetadataUnion) AsFloat() (v float64)
func (ListDatasetsResponseDataMetadataUnion) AsString ¶
func (u ListDatasetsResponseDataMetadataUnion) AsString() (v string)
func (ListDatasetsResponseDataMetadataUnion) RawJSON ¶
func (u ListDatasetsResponseDataMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDatasetsResponseDataMetadataUnion) UnmarshalJSON ¶
func (r *ListDatasetsResponseDataMetadataUnion) UnmarshalJSON(data []byte) error
type ListDatasetsResponseDataSourceRows ¶
type ListDatasetsResponseDataSourceRows struct { // The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user", // "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]} // ] Rows []map[string]ListDatasetsResponseDataSourceRowsRowUnion `json:"rows,required"` Type constant.Rows `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Rows respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A dataset stored in rows.
func (ListDatasetsResponseDataSourceRows) RawJSON ¶
func (r ListDatasetsResponseDataSourceRows) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDatasetsResponseDataSourceRows) UnmarshalJSON ¶
func (r *ListDatasetsResponseDataSourceRows) UnmarshalJSON(data []byte) error
type ListDatasetsResponseDataSourceRowsRowUnion ¶
type ListDatasetsResponseDataSourceRowsRowUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ListDatasetsResponseDataSourceRowsRowUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ListDatasetsResponseDataSourceRowsRowUnion) AsAnyArray ¶
func (u ListDatasetsResponseDataSourceRowsRowUnion) AsAnyArray() (v []any)
func (ListDatasetsResponseDataSourceRowsRowUnion) AsBool ¶
func (u ListDatasetsResponseDataSourceRowsRowUnion) AsBool() (v bool)
func (ListDatasetsResponseDataSourceRowsRowUnion) AsFloat ¶
func (u ListDatasetsResponseDataSourceRowsRowUnion) AsFloat() (v float64)
func (ListDatasetsResponseDataSourceRowsRowUnion) AsString ¶
func (u ListDatasetsResponseDataSourceRowsRowUnion) AsString() (v string)
func (ListDatasetsResponseDataSourceRowsRowUnion) RawJSON ¶
func (u ListDatasetsResponseDataSourceRowsRowUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDatasetsResponseDataSourceRowsRowUnion) UnmarshalJSON ¶
func (r *ListDatasetsResponseDataSourceRowsRowUnion) UnmarshalJSON(data []byte) error
type ListDatasetsResponseDataSourceUnion ¶
type ListDatasetsResponseDataSourceUnion struct { // Any of "uri", "rows". Type string `json:"type"` // This field is from variant [ListDatasetsResponseDataSourceUri]. Uri string `json:"uri"` // This field is from variant [ListDatasetsResponseDataSourceRows]. Rows []map[string]ListDatasetsResponseDataSourceRowsRowUnion `json:"rows"` JSON struct { Type respjson.Field Uri respjson.Field Rows respjson.Field // contains filtered or unexported fields } `json:"-"` }
ListDatasetsResponseDataSourceUnion contains all possible properties and values from ListDatasetsResponseDataSourceUri, ListDatasetsResponseDataSourceRows.
Use the ListDatasetsResponseDataSourceUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ListDatasetsResponseDataSourceUnion) AsAny ¶
func (u ListDatasetsResponseDataSourceUnion) AsAny() anyListDatasetsResponseDataSource
Use the following switch statement to find the correct variant
switch variant := ListDatasetsResponseDataSourceUnion.AsAny().(type) { case llamastackclient.ListDatasetsResponseDataSourceUri: case llamastackclient.ListDatasetsResponseDataSourceRows: default: fmt.Errorf("no variant present") }
func (ListDatasetsResponseDataSourceUnion) AsRows ¶
func (u ListDatasetsResponseDataSourceUnion) AsRows() (v ListDatasetsResponseDataSourceRows)
func (ListDatasetsResponseDataSourceUnion) AsUri ¶
func (u ListDatasetsResponseDataSourceUnion) AsUri() (v ListDatasetsResponseDataSourceUri)
func (ListDatasetsResponseDataSourceUnion) RawJSON ¶
func (u ListDatasetsResponseDataSourceUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDatasetsResponseDataSourceUnion) UnmarshalJSON ¶
func (r *ListDatasetsResponseDataSourceUnion) UnmarshalJSON(data []byte) error
type ListDatasetsResponseDataSourceUri ¶
type ListDatasetsResponseDataSourceUri struct { Type constant.Uri `json:"type,required"` // The dataset can be obtained from a URI. E.g. - // "https://mywebsite.com/mydata.jsonl" - "lsfs://mydata.jsonl" - // "data:csv;base64,{base64_content}" Uri string `json:"uri,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Type respjson.Field Uri respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A dataset that can be obtained from a URI.
func (ListDatasetsResponseDataSourceUri) RawJSON ¶
func (r ListDatasetsResponseDataSourceUri) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDatasetsResponseDataSourceUri) UnmarshalJSON ¶
func (r *ListDatasetsResponseDataSourceUri) UnmarshalJSON(data []byte) error
type ListFilesResponse ¶
type ListFilesResponse struct { // List of file objects Data []File `json:"data,required"` // ID of the first file in the list for pagination FirstID string `json:"first_id,required"` // Whether there are more files available beyond this page HasMore bool `json:"has_more,required"` // ID of the last file in the list for pagination LastID string `json:"last_id,required"` // The object type, which is always "list" Object constant.List `json:"object,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field FirstID respjson.Field HasMore respjson.Field LastID respjson.Field Object respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response for listing files in OpenAI Files API.
func (ListFilesResponse) RawJSON ¶
func (r ListFilesResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListFilesResponse) UnmarshalJSON ¶
func (r *ListFilesResponse) UnmarshalJSON(data []byte) error
type ListModelsResponse ¶
type ListModelsResponse struct { Data []Model `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ListModelsResponse) RawJSON ¶
func (r ListModelsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListModelsResponse) UnmarshalJSON ¶
func (r *ListModelsResponse) UnmarshalJSON(data []byte) error
type ListPostTrainingJobsResponse ¶
type ListPostTrainingJobsResponse struct { Data []ListPostTrainingJobsResponseData `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ListPostTrainingJobsResponse) RawJSON ¶
func (r ListPostTrainingJobsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListPostTrainingJobsResponse) UnmarshalJSON ¶
func (r *ListPostTrainingJobsResponse) UnmarshalJSON(data []byte) error
type ListPostTrainingJobsResponseData ¶
type ListPostTrainingJobsResponseData struct { JobUuid string `json:"job_uuid,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { JobUuid respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ListPostTrainingJobsResponseData) RawJSON ¶
func (r ListPostTrainingJobsResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListPostTrainingJobsResponseData) UnmarshalJSON ¶
func (r *ListPostTrainingJobsResponseData) UnmarshalJSON(data []byte) error
type ListProvidersResponse ¶
type ListProvidersResponse struct { // List of provider information objects Data []ProviderInfo `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response containing a list of all available providers.
func (ListProvidersResponse) RawJSON ¶
func (r ListProvidersResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProvidersResponse) UnmarshalJSON ¶
func (r *ListProvidersResponse) UnmarshalJSON(data []byte) error
type ListRoutesResponse ¶
type ListRoutesResponse struct { // List of available route information objects Data []RouteInfo `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response containing a list of all available API routes.
func (ListRoutesResponse) RawJSON ¶
func (r ListRoutesResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListRoutesResponse) UnmarshalJSON ¶
func (r *ListRoutesResponse) UnmarshalJSON(data []byte) error
type ListScoringFunctionsResponse ¶
type ListScoringFunctionsResponse struct { Data []ScoringFn `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ListScoringFunctionsResponse) RawJSON ¶
func (r ListScoringFunctionsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListScoringFunctionsResponse) UnmarshalJSON ¶
func (r *ListScoringFunctionsResponse) UnmarshalJSON(data []byte) error
type ListShieldsResponse ¶
type ListShieldsResponse struct { Data []Shield `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ListShieldsResponse) RawJSON ¶
func (r ListShieldsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListShieldsResponse) UnmarshalJSON ¶
func (r *ListShieldsResponse) UnmarshalJSON(data []byte) error
type ListToolGroupsResponse ¶
type ListToolGroupsResponse struct { // List of tool groups Data []ToolGroup `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response containing a list of tool groups.
func (ListToolGroupsResponse) RawJSON ¶
func (r ListToolGroupsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListToolGroupsResponse) UnmarshalJSON ¶
func (r *ListToolGroupsResponse) UnmarshalJSON(data []byte) error
type ListToolsResponse ¶
type ListToolsResponse struct { // List of tools Data []Tool `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response containing a list of tools.
func (ListToolsResponse) RawJSON ¶
func (r ListToolsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListToolsResponse) UnmarshalJSON ¶
func (r *ListToolsResponse) UnmarshalJSON(data []byte) error
type ListVectorDBsResponse ¶
type ListVectorDBsResponse struct { // List of vector databases Data []ListVectorDBsResponseData `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from listing vector databases.
func (ListVectorDBsResponse) RawJSON ¶
func (r ListVectorDBsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListVectorDBsResponse) UnmarshalJSON ¶
func (r *ListVectorDBsResponse) UnmarshalJSON(data []byte) error
type ListVectorDBsResponseData ¶
type ListVectorDBsResponseData struct { // Dimension of the embedding vectors EmbeddingDimension int64 `json:"embedding_dimension,required"` // Name of the embedding model to use for vector generation EmbeddingModel string `json:"embedding_model,required"` Identifier string `json:"identifier,required"` ProviderID string `json:"provider_id,required"` // Type of resource, always 'vector_db' for vector databases Type constant.VectorDB `json:"type,required"` ProviderResourceID string `json:"provider_resource_id"` VectorDBName string `json:"vector_db_name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EmbeddingDimension respjson.Field EmbeddingModel respjson.Field Identifier respjson.Field ProviderID respjson.Field Type respjson.Field ProviderResourceID respjson.Field VectorDBName respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Vector database resource for storing and querying vector embeddings.
func (ListVectorDBsResponseData) RawJSON ¶
func (r ListVectorDBsResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListVectorDBsResponseData) UnmarshalJSON ¶
func (r *ListVectorDBsResponseData) UnmarshalJSON(data []byte) error
type ListVectorStoresResponse ¶
type ListVectorStoresResponse struct { // List of vector store objects Data []VectorStore `json:"data,required"` // Whether there are more vector stores available beyond this page HasMore bool `json:"has_more,required"` // Object type identifier, always "list" Object string `json:"object,required"` // (Optional) ID of the first vector store in the list for pagination FirstID string `json:"first_id"` // (Optional) ID of the last vector store in the list for pagination LastID string `json:"last_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field HasMore respjson.Field Object respjson.Field FirstID respjson.Field LastID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from listing vector stores.
func (ListVectorStoresResponse) RawJSON ¶
func (r ListVectorStoresResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListVectorStoresResponse) UnmarshalJSON ¶
func (r *ListVectorStoresResponse) UnmarshalJSON(data []byte) error
type MemoryRetrievalStep ¶
type MemoryRetrievalStep struct { // The context retrieved from the vector databases. InsertedContext shared.InterleavedContentUnion `json:"inserted_context,required"` // The ID of the step. StepID string `json:"step_id,required"` // Type of the step in an agent turn. StepType constant.MemoryRetrieval `json:"step_type,required"` // The ID of the turn. TurnID string `json:"turn_id,required"` // The IDs of the vector databases to retrieve context from. VectorDBIDs string `json:"vector_db_ids,required"` // The time the step completed. CompletedAt time.Time `json:"completed_at" format:"date-time"` // The time the step started. StartedAt time.Time `json:"started_at" format:"date-time"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { InsertedContext respjson.Field StepID respjson.Field StepType respjson.Field TurnID respjson.Field VectorDBIDs respjson.Field CompletedAt respjson.Field StartedAt respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A memory retrieval step in an agent turn.
func (MemoryRetrievalStep) RawJSON ¶
func (r MemoryRetrievalStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*MemoryRetrievalStep) UnmarshalJSON ¶
func (r *MemoryRetrievalStep) UnmarshalJSON(data []byte) error
type MessageUnionParam ¶
type MessageUnionParam = shared.MessageUnionParam
A message from the user in a chat conversation.
This is an alias to an internal type.
type Model ¶
type Model struct { // Unique identifier for this resource in llama stack Identifier string `json:"identifier,required"` // Any additional metadata for this model Metadata map[string]ModelMetadataUnion `json:"metadata,required"` // The type of model (LLM or embedding model) // // Any of "llm", "embedding". ModelType ModelModelType `json:"model_type,required"` // ID of the provider that owns this resource ProviderID string `json:"provider_id,required"` // The resource type, always 'model' for model resources Type constant.Model `json:"type,required"` // Unique identifier for this resource in the provider ProviderResourceID string `json:"provider_resource_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Identifier respjson.Field Metadata respjson.Field ModelType respjson.Field ProviderID respjson.Field Type respjson.Field ProviderResourceID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A model resource representing an AI model registered in Llama Stack.
func (*Model) UnmarshalJSON ¶
type ModelMetadataUnion ¶
type ModelMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ModelMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ModelMetadataUnion) AsAnyArray ¶
func (u ModelMetadataUnion) AsAnyArray() (v []any)
func (ModelMetadataUnion) AsBool ¶
func (u ModelMetadataUnion) AsBool() (v bool)
func (ModelMetadataUnion) AsFloat ¶
func (u ModelMetadataUnion) AsFloat() (v float64)
func (ModelMetadataUnion) AsString ¶
func (u ModelMetadataUnion) AsString() (v string)
func (ModelMetadataUnion) RawJSON ¶
func (u ModelMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ModelMetadataUnion) UnmarshalJSON ¶
func (r *ModelMetadataUnion) UnmarshalJSON(data []byte) error
type ModelModelType ¶
type ModelModelType string
The type of model (LLM or embedding model)
const ( ModelModelTypeLlm ModelModelType = "llm" ModelModelTypeEmbedding ModelModelType = "embedding" )
type ModelRegisterParams ¶
type ModelRegisterParams struct { // The identifier of the model to register. ModelID string `json:"model_id,required"` // The identifier of the provider. ProviderID param.Opt[string] `json:"provider_id,omitzero"` // The identifier of the model in the provider. ProviderModelID param.Opt[string] `json:"provider_model_id,omitzero"` // Any additional metadata for this model. Metadata map[string]ModelRegisterParamsMetadataUnion `json:"metadata,omitzero"` // The type of model to register. // // Any of "llm", "embedding". ModelType ModelRegisterParamsModelType `json:"model_type,omitzero"` // contains filtered or unexported fields }
func (ModelRegisterParams) MarshalJSON ¶
func (r ModelRegisterParams) MarshalJSON() (data []byte, err error)
func (*ModelRegisterParams) UnmarshalJSON ¶
func (r *ModelRegisterParams) UnmarshalJSON(data []byte) error
type ModelRegisterParamsMetadataUnion ¶
type ModelRegisterParamsMetadataUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ModelRegisterParamsMetadataUnion) MarshalJSON ¶
func (u ModelRegisterParamsMetadataUnion) MarshalJSON() ([]byte, error)
func (*ModelRegisterParamsMetadataUnion) UnmarshalJSON ¶
func (u *ModelRegisterParamsMetadataUnion) UnmarshalJSON(data []byte) error
type ModelRegisterParamsModelType ¶
type ModelRegisterParamsModelType string
The type of model to register.
const ( ModelRegisterParamsModelTypeLlm ModelRegisterParamsModelType = "llm" ModelRegisterParamsModelTypeEmbedding ModelRegisterParamsModelType = "embedding" )
type ModelService ¶
type ModelService struct {
Options []option.RequestOption
}
ModelService contains methods and other services that help with interacting with the llama-stack-client 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) Get ¶
func (r *ModelService) Get(ctx context.Context, modelID string, opts ...option.RequestOption) (res *Model, err error)
Get a model by its identifier.
func (*ModelService) List ¶
func (r *ModelService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Model, err error)
List all models.
func (*ModelService) Register ¶
func (r *ModelService) Register(ctx context.Context, body ModelRegisterParams, opts ...option.RequestOption) (res *Model, err error)
Register a model.
func (*ModelService) Unregister ¶
func (r *ModelService) Unregister(ctx context.Context, modelID string, opts ...option.RequestOption) (err error)
Unregister a model.
type ModerationNewParams ¶
type ModerationNewParams struct { // Input (or inputs) to classify. Can be a single string, an array of strings, or // an array of multi-modal input objects similar to other models. Input ModerationNewParamsInputUnion `json:"input,omitzero,required"` // The content moderation model you would like to use. Model string `json:"model,required"` // contains filtered or unexported fields }
func (ModerationNewParams) MarshalJSON ¶
func (r ModerationNewParams) MarshalJSON() (data []byte, err error)
func (*ModerationNewParams) UnmarshalJSON ¶
func (r *ModerationNewParams) UnmarshalJSON(data []byte) error
type ModerationNewParamsInputUnion ¶
type ModerationNewParamsInputUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfStringArray []string `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ModerationNewParamsInputUnion) MarshalJSON ¶
func (u ModerationNewParamsInputUnion) MarshalJSON() ([]byte, error)
func (*ModerationNewParamsInputUnion) UnmarshalJSON ¶
func (u *ModerationNewParamsInputUnion) UnmarshalJSON(data []byte) error
type ModerationService ¶
type ModerationService struct {
Options []option.RequestOption
}
ModerationService contains methods and other services that help with interacting with the llama-stack-client 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, body ModerationNewParams, opts ...option.RequestOption) (res *CreateResponse, err error)
Classifies if text and/or image inputs are potentially harmful.
type PostTrainingJob ¶
type PostTrainingJob struct { JobUuid string `json:"job_uuid,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { JobUuid respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (PostTrainingJob) RawJSON ¶
func (r PostTrainingJob) RawJSON() string
Returns the unmodified JSON received from the API
func (*PostTrainingJob) UnmarshalJSON ¶
func (r *PostTrainingJob) UnmarshalJSON(data []byte) error
type PostTrainingJobArtifactsParams ¶
type PostTrainingJobArtifactsParams struct { // The UUID of the job to get the artifacts of. JobUuid string `query:"job_uuid,required" json:"-"` // contains filtered or unexported fields }
func (PostTrainingJobArtifactsParams) URLQuery ¶
func (r PostTrainingJobArtifactsParams) URLQuery() (v url.Values, err error)
URLQuery serializes PostTrainingJobArtifactsParams's query parameters as `url.Values`.
type PostTrainingJobArtifactsResponse ¶
type PostTrainingJobArtifactsResponse struct { // List of model checkpoints created during training Checkpoints []PostTrainingJobArtifactsResponseCheckpoint `json:"checkpoints,required"` // Unique identifier for the training job JobUuid string `json:"job_uuid,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Checkpoints respjson.Field JobUuid respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Artifacts of a finetuning job.
func (PostTrainingJobArtifactsResponse) RawJSON ¶
func (r PostTrainingJobArtifactsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*PostTrainingJobArtifactsResponse) UnmarshalJSON ¶
func (r *PostTrainingJobArtifactsResponse) UnmarshalJSON(data []byte) error
type PostTrainingJobArtifactsResponseCheckpoint ¶
type PostTrainingJobArtifactsResponseCheckpoint struct { // Timestamp when the checkpoint was created CreatedAt time.Time `json:"created_at,required" format:"date-time"` // Training epoch when the checkpoint was saved Epoch int64 `json:"epoch,required"` // Unique identifier for the checkpoint Identifier string `json:"identifier,required"` // File system path where the checkpoint is stored Path string `json:"path,required"` // Identifier of the training job that created this checkpoint PostTrainingJobID string `json:"post_training_job_id,required"` // (Optional) Training metrics associated with this checkpoint TrainingMetrics PostTrainingJobArtifactsResponseCheckpointTrainingMetrics `json:"training_metrics"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { CreatedAt respjson.Field Epoch respjson.Field Identifier respjson.Field Path respjson.Field PostTrainingJobID respjson.Field TrainingMetrics respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Checkpoint created during training runs.
func (PostTrainingJobArtifactsResponseCheckpoint) RawJSON ¶
func (r PostTrainingJobArtifactsResponseCheckpoint) RawJSON() string
Returns the unmodified JSON received from the API
func (*PostTrainingJobArtifactsResponseCheckpoint) UnmarshalJSON ¶
func (r *PostTrainingJobArtifactsResponseCheckpoint) UnmarshalJSON(data []byte) error
type PostTrainingJobArtifactsResponseCheckpointTrainingMetrics ¶
type PostTrainingJobArtifactsResponseCheckpointTrainingMetrics struct { // Training epoch number Epoch int64 `json:"epoch,required"` // Perplexity metric indicating model confidence Perplexity float64 `json:"perplexity,required"` // Loss value on the training dataset TrainLoss float64 `json:"train_loss,required"` // Loss value on the validation dataset ValidationLoss float64 `json:"validation_loss,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Epoch respjson.Field Perplexity respjson.Field TrainLoss respjson.Field ValidationLoss respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Training metrics associated with this checkpoint
func (PostTrainingJobArtifactsResponseCheckpointTrainingMetrics) RawJSON ¶
func (r PostTrainingJobArtifactsResponseCheckpointTrainingMetrics) RawJSON() string
Returns the unmodified JSON received from the API
func (*PostTrainingJobArtifactsResponseCheckpointTrainingMetrics) UnmarshalJSON ¶
func (r *PostTrainingJobArtifactsResponseCheckpointTrainingMetrics) UnmarshalJSON(data []byte) error
type PostTrainingJobCancelParams ¶
type PostTrainingJobCancelParams struct { // The UUID of the job to cancel. JobUuid string `json:"job_uuid,required"` // contains filtered or unexported fields }
func (PostTrainingJobCancelParams) MarshalJSON ¶
func (r PostTrainingJobCancelParams) MarshalJSON() (data []byte, err error)
func (*PostTrainingJobCancelParams) UnmarshalJSON ¶
func (r *PostTrainingJobCancelParams) UnmarshalJSON(data []byte) error
type PostTrainingJobService ¶
type PostTrainingJobService struct {
Options []option.RequestOption
}
PostTrainingJobService contains methods and other services that help with interacting with the llama-stack-client 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 NewPostTrainingJobService method instead.
func NewPostTrainingJobService ¶
func NewPostTrainingJobService(opts ...option.RequestOption) (r PostTrainingJobService)
NewPostTrainingJobService 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 (*PostTrainingJobService) Artifacts ¶
func (r *PostTrainingJobService) Artifacts(ctx context.Context, query PostTrainingJobArtifactsParams, opts ...option.RequestOption) (res *PostTrainingJobArtifactsResponse, err error)
Get the artifacts of a training job.
func (*PostTrainingJobService) Cancel ¶
func (r *PostTrainingJobService) Cancel(ctx context.Context, body PostTrainingJobCancelParams, opts ...option.RequestOption) (err error)
Cancel a training job.
func (*PostTrainingJobService) List ¶
func (r *PostTrainingJobService) List(ctx context.Context, opts ...option.RequestOption) (res *[]ListPostTrainingJobsResponseData, err error)
Get all training jobs.
func (*PostTrainingJobService) Status ¶
func (r *PostTrainingJobService) Status(ctx context.Context, query PostTrainingJobStatusParams, opts ...option.RequestOption) (res *PostTrainingJobStatusResponse, err error)
Get the status of a training job.
type PostTrainingJobStatusParams ¶
type PostTrainingJobStatusParams struct { // The UUID of the job to get the status of. JobUuid string `query:"job_uuid,required" json:"-"` // contains filtered or unexported fields }
func (PostTrainingJobStatusParams) URLQuery ¶
func (r PostTrainingJobStatusParams) URLQuery() (v url.Values, err error)
URLQuery serializes PostTrainingJobStatusParams's query parameters as `url.Values`.
type PostTrainingJobStatusResponse ¶
type PostTrainingJobStatusResponse struct { // List of model checkpoints created during training Checkpoints []PostTrainingJobStatusResponseCheckpoint `json:"checkpoints,required"` // Unique identifier for the training job JobUuid string `json:"job_uuid,required"` // Current status of the training job // // Any of "completed", "in_progress", "failed", "scheduled", "cancelled". Status PostTrainingJobStatusResponseStatus `json:"status,required"` // (Optional) Timestamp when the job finished, if completed CompletedAt time.Time `json:"completed_at" format:"date-time"` // (Optional) Information about computational resources allocated to the job ResourcesAllocated map[string]PostTrainingJobStatusResponseResourcesAllocatedUnion `json:"resources_allocated"` // (Optional) Timestamp when the job was scheduled ScheduledAt time.Time `json:"scheduled_at" format:"date-time"` // (Optional) Timestamp when the job execution began StartedAt time.Time `json:"started_at" format:"date-time"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Checkpoints respjson.Field JobUuid respjson.Field Status respjson.Field CompletedAt respjson.Field ResourcesAllocated respjson.Field ScheduledAt respjson.Field StartedAt respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Status of a finetuning job.
func (PostTrainingJobStatusResponse) RawJSON ¶
func (r PostTrainingJobStatusResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*PostTrainingJobStatusResponse) UnmarshalJSON ¶
func (r *PostTrainingJobStatusResponse) UnmarshalJSON(data []byte) error
type PostTrainingJobStatusResponseCheckpoint ¶
type PostTrainingJobStatusResponseCheckpoint struct { // Timestamp when the checkpoint was created CreatedAt time.Time `json:"created_at,required" format:"date-time"` // Training epoch when the checkpoint was saved Epoch int64 `json:"epoch,required"` // Unique identifier for the checkpoint Identifier string `json:"identifier,required"` // File system path where the checkpoint is stored Path string `json:"path,required"` // Identifier of the training job that created this checkpoint PostTrainingJobID string `json:"post_training_job_id,required"` // (Optional) Training metrics associated with this checkpoint TrainingMetrics PostTrainingJobStatusResponseCheckpointTrainingMetrics `json:"training_metrics"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { CreatedAt respjson.Field Epoch respjson.Field Identifier respjson.Field Path respjson.Field PostTrainingJobID respjson.Field TrainingMetrics respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Checkpoint created during training runs.
func (PostTrainingJobStatusResponseCheckpoint) RawJSON ¶
func (r PostTrainingJobStatusResponseCheckpoint) RawJSON() string
Returns the unmodified JSON received from the API
func (*PostTrainingJobStatusResponseCheckpoint) UnmarshalJSON ¶
func (r *PostTrainingJobStatusResponseCheckpoint) UnmarshalJSON(data []byte) error
type PostTrainingJobStatusResponseCheckpointTrainingMetrics ¶
type PostTrainingJobStatusResponseCheckpointTrainingMetrics struct { // Training epoch number Epoch int64 `json:"epoch,required"` // Perplexity metric indicating model confidence Perplexity float64 `json:"perplexity,required"` // Loss value on the training dataset TrainLoss float64 `json:"train_loss,required"` // Loss value on the validation dataset ValidationLoss float64 `json:"validation_loss,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Epoch respjson.Field Perplexity respjson.Field TrainLoss respjson.Field ValidationLoss respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Training metrics associated with this checkpoint
func (PostTrainingJobStatusResponseCheckpointTrainingMetrics) RawJSON ¶
func (r PostTrainingJobStatusResponseCheckpointTrainingMetrics) RawJSON() string
Returns the unmodified JSON received from the API
func (*PostTrainingJobStatusResponseCheckpointTrainingMetrics) UnmarshalJSON ¶
func (r *PostTrainingJobStatusResponseCheckpointTrainingMetrics) UnmarshalJSON(data []byte) error
type PostTrainingJobStatusResponseResourcesAllocatedUnion ¶
type PostTrainingJobStatusResponseResourcesAllocatedUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
PostTrainingJobStatusResponseResourcesAllocatedUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (PostTrainingJobStatusResponseResourcesAllocatedUnion) AsAnyArray ¶
func (u PostTrainingJobStatusResponseResourcesAllocatedUnion) AsAnyArray() (v []any)
func (PostTrainingJobStatusResponseResourcesAllocatedUnion) AsBool ¶
func (u PostTrainingJobStatusResponseResourcesAllocatedUnion) AsBool() (v bool)
func (PostTrainingJobStatusResponseResourcesAllocatedUnion) AsFloat ¶
func (u PostTrainingJobStatusResponseResourcesAllocatedUnion) AsFloat() (v float64)
func (PostTrainingJobStatusResponseResourcesAllocatedUnion) AsString ¶
func (u PostTrainingJobStatusResponseResourcesAllocatedUnion) AsString() (v string)
func (PostTrainingJobStatusResponseResourcesAllocatedUnion) RawJSON ¶
func (u PostTrainingJobStatusResponseResourcesAllocatedUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*PostTrainingJobStatusResponseResourcesAllocatedUnion) UnmarshalJSON ¶
func (r *PostTrainingJobStatusResponseResourcesAllocatedUnion) UnmarshalJSON(data []byte) error
type PostTrainingJobStatusResponseStatus ¶
type PostTrainingJobStatusResponseStatus string
Current status of the training job
const ( PostTrainingJobStatusResponseStatusCompleted PostTrainingJobStatusResponseStatus = "completed" PostTrainingJobStatusResponseStatusInProgress PostTrainingJobStatusResponseStatus = "in_progress" PostTrainingJobStatusResponseStatusFailed PostTrainingJobStatusResponseStatus = "failed" PostTrainingJobStatusResponseStatusScheduled PostTrainingJobStatusResponseStatus = "scheduled" PostTrainingJobStatusResponseStatusCancelled PostTrainingJobStatusResponseStatus = "cancelled" )
type PostTrainingPreferenceOptimizeParams ¶
type PostTrainingPreferenceOptimizeParams struct { // The algorithm configuration. AlgorithmConfig PostTrainingPreferenceOptimizeParamsAlgorithmConfig `json:"algorithm_config,omitzero,required"` // The model to fine-tune. FinetunedModel string `json:"finetuned_model,required"` // The hyperparam search configuration. HyperparamSearchConfig map[string]PostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion `json:"hyperparam_search_config,omitzero,required"` // The UUID of the job to create. JobUuid string `json:"job_uuid,required"` // The logger configuration. LoggerConfig map[string]PostTrainingPreferenceOptimizeParamsLoggerConfigUnion `json:"logger_config,omitzero,required"` // The training configuration. TrainingConfig PostTrainingPreferenceOptimizeParamsTrainingConfig `json:"training_config,omitzero,required"` // contains filtered or unexported fields }
func (PostTrainingPreferenceOptimizeParams) MarshalJSON ¶
func (r PostTrainingPreferenceOptimizeParams) MarshalJSON() (data []byte, err error)
func (*PostTrainingPreferenceOptimizeParams) UnmarshalJSON ¶
func (r *PostTrainingPreferenceOptimizeParams) UnmarshalJSON(data []byte) error
type PostTrainingPreferenceOptimizeParamsAlgorithmConfig ¶
type PostTrainingPreferenceOptimizeParamsAlgorithmConfig struct { // Temperature parameter for the DPO loss Beta float64 `json:"beta,required"` // The type of loss function to use for DPO // // Any of "sigmoid", "hinge", "ipo", "kto_pair". LossType string `json:"loss_type,omitzero,required"` // contains filtered or unexported fields }
The algorithm configuration.
The properties Beta, LossType are required.
func (PostTrainingPreferenceOptimizeParamsAlgorithmConfig) MarshalJSON ¶
func (r PostTrainingPreferenceOptimizeParamsAlgorithmConfig) MarshalJSON() (data []byte, err error)
func (*PostTrainingPreferenceOptimizeParamsAlgorithmConfig) UnmarshalJSON ¶
func (r *PostTrainingPreferenceOptimizeParamsAlgorithmConfig) UnmarshalJSON(data []byte) error
type PostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion ¶
type PostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion) MarshalJSON ¶
func (u PostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion) MarshalJSON() ([]byte, error)
func (*PostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion) UnmarshalJSON ¶
func (u *PostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion) UnmarshalJSON(data []byte) error
type PostTrainingPreferenceOptimizeParamsLoggerConfigUnion ¶
type PostTrainingPreferenceOptimizeParamsLoggerConfigUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PostTrainingPreferenceOptimizeParamsLoggerConfigUnion) MarshalJSON ¶
func (u PostTrainingPreferenceOptimizeParamsLoggerConfigUnion) MarshalJSON() ([]byte, error)
func (*PostTrainingPreferenceOptimizeParamsLoggerConfigUnion) UnmarshalJSON ¶
func (u *PostTrainingPreferenceOptimizeParamsLoggerConfigUnion) UnmarshalJSON(data []byte) error
type PostTrainingPreferenceOptimizeParamsTrainingConfig ¶
type PostTrainingPreferenceOptimizeParamsTrainingConfig struct { // Number of steps to accumulate gradients before updating GradientAccumulationSteps int64 `json:"gradient_accumulation_steps,required"` // Maximum number of steps to run per epoch MaxStepsPerEpoch int64 `json:"max_steps_per_epoch,required"` // Number of training epochs to run NEpochs int64 `json:"n_epochs,required"` // (Optional) Data type for model parameters (bf16, fp16, fp32) Dtype param.Opt[string] `json:"dtype,omitzero"` // (Optional) Maximum number of validation steps per epoch MaxValidationSteps param.Opt[int64] `json:"max_validation_steps,omitzero"` // (Optional) Configuration for data loading and formatting DataConfig PostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig `json:"data_config,omitzero"` // (Optional) Configuration for memory and compute optimizations EfficiencyConfig PostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig `json:"efficiency_config,omitzero"` // (Optional) Configuration for the optimization algorithm OptimizerConfig PostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig `json:"optimizer_config,omitzero"` // contains filtered or unexported fields }
The training configuration.
The properties GradientAccumulationSteps, MaxStepsPerEpoch, NEpochs are required.
func (PostTrainingPreferenceOptimizeParamsTrainingConfig) MarshalJSON ¶
func (r PostTrainingPreferenceOptimizeParamsTrainingConfig) MarshalJSON() (data []byte, err error)
func (*PostTrainingPreferenceOptimizeParamsTrainingConfig) UnmarshalJSON ¶
func (r *PostTrainingPreferenceOptimizeParamsTrainingConfig) UnmarshalJSON(data []byte) error
type PostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig ¶
type PostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig struct { // Number of samples per training batch BatchSize int64 `json:"batch_size,required"` // Format of the dataset (instruct or dialog) // // Any of "instruct", "dialog". DataFormat string `json:"data_format,omitzero,required"` // Unique identifier for the training dataset DatasetID string `json:"dataset_id,required"` // Whether to shuffle the dataset during training Shuffle bool `json:"shuffle,required"` // (Optional) Whether to pack multiple samples into a single sequence for // efficiency Packed param.Opt[bool] `json:"packed,omitzero"` // (Optional) Whether to compute loss on input tokens as well as output tokens TrainOnInput param.Opt[bool] `json:"train_on_input,omitzero"` // (Optional) Unique identifier for the validation dataset ValidationDatasetID param.Opt[string] `json:"validation_dataset_id,omitzero"` // contains filtered or unexported fields }
(Optional) Configuration for data loading and formatting
The properties BatchSize, DataFormat, DatasetID, Shuffle are required.
func (PostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig) MarshalJSON ¶
func (r PostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig) MarshalJSON() (data []byte, err error)
func (*PostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig) UnmarshalJSON ¶
func (r *PostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig) UnmarshalJSON(data []byte) error
type PostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig ¶
type PostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig struct { // (Optional) Whether to use activation checkpointing to reduce memory usage EnableActivationCheckpointing param.Opt[bool] `json:"enable_activation_checkpointing,omitzero"` // (Optional) Whether to offload activations to CPU to save GPU memory EnableActivationOffloading param.Opt[bool] `json:"enable_activation_offloading,omitzero"` // (Optional) Whether to offload FSDP parameters to CPU FsdpCPUOffload param.Opt[bool] `json:"fsdp_cpu_offload,omitzero"` // (Optional) Whether to use memory-efficient FSDP wrapping MemoryEfficientFsdpWrap param.Opt[bool] `json:"memory_efficient_fsdp_wrap,omitzero"` // contains filtered or unexported fields }
(Optional) Configuration for memory and compute optimizations
func (PostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig) MarshalJSON ¶
func (r PostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig) MarshalJSON() (data []byte, err error)
func (*PostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig) UnmarshalJSON ¶
func (r *PostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig) UnmarshalJSON(data []byte) error
type PostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig ¶
type PostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig struct { // Learning rate for the optimizer Lr float64 `json:"lr,required"` // Number of steps for learning rate warmup NumWarmupSteps int64 `json:"num_warmup_steps,required"` // Type of optimizer to use (adam, adamw, or sgd) // // Any of "adam", "adamw", "sgd". OptimizerType string `json:"optimizer_type,omitzero,required"` // Weight decay coefficient for regularization WeightDecay float64 `json:"weight_decay,required"` // contains filtered or unexported fields }
(Optional) Configuration for the optimization algorithm
The properties Lr, NumWarmupSteps, OptimizerType, WeightDecay are required.
func (PostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig) MarshalJSON ¶
func (r PostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig) MarshalJSON() (data []byte, err error)
func (*PostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig) UnmarshalJSON ¶
func (r *PostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig) UnmarshalJSON(data []byte) error
type PostTrainingService ¶
type PostTrainingService struct { Options []option.RequestOption Job PostTrainingJobService }
PostTrainingService contains methods and other services that help with interacting with the llama-stack-client 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 NewPostTrainingService method instead.
func NewPostTrainingService ¶
func NewPostTrainingService(opts ...option.RequestOption) (r PostTrainingService)
NewPostTrainingService 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 (*PostTrainingService) PreferenceOptimize ¶
func (r *PostTrainingService) PreferenceOptimize(ctx context.Context, body PostTrainingPreferenceOptimizeParams, opts ...option.RequestOption) (res *PostTrainingJob, err error)
Run preference optimization of a model.
func (*PostTrainingService) SupervisedFineTune ¶
func (r *PostTrainingService) SupervisedFineTune(ctx context.Context, body PostTrainingSupervisedFineTuneParams, opts ...option.RequestOption) (res *PostTrainingJob, err error)
Run supervised fine-tuning of a model.
type PostTrainingSupervisedFineTuneParams ¶
type PostTrainingSupervisedFineTuneParams struct { // The hyperparam search configuration. HyperparamSearchConfig map[string]PostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion `json:"hyperparam_search_config,omitzero,required"` // The UUID of the job to create. JobUuid string `json:"job_uuid,required"` // The logger configuration. LoggerConfig map[string]PostTrainingSupervisedFineTuneParamsLoggerConfigUnion `json:"logger_config,omitzero,required"` // The training configuration. TrainingConfig PostTrainingSupervisedFineTuneParamsTrainingConfig `json:"training_config,omitzero,required"` // The directory to save checkpoint(s) to. CheckpointDir param.Opt[string] `json:"checkpoint_dir,omitzero"` // The model to fine-tune. Model param.Opt[string] `json:"model,omitzero"` // The algorithm configuration. AlgorithmConfig AlgorithmConfigUnionParam `json:"algorithm_config,omitzero"` // contains filtered or unexported fields }
func (PostTrainingSupervisedFineTuneParams) MarshalJSON ¶
func (r PostTrainingSupervisedFineTuneParams) MarshalJSON() (data []byte, err error)
func (*PostTrainingSupervisedFineTuneParams) UnmarshalJSON ¶
func (r *PostTrainingSupervisedFineTuneParams) UnmarshalJSON(data []byte) error
type PostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion ¶
type PostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion) MarshalJSON ¶
func (u PostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion) MarshalJSON() ([]byte, error)
func (*PostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion) UnmarshalJSON ¶
func (u *PostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion) UnmarshalJSON(data []byte) error
type PostTrainingSupervisedFineTuneParamsLoggerConfigUnion ¶
type PostTrainingSupervisedFineTuneParamsLoggerConfigUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (PostTrainingSupervisedFineTuneParamsLoggerConfigUnion) MarshalJSON ¶
func (u PostTrainingSupervisedFineTuneParamsLoggerConfigUnion) MarshalJSON() ([]byte, error)
func (*PostTrainingSupervisedFineTuneParamsLoggerConfigUnion) UnmarshalJSON ¶
func (u *PostTrainingSupervisedFineTuneParamsLoggerConfigUnion) UnmarshalJSON(data []byte) error
type PostTrainingSupervisedFineTuneParamsTrainingConfig ¶
type PostTrainingSupervisedFineTuneParamsTrainingConfig struct { // Number of steps to accumulate gradients before updating GradientAccumulationSteps int64 `json:"gradient_accumulation_steps,required"` // Maximum number of steps to run per epoch MaxStepsPerEpoch int64 `json:"max_steps_per_epoch,required"` // Number of training epochs to run NEpochs int64 `json:"n_epochs,required"` // (Optional) Data type for model parameters (bf16, fp16, fp32) Dtype param.Opt[string] `json:"dtype,omitzero"` // (Optional) Maximum number of validation steps per epoch MaxValidationSteps param.Opt[int64] `json:"max_validation_steps,omitzero"` // (Optional) Configuration for data loading and formatting DataConfig PostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig `json:"data_config,omitzero"` // (Optional) Configuration for memory and compute optimizations EfficiencyConfig PostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig `json:"efficiency_config,omitzero"` // (Optional) Configuration for the optimization algorithm OptimizerConfig PostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig `json:"optimizer_config,omitzero"` // contains filtered or unexported fields }
The training configuration.
The properties GradientAccumulationSteps, MaxStepsPerEpoch, NEpochs are required.
func (PostTrainingSupervisedFineTuneParamsTrainingConfig) MarshalJSON ¶
func (r PostTrainingSupervisedFineTuneParamsTrainingConfig) MarshalJSON() (data []byte, err error)
func (*PostTrainingSupervisedFineTuneParamsTrainingConfig) UnmarshalJSON ¶
func (r *PostTrainingSupervisedFineTuneParamsTrainingConfig) UnmarshalJSON(data []byte) error
type PostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig ¶
type PostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig struct { // Number of samples per training batch BatchSize int64 `json:"batch_size,required"` // Format of the dataset (instruct or dialog) // // Any of "instruct", "dialog". DataFormat string `json:"data_format,omitzero,required"` // Unique identifier for the training dataset DatasetID string `json:"dataset_id,required"` // Whether to shuffle the dataset during training Shuffle bool `json:"shuffle,required"` // (Optional) Whether to pack multiple samples into a single sequence for // efficiency Packed param.Opt[bool] `json:"packed,omitzero"` // (Optional) Whether to compute loss on input tokens as well as output tokens TrainOnInput param.Opt[bool] `json:"train_on_input,omitzero"` // (Optional) Unique identifier for the validation dataset ValidationDatasetID param.Opt[string] `json:"validation_dataset_id,omitzero"` // contains filtered or unexported fields }
(Optional) Configuration for data loading and formatting
The properties BatchSize, DataFormat, DatasetID, Shuffle are required.
func (PostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig) MarshalJSON ¶
func (r PostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig) MarshalJSON() (data []byte, err error)
func (*PostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig) UnmarshalJSON ¶
func (r *PostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig) UnmarshalJSON(data []byte) error
type PostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig ¶
type PostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig struct { // (Optional) Whether to use activation checkpointing to reduce memory usage EnableActivationCheckpointing param.Opt[bool] `json:"enable_activation_checkpointing,omitzero"` // (Optional) Whether to offload activations to CPU to save GPU memory EnableActivationOffloading param.Opt[bool] `json:"enable_activation_offloading,omitzero"` // (Optional) Whether to offload FSDP parameters to CPU FsdpCPUOffload param.Opt[bool] `json:"fsdp_cpu_offload,omitzero"` // (Optional) Whether to use memory-efficient FSDP wrapping MemoryEfficientFsdpWrap param.Opt[bool] `json:"memory_efficient_fsdp_wrap,omitzero"` // contains filtered or unexported fields }
(Optional) Configuration for memory and compute optimizations
func (PostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig) MarshalJSON ¶
func (r PostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig) MarshalJSON() (data []byte, err error)
func (*PostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig) UnmarshalJSON ¶
func (r *PostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig) UnmarshalJSON(data []byte) error
type PostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig ¶
type PostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig struct { // Learning rate for the optimizer Lr float64 `json:"lr,required"` // Number of steps for learning rate warmup NumWarmupSteps int64 `json:"num_warmup_steps,required"` // Type of optimizer to use (adam, adamw, or sgd) // // Any of "adam", "adamw", "sgd". OptimizerType string `json:"optimizer_type,omitzero,required"` // Weight decay coefficient for regularization WeightDecay float64 `json:"weight_decay,required"` // contains filtered or unexported fields }
(Optional) Configuration for the optimization algorithm
The properties Lr, NumWarmupSteps, OptimizerType, WeightDecay are required.
func (PostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig) MarshalJSON ¶
func (r PostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig) MarshalJSON() (data []byte, err error)
func (*PostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig) UnmarshalJSON ¶
func (r *PostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig) UnmarshalJSON(data []byte) error
type ProviderInfo ¶
type ProviderInfo struct { // The API name this provider implements API string `json:"api,required"` // Configuration parameters for the provider Config map[string]ProviderInfoConfigUnion `json:"config,required"` // Current health status of the provider Health map[string]ProviderInfoHealthUnion `json:"health,required"` // Unique identifier for the provider ProviderID string `json:"provider_id,required"` // The type of provider implementation ProviderType string `json:"provider_type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { API respjson.Field Config respjson.Field Health respjson.Field ProviderID respjson.Field ProviderType respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Information about a registered provider including its configuration and health status.
func (ProviderInfo) RawJSON ¶
func (r ProviderInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProviderInfo) UnmarshalJSON ¶
func (r *ProviderInfo) UnmarshalJSON(data []byte) error
type ProviderInfoConfigUnion ¶
type ProviderInfoConfigUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ProviderInfoConfigUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ProviderInfoConfigUnion) AsAnyArray ¶
func (u ProviderInfoConfigUnion) AsAnyArray() (v []any)
func (ProviderInfoConfigUnion) AsBool ¶
func (u ProviderInfoConfigUnion) AsBool() (v bool)
func (ProviderInfoConfigUnion) AsFloat ¶
func (u ProviderInfoConfigUnion) AsFloat() (v float64)
func (ProviderInfoConfigUnion) AsString ¶
func (u ProviderInfoConfigUnion) AsString() (v string)
func (ProviderInfoConfigUnion) RawJSON ¶
func (u ProviderInfoConfigUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProviderInfoConfigUnion) UnmarshalJSON ¶
func (r *ProviderInfoConfigUnion) UnmarshalJSON(data []byte) error
type ProviderInfoHealthUnion ¶
type ProviderInfoHealthUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ProviderInfoHealthUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ProviderInfoHealthUnion) AsAnyArray ¶
func (u ProviderInfoHealthUnion) AsAnyArray() (v []any)
func (ProviderInfoHealthUnion) AsBool ¶
func (u ProviderInfoHealthUnion) AsBool() (v bool)
func (ProviderInfoHealthUnion) AsFloat ¶
func (u ProviderInfoHealthUnion) AsFloat() (v float64)
func (ProviderInfoHealthUnion) AsString ¶
func (u ProviderInfoHealthUnion) AsString() (v string)
func (ProviderInfoHealthUnion) RawJSON ¶
func (u ProviderInfoHealthUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProviderInfoHealthUnion) UnmarshalJSON ¶
func (r *ProviderInfoHealthUnion) UnmarshalJSON(data []byte) error
type ProviderService ¶
type ProviderService struct {
Options []option.RequestOption
}
ProviderService contains methods and other services that help with interacting with the llama-stack-client 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) Get ¶
func (r *ProviderService) Get(ctx context.Context, providerID string, opts ...option.RequestOption) (res *ProviderInfo, err error)
Get detailed information about a specific provider.
func (*ProviderService) List ¶
func (r *ProviderService) List(ctx context.Context, opts ...option.RequestOption) (res *[]ProviderInfo, err error)
List all available providers.
type QueryChunksResponse ¶
type QueryChunksResponse struct { // List of content chunks returned from the query Chunks []QueryChunksResponseChunk `json:"chunks,required"` // Relevance scores corresponding to each returned chunk Scores []float64 `json:"scores,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Chunks respjson.Field Scores respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from querying chunks in a vector database.
func (QueryChunksResponse) RawJSON ¶
func (r QueryChunksResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*QueryChunksResponse) UnmarshalJSON ¶
func (r *QueryChunksResponse) UnmarshalJSON(data []byte) error
type QueryChunksResponseChunk ¶
type QueryChunksResponseChunk struct { // The content of the chunk, which can be interleaved text, images, or other types. Content shared.InterleavedContentUnion `json:"content,required"` // Metadata associated with the chunk that will be used in the model context during // inference. Metadata map[string]QueryChunksResponseChunkMetadataUnion `json:"metadata,required"` // Metadata for the chunk that will NOT be used in the context during inference. // The `chunk_metadata` is required backend functionality. ChunkMetadata QueryChunksResponseChunkChunkMetadata `json:"chunk_metadata"` // Optional embedding for the chunk. If not provided, it will be computed later. Embedding []float64 `json:"embedding"` // The chunk ID that is stored in the vector database. Used for backend // functionality. StoredChunkID string `json:"stored_chunk_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Metadata respjson.Field ChunkMetadata respjson.Field Embedding respjson.Field StoredChunkID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A chunk of content that can be inserted into a vector database.
func (QueryChunksResponseChunk) RawJSON ¶
func (r QueryChunksResponseChunk) RawJSON() string
Returns the unmodified JSON received from the API
func (*QueryChunksResponseChunk) UnmarshalJSON ¶
func (r *QueryChunksResponseChunk) UnmarshalJSON(data []byte) error
type QueryChunksResponseChunkChunkMetadata ¶
type QueryChunksResponseChunkChunkMetadata struct { // The dimension of the embedding vector for the chunk. ChunkEmbeddingDimension int64 `json:"chunk_embedding_dimension"` // The embedding model used to create the chunk's embedding. ChunkEmbeddingModel string `json:"chunk_embedding_model"` // The ID of the chunk. If not set, it will be generated based on the document ID // and content. ChunkID string `json:"chunk_id"` // The tokenizer used to create the chunk. Default is Tiktoken. ChunkTokenizer string `json:"chunk_tokenizer"` // The window of the chunk, which can be used to group related chunks together. ChunkWindow string `json:"chunk_window"` // The number of tokens in the content of the chunk. ContentTokenCount int64 `json:"content_token_count"` // An optional timestamp indicating when the chunk was created. CreatedTimestamp int64 `json:"created_timestamp"` // The ID of the document this chunk belongs to. DocumentID string `json:"document_id"` // The number of tokens in the metadata of the chunk. MetadataTokenCount int64 `json:"metadata_token_count"` // The source of the content, such as a URL, file path, or other identifier. Source string `json:"source"` // An optional timestamp indicating when the chunk was last updated. UpdatedTimestamp int64 `json:"updated_timestamp"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ChunkEmbeddingDimension respjson.Field ChunkEmbeddingModel respjson.Field ChunkID respjson.Field ChunkTokenizer respjson.Field ChunkWindow respjson.Field ContentTokenCount respjson.Field CreatedTimestamp respjson.Field DocumentID respjson.Field MetadataTokenCount respjson.Field Source respjson.Field UpdatedTimestamp respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Metadata for the chunk that will NOT be used in the context during inference. The `chunk_metadata` is required backend functionality.
func (QueryChunksResponseChunkChunkMetadata) RawJSON ¶
func (r QueryChunksResponseChunkChunkMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*QueryChunksResponseChunkChunkMetadata) UnmarshalJSON ¶
func (r *QueryChunksResponseChunkChunkMetadata) UnmarshalJSON(data []byte) error
type QueryChunksResponseChunkMetadataUnion ¶
type QueryChunksResponseChunkMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
QueryChunksResponseChunkMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (QueryChunksResponseChunkMetadataUnion) AsAnyArray ¶
func (u QueryChunksResponseChunkMetadataUnion) AsAnyArray() (v []any)
func (QueryChunksResponseChunkMetadataUnion) AsBool ¶
func (u QueryChunksResponseChunkMetadataUnion) AsBool() (v bool)
func (QueryChunksResponseChunkMetadataUnion) AsFloat ¶
func (u QueryChunksResponseChunkMetadataUnion) AsFloat() (v float64)
func (QueryChunksResponseChunkMetadataUnion) AsString ¶
func (u QueryChunksResponseChunkMetadataUnion) AsString() (v string)
func (QueryChunksResponseChunkMetadataUnion) RawJSON ¶
func (u QueryChunksResponseChunkMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*QueryChunksResponseChunkMetadataUnion) UnmarshalJSON ¶
func (r *QueryChunksResponseChunkMetadataUnion) UnmarshalJSON(data []byte) error
type QueryConditionOp ¶
type QueryConditionOp string
The comparison operator to apply
const ( QueryConditionOpEq QueryConditionOp = "eq" QueryConditionOpNe QueryConditionOp = "ne" QueryConditionOpGt QueryConditionOp = "gt" QueryConditionOpLt QueryConditionOp = "lt" )
type QueryConditionParam ¶
type QueryConditionParam struct { // The value to compare against Value QueryConditionValueUnionParam `json:"value,omitzero,required"` // The attribute key to filter on Key string `json:"key,required"` // The comparison operator to apply // // Any of "eq", "ne", "gt", "lt". Op QueryConditionOp `json:"op,omitzero,required"` // contains filtered or unexported fields }
A condition for filtering query results.
The properties Key, Op, Value are required.
func (QueryConditionParam) MarshalJSON ¶
func (r QueryConditionParam) MarshalJSON() (data []byte, err error)
func (*QueryConditionParam) UnmarshalJSON ¶
func (r *QueryConditionParam) UnmarshalJSON(data []byte) error
type QueryConditionValueUnionParam ¶
type QueryConditionValueUnionParam struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (QueryConditionValueUnionParam) MarshalJSON ¶
func (u QueryConditionValueUnionParam) MarshalJSON() ([]byte, error)
func (*QueryConditionValueUnionParam) UnmarshalJSON ¶
func (u *QueryConditionValueUnionParam) UnmarshalJSON(data []byte) error
type QueryConfigMode ¶
type QueryConfigMode = shared.QueryConfigMode
Search mode for retrieval—either "vector", "keyword", or "hybrid". Default "vector".
This is an alias to an internal type.
type QueryConfigParam ¶
type QueryConfigParam = shared.QueryConfigParam
Configuration for the RAG query generation.
This is an alias to an internal type.
type QueryConfigRankerRrfParam ¶
type QueryConfigRankerRrfParam = shared.QueryConfigRankerRrfParam
Reciprocal Rank Fusion (RRF) ranker configuration.
This is an alias to an internal type.
type QueryConfigRankerUnionParam ¶
type QueryConfigRankerUnionParam = shared.QueryConfigRankerUnionParam
Configuration for the ranker to use in hybrid search. Defaults to RRF ranker.
This is an alias to an internal type.
type QueryConfigRankerWeightedParam ¶
type QueryConfigRankerWeightedParam = shared.QueryConfigRankerWeightedParam
Weighted ranker configuration that combines vector and keyword scores.
This is an alias to an internal type.
type QueryGeneratorConfigDefaultParam ¶
type QueryGeneratorConfigDefaultParam = shared.QueryGeneratorConfigDefaultParam
Configuration for the default RAG query generator.
This is an alias to an internal type.
type QueryGeneratorConfigLlmParam ¶
type QueryGeneratorConfigLlmParam = shared.QueryGeneratorConfigLlmParam
Configuration for the LLM-based RAG query generator.
This is an alias to an internal type.
type QueryGeneratorConfigUnionParam ¶
type QueryGeneratorConfigUnionParam = shared.QueryGeneratorConfigUnionParam
Configuration for the default RAG query generator.
This is an alias to an internal type.
type QueryResult ¶
type QueryResult = shared.QueryResult
Result of a RAG query containing retrieved content and metadata.
This is an alias to an internal type.
type QueryResultMetadataUnion ¶
type QueryResultMetadataUnion = shared.QueryResultMetadataUnion
This is an alias to an internal type.
type QuerySpansResponse ¶
type QuerySpansResponse struct { // List of spans matching the query criteria Data []QuerySpansResponseData `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response containing a list of spans.
func (QuerySpansResponse) RawJSON ¶
func (r QuerySpansResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuerySpansResponse) UnmarshalJSON ¶
func (r *QuerySpansResponse) UnmarshalJSON(data []byte) error
type QuerySpansResponseData ¶
type QuerySpansResponseData struct { // Human-readable name describing the operation this span represents Name string `json:"name,required"` // Unique identifier for the span SpanID string `json:"span_id,required"` // Timestamp when the operation began StartTime time.Time `json:"start_time,required" format:"date-time"` // Unique identifier for the trace this span belongs to TraceID string `json:"trace_id,required"` // (Optional) Key-value pairs containing additional metadata about the span Attributes map[string]QuerySpansResponseDataAttributeUnion `json:"attributes"` // (Optional) Timestamp when the operation finished, if completed EndTime time.Time `json:"end_time" format:"date-time"` // (Optional) Unique identifier for the parent span, if this is a child span ParentSpanID string `json:"parent_span_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Name respjson.Field SpanID respjson.Field StartTime respjson.Field TraceID respjson.Field Attributes respjson.Field EndTime respjson.Field ParentSpanID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A span representing a single operation within a trace.
func (QuerySpansResponseData) RawJSON ¶
func (r QuerySpansResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuerySpansResponseData) UnmarshalJSON ¶
func (r *QuerySpansResponseData) UnmarshalJSON(data []byte) error
type QuerySpansResponseDataAttributeUnion ¶
type QuerySpansResponseDataAttributeUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
QuerySpansResponseDataAttributeUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (QuerySpansResponseDataAttributeUnion) AsAnyArray ¶
func (u QuerySpansResponseDataAttributeUnion) AsAnyArray() (v []any)
func (QuerySpansResponseDataAttributeUnion) AsBool ¶
func (u QuerySpansResponseDataAttributeUnion) AsBool() (v bool)
func (QuerySpansResponseDataAttributeUnion) AsFloat ¶
func (u QuerySpansResponseDataAttributeUnion) AsFloat() (v float64)
func (QuerySpansResponseDataAttributeUnion) AsString ¶
func (u QuerySpansResponseDataAttributeUnion) AsString() (v string)
func (QuerySpansResponseDataAttributeUnion) RawJSON ¶
func (u QuerySpansResponseDataAttributeUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuerySpansResponseDataAttributeUnion) UnmarshalJSON ¶
func (r *QuerySpansResponseDataAttributeUnion) UnmarshalJSON(data []byte) error
type ResponseFormatGrammar ¶
type ResponseFormatGrammar = shared.ResponseFormatGrammar
Configuration for grammar-guided response generation.
This is an alias to an internal type.
type ResponseFormatGrammarBnfUnion ¶
type ResponseFormatGrammarBnfUnion = shared.ResponseFormatGrammarBnfUnion
This is an alias to an internal type.
type ResponseFormatGrammarBnfUnionParam ¶
type ResponseFormatGrammarBnfUnionParam = shared.ResponseFormatGrammarBnfUnionParam
This is an alias to an internal type.
type ResponseFormatGrammarParam ¶
type ResponseFormatGrammarParam = shared.ResponseFormatGrammarParam
Configuration for grammar-guided response generation.
This is an alias to an internal type.
type ResponseFormatJsonSchema ¶
type ResponseFormatJsonSchema = shared.ResponseFormatJsonSchema
Configuration for JSON schema-guided response generation.
This is an alias to an internal type.
type ResponseFormatJsonSchemaJsonSchemaUnion ¶
type ResponseFormatJsonSchemaJsonSchemaUnion = shared.ResponseFormatJsonSchemaJsonSchemaUnion
This is an alias to an internal type.
type ResponseFormatJsonSchemaJsonSchemaUnionParam ¶
type ResponseFormatJsonSchemaJsonSchemaUnionParam = shared.ResponseFormatJsonSchemaJsonSchemaUnionParam
This is an alias to an internal type.
type ResponseFormatJsonSchemaParam ¶
type ResponseFormatJsonSchemaParam = shared.ResponseFormatJsonSchemaParam
Configuration for JSON schema-guided response generation.
This is an alias to an internal type.
type ResponseFormatUnion ¶
type ResponseFormatUnion = shared.ResponseFormatUnion
Configuration for JSON schema-guided response generation.
This is an alias to an internal type.
type ResponseFormatUnionParam ¶
type ResponseFormatUnionParam = shared.ResponseFormatUnionParam
Configuration for JSON schema-guided response generation.
This is an alias to an internal type.
type ResponseInputItemListParams ¶
type ResponseInputItemListParams struct { // An item ID to list items after, used for pagination. After param.Opt[string] `query:"after,omitzero" json:"-"` // An item ID to list items before, used for pagination. Before param.Opt[string] `query:"before,omitzero" json:"-"` // A limit on the number of objects to be returned. Limit can range between 1 and // 100, and the default is 20. Limit param.Opt[int64] `query:"limit,omitzero" json:"-"` // Additional fields to include in the response. Include []string `query:"include,omitzero" json:"-"` // The order to return the input items in. Default is desc. // // Any of "asc", "desc". Order ResponseInputItemListParamsOrder `query:"order,omitzero" json:"-"` // contains filtered or unexported fields }
func (ResponseInputItemListParams) URLQuery ¶
func (r ResponseInputItemListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ResponseInputItemListParams's query parameters as `url.Values`.
type ResponseInputItemListParamsOrder ¶
type ResponseInputItemListParamsOrder string
The order to return the input items in. Default is desc.
const ( ResponseInputItemListParamsOrderAsc ResponseInputItemListParamsOrder = "asc" ResponseInputItemListParamsOrderDesc ResponseInputItemListParamsOrder = "desc" )
type ResponseInputItemListResponse ¶
type ResponseInputItemListResponse struct { // List of input items Data []ResponseInputItemListResponseDataUnion `json:"data,required"` // Object type identifier, always "list" Object constant.List `json:"object,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field Object respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
List container for OpenAI response input items.
func (ResponseInputItemListResponse) RawJSON ¶
func (r ResponseInputItemListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponse) UnmarshalJSON ¶
func (r *ResponseInputItemListResponse) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput ¶
type ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput struct { CallID string `json:"call_id,required"` Output string `json:"output,required"` Type constant.FunctionCallOutput `json:"type,required"` ID string `json:"id"` Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { CallID respjson.Field Output respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
This represents the output of a function call that gets passed back to the model.
func (ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseMessage ¶
type ResponseInputItemListResponseDataOpenAIResponseMessage struct { Content ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion `json:"content,required"` // Any of "system", "developer", "user", "assistant". Role ResponseInputItemListResponseDataOpenAIResponseMessageRole `json:"role,required"` Type constant.Message `json:"type,required"` ID string `json:"id"` Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same "type" value, and there is no way to tell them apart in certain scenarios.
func (ResponseInputItemListResponseDataOpenAIResponseMessage) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseMessage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseMessage) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseMessage) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem struct { Annotations []ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion `json:"annotations,required"` Text string `json:"text,required"` Type constant.OutputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Annotations respjson.Field Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation struct { ContainerID string `json:"container_id,required"` EndIndex int64 `json:"end_index,required"` FileID string `json:"file_id,required"` Filename string `json:"filename,required"` StartIndex int64 `json:"start_index,required"` Type constant.ContainerFileCitation `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ContainerID respjson.Field EndIndex respjson.Field FileID respjson.Field Filename respjson.Field StartIndex respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFileCitation ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFileCitation struct { // Unique identifier of the referenced file FileID string `json:"file_id,required"` // Name of the referenced file Filename string `json:"filename,required"` // Position index of the citation within the content Index int64 `json:"index,required"` // Annotation type identifier, always "file_citation" Type constant.FileCitation `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileID respjson.Field Filename respjson.Field Index respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File citation annotation for referencing specific files in response content.
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFileCitation) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFileCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFilePath ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFilePath struct { FileID string `json:"file_id,required"` Index int64 `json:"index,required"` Type constant.FilePath `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileID respjson.Field Index respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFilePath) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFilePath) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFilePath) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFilePath) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationURLCitation ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationURLCitation struct { // End position of the citation span in the content EndIndex int64 `json:"end_index,required"` // Start position of the citation span in the content StartIndex int64 `json:"start_index,required"` // Title of the referenced web resource Title string `json:"title,required"` // Annotation type identifier, always "url_citation" Type constant.URLCitation `json:"type,required"` // URL of the referenced web resource URL string `json:"url,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EndIndex respjson.Field StartIndex respjson.Field Title respjson.Field Type respjson.Field URL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
URL citation annotation for referencing external web resources.
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationURLCitation) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationURLCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion struct { FileID string `json:"file_id"` Filename string `json:"filename"` Index int64 `json:"index"` // Any of "file_citation", "url_citation", "container_file_citation", "file_path". Type string `json:"type"` EndIndex int64 `json:"end_index"` StartIndex int64 `json:"start_index"` // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationURLCitation]. Title string `json:"title"` // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationURLCitation]. URL string `json:"url"` // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation]. ContainerID string `json:"container_id"` JSON struct { FileID respjson.Field Filename respjson.Field Index respjson.Field Type respjson.Field EndIndex respjson.Field StartIndex respjson.Field Title respjson.Field URL respjson.Field ContainerID respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion contains all possible properties and values from ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFileCitation, ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationURLCitation, ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation, ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFilePath.
Use the ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) AsAny ¶
func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) AsAny() anyResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotation
Use the following switch statement to find the correct variant
switch variant := ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion.AsAny().(type) { case llamastackclient.ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFileCitation: case llamastackclient.ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationURLCitation: case llamastackclient.ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation: case llamastackclient.ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFilePath: default: fmt.Errorf("no variant present") }
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) AsContainerFileCitation ¶
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) AsFileCitation ¶
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) AsFilePath ¶
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) AsURLCitation ¶
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) RawJSON ¶
func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemDetail ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemDetailLow ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemDetail = "low" ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemDetailHigh ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemDetail = "high" ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemDetailAuto ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemDetail = "auto" )
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage struct { // Level of detail for image processing, can be "low", "high", or "auto" // // Any of "low", "high", "auto". Detail ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImageDetail `json:"detail,required"` // Content type identifier, always "input_image" Type constant.InputImage `json:"type,required"` // (Optional) URL of the image content ImageURL string `json:"image_url"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Detail respjson.Field Type respjson.Field ImageURL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image content for input messages in OpenAI response format.
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImageDetail ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImageDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImageDetailLow ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImageDetail = "low" ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImageDetailHigh ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImageDetail = "high" ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImageDetailAuto ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImageDetail = "auto" )
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputText ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputText struct { // The text content of the input message Text string `json:"text,required"` // Content type identifier, always "input_text" Type constant.InputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content for input messages in OpenAI response format.
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputText) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputText) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputText) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion struct { // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputText]. Text string `json:"text"` // Any of "input_text", "input_image". Type string `json:"type"` // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage]. Detail ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImageDetail `json:"detail"` // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage]. ImageURL string `json:"image_url"` JSON struct { Text respjson.Field Type respjson.Field Detail respjson.Field ImageURL respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion contains all possible properties and values from ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputText, ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage.
Use the ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) AsAny ¶
func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) AsAny() anyResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem
Use the following switch statement to find the correct variant
switch variant := ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion.AsAny().(type) { case llamastackclient.ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputText: case llamastackclient.ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage: default: fmt.Errorf("no variant present") }
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) AsInputImage ¶
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) AsInputText ¶
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) RawJSON ¶
func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion] // instead of an object. OfResponseInputItemListResponseDataOpenAIResponseMessageContentArray []ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion `json:",inline"` // This field will be present if the value is a // [[]ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem] // instead of an object. OfVariant2 []ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfResponseInputItemListResponseDataOpenAIResponseMessageContentArray respjson.Field OfVariant2 respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion contains all possible properties and values from [string], [[]ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion], [[]ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfResponseInputItemListResponseDataOpenAIResponseMessageContentArray OfVariant2]
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) AsResponseInputItemListResponseDataOpenAIResponseMessageContentArray ¶
func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) AsResponseInputItemListResponseDataOpenAIResponseMessageContentArray() (v []ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion)
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) AsString ¶
func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) AsString() (v string)
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) AsVariant2 ¶
func (ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) RawJSON ¶
func (u ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseMessageRole ¶
type ResponseInputItemListResponseDataOpenAIResponseMessageRole string
const ( ResponseInputItemListResponseDataOpenAIResponseMessageRoleSystem ResponseInputItemListResponseDataOpenAIResponseMessageRole = "system" ResponseInputItemListResponseDataOpenAIResponseMessageRoleDeveloper ResponseInputItemListResponseDataOpenAIResponseMessageRole = "developer" ResponseInputItemListResponseDataOpenAIResponseMessageRoleUser ResponseInputItemListResponseDataOpenAIResponseMessageRole = "user" ResponseInputItemListResponseDataOpenAIResponseMessageRoleAssistant ResponseInputItemListResponseDataOpenAIResponseMessageRole = "assistant" )
type ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall ¶
type ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // List of search queries executed Queries []string `json:"queries,required"` // Current status of the file search operation Status string `json:"status,required"` // Tool call type identifier, always "file_search_call" Type constant.FileSearchCall `json:"type,required"` // (Optional) Search results returned by the file search operation Results []ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResult `json:"results"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Queries respjson.Field Status respjson.Field Type respjson.Field Results respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File search tool call output message for OpenAI responses.
func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResult ¶
type ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResult struct { // (Optional) Key-value attributes associated with the file Attributes map[string]ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion `json:"attributes,required"` // Unique identifier of the file containing the result FileID string `json:"file_id,required"` // Name of the file containing the result Filename string `json:"filename,required"` // Relevance score for this search result (between 0 and 1) Score float64 `json:"score,required"` // Text content of the search result Text string `json:"text,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Attributes respjson.Field FileID respjson.Field Filename respjson.Field Score respjson.Field Text respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Search results returned by the file search operation.
func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResult) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResult) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResult) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion ¶
type ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsAnyArray ¶
func (u ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsAnyArray() (v []any)
func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsBool ¶
func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsFloat ¶
func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsString ¶
func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) RawJSON ¶
func (u ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall ¶
type ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall struct { // JSON string containing the function arguments Arguments string `json:"arguments,required"` // Unique identifier for the function call CallID string `json:"call_id,required"` // Name of the function being called Name string `json:"name,required"` // Tool call type identifier, always "function_call" Type constant.FunctionCall `json:"type,required"` // (Optional) Additional identifier for the tool call ID string `json:"id"` // (Optional) Current status of the function call execution Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field CallID respjson.Field Name respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Function tool call output message for OpenAI responses.
func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataOpenAIResponseOutputMessageWebSearchToolCall ¶
type ResponseInputItemListResponseDataOpenAIResponseOutputMessageWebSearchToolCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // Current status of the web search operation Status string `json:"status,required"` // Tool call type identifier, always "web_search_call" Type constant.WebSearchCall `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Status respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Web search tool call output message for OpenAI responses.
func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageWebSearchToolCall) RawJSON ¶
func (r ResponseInputItemListResponseDataOpenAIResponseOutputMessageWebSearchToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageWebSearchToolCall) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataOpenAIResponseOutputMessageWebSearchToolCall) UnmarshalJSON(data []byte) error
type ResponseInputItemListResponseDataRole ¶
type ResponseInputItemListResponseDataRole string
const ( ResponseInputItemListResponseDataRoleSystem ResponseInputItemListResponseDataRole = "system" ResponseInputItemListResponseDataRoleDeveloper ResponseInputItemListResponseDataRole = "developer" ResponseInputItemListResponseDataRoleUser ResponseInputItemListResponseDataRole = "user" ResponseInputItemListResponseDataRoleAssistant ResponseInputItemListResponseDataRole = "assistant" )
type ResponseInputItemListResponseDataUnion ¶
type ResponseInputItemListResponseDataUnion struct { ID string `json:"id"` Status string `json:"status"` Type string `json:"type"` // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall]. Queries []string `json:"queries"` // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall]. Results []ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResult `json:"results"` // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall]. Arguments string `json:"arguments"` CallID string `json:"call_id"` // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall]. Name string `json:"name"` // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput]. Output string `json:"output"` // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseMessage]. Content ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion `json:"content"` // This field is from variant // [ResponseInputItemListResponseDataOpenAIResponseMessage]. Role ResponseInputItemListResponseDataOpenAIResponseMessageRole `json:"role"` JSON struct { ID respjson.Field Status respjson.Field Type respjson.Field Queries respjson.Field Results respjson.Field Arguments respjson.Field CallID respjson.Field Name respjson.Field Output respjson.Field Content respjson.Field Role respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseInputItemListResponseDataUnion contains all possible properties and values from ResponseInputItemListResponseDataOpenAIResponseOutputMessageWebSearchToolCall, ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall, ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall, ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput, ResponseInputItemListResponseDataOpenAIResponseMessage.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseInputFunctionToolCallOutput ¶
func (u ResponseInputItemListResponseDataUnion) AsOpenAIResponseInputFunctionToolCallOutput() (v ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput)
func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseMessage ¶
func (u ResponseInputItemListResponseDataUnion) AsOpenAIResponseMessage() (v ResponseInputItemListResponseDataOpenAIResponseMessage)
func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageFileSearchToolCall ¶
func (u ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageFileSearchToolCall() (v ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall)
func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageFunctionToolCall ¶
func (u ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageFunctionToolCall() (v ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall)
func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageWebSearchToolCall ¶
func (u ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageWebSearchToolCall() (v ResponseInputItemListResponseDataOpenAIResponseOutputMessageWebSearchToolCall)
func (ResponseInputItemListResponseDataUnion) RawJSON ¶
func (u ResponseInputItemListResponseDataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseInputItemListResponseDataUnion) UnmarshalJSON ¶
func (r *ResponseInputItemListResponseDataUnion) UnmarshalJSON(data []byte) error
type ResponseInputItemService ¶
type ResponseInputItemService struct {
Options []option.RequestOption
}
ResponseInputItemService contains methods and other services that help with interacting with the llama-stack-client 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, query ResponseInputItemListParams, opts ...option.RequestOption) (res *ResponseInputItemListResponse, err error)
List input items for a given OpenAI response.
type ResponseListParams ¶
type ResponseListParams struct { // The ID of the last response to return. After param.Opt[string] `query:"after,omitzero" json:"-"` // The number of responses to return. Limit param.Opt[int64] `query:"limit,omitzero" json:"-"` // The model to filter responses by. Model param.Opt[string] `query:"model,omitzero" json:"-"` // The order to sort responses by when sorted by created_at ('asc' or 'desc'). // // Any of "asc", "desc". Order ResponseListParamsOrder `query:"order,omitzero" json:"-"` // contains filtered or unexported fields }
func (ResponseListParams) URLQuery ¶
func (r ResponseListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ResponseListParams's query parameters as `url.Values`.
type ResponseListParamsOrder ¶
type ResponseListParamsOrder string
The order to sort responses by when sorted by created_at ('asc' or 'desc').
const ( ResponseListParamsOrderAsc ResponseListParamsOrder = "asc" ResponseListParamsOrderDesc ResponseListParamsOrder = "desc" )
type ResponseListResponse ¶
type ResponseListResponse struct { // Unique identifier for this response ID string `json:"id,required"` // Unix timestamp when the response was created CreatedAt int64 `json:"created_at,required"` // List of input items that led to this response Input []ResponseListResponseInputUnion `json:"input,required"` // Model identifier used for generation Model string `json:"model,required"` // Object type identifier, always "response" Object constant.Response `json:"object,required"` // List of generated output items (messages, tool calls, etc.) Output []ResponseListResponseOutputUnion `json:"output,required"` // Whether tool calls can be executed in parallel ParallelToolCalls bool `json:"parallel_tool_calls,required"` // Current status of the response generation Status string `json:"status,required"` // Text formatting configuration for the response Text ResponseListResponseText `json:"text,required"` // (Optional) Error details if the response generation failed Error ResponseListResponseError `json:"error"` // (Optional) ID of the previous response in a conversation PreviousResponseID string `json:"previous_response_id"` // (Optional) Sampling temperature used for generation Temperature float64 `json:"temperature"` // (Optional) Nucleus sampling parameter used for generation TopP float64 `json:"top_p"` // (Optional) Truncation strategy applied to the response Truncation string `json:"truncation"` // (Optional) User identifier associated with the request User string `json:"user"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field CreatedAt respjson.Field Input respjson.Field Model respjson.Field Object respjson.Field Output respjson.Field ParallelToolCalls respjson.Field Status respjson.Field Text respjson.Field Error respjson.Field PreviousResponseID respjson.Field Temperature respjson.Field TopP respjson.Field Truncation respjson.Field User respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
OpenAI response object extended with input context information.
func (ResponseListResponse) RawJSON ¶
func (r ResponseListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponse) UnmarshalJSON ¶
func (r *ResponseListResponse) UnmarshalJSON(data []byte) error
type ResponseListResponseError ¶
type ResponseListResponseError struct { // Error code identifying the type of failure Code string `json:"code,required"` // Human-readable error message describing the failure Message string `json:"message,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Code respjson.Field Message respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Error details if the response generation failed
func (ResponseListResponseError) RawJSON ¶
func (r ResponseListResponseError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseError) UnmarshalJSON ¶
func (r *ResponseListResponseError) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput ¶
type ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput struct { CallID string `json:"call_id,required"` Output string `json:"output,required"` Type constant.FunctionCallOutput `json:"type,required"` ID string `json:"id"` Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { CallID respjson.Field Output respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
This represents the output of a function call that gets passed back to the model.
func (ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseMessage ¶
type ResponseListResponseInputOpenAIResponseMessage struct { Content ResponseListResponseInputOpenAIResponseMessageContentUnion `json:"content,required"` // Any of "system", "developer", "user", "assistant". Role ResponseListResponseInputOpenAIResponseMessageRole `json:"role,required"` Type constant.Message `json:"type,required"` ID string `json:"id"` Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same "type" value, and there is no way to tell them apart in certain scenarios.
func (ResponseListResponseInputOpenAIResponseMessage) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseMessage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseMessage) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseMessage) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseMessageContentArrayItem ¶
type ResponseListResponseInputOpenAIResponseMessageContentArrayItem struct { Annotations []ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion `json:"annotations,required"` Text string `json:"text,required"` Type constant.OutputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Annotations respjson.Field Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItem) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseMessageContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItem) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseMessageContentArrayItem) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation ¶
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation struct { ContainerID string `json:"container_id,required"` EndIndex int64 `json:"end_index,required"` FileID string `json:"file_id,required"` Filename string `json:"filename,required"` StartIndex int64 `json:"start_index,required"` Type constant.ContainerFileCitation `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ContainerID respjson.Field EndIndex respjson.Field FileID respjson.Field Filename respjson.Field StartIndex respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFileCitation ¶
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFileCitation struct { // Unique identifier of the referenced file FileID string `json:"file_id,required"` // Name of the referenced file Filename string `json:"filename,required"` // Position index of the citation within the content Index int64 `json:"index,required"` // Annotation type identifier, always "file_citation" Type constant.FileCitation `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileID respjson.Field Filename respjson.Field Index respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File citation annotation for referencing specific files in response content.
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFileCitation) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFileCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFilePath ¶
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFilePath struct { FileID string `json:"file_id,required"` Index int64 `json:"index,required"` Type constant.FilePath `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileID respjson.Field Index respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFilePath) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFilePath) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFilePath) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFilePath) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationURLCitation ¶
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationURLCitation struct { // End position of the citation span in the content EndIndex int64 `json:"end_index,required"` // Start position of the citation span in the content StartIndex int64 `json:"start_index,required"` // Title of the referenced web resource Title string `json:"title,required"` // Annotation type identifier, always "url_citation" Type constant.URLCitation `json:"type,required"` // URL of the referenced web resource URL string `json:"url,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EndIndex respjson.Field StartIndex respjson.Field Title respjson.Field Type respjson.Field URL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
URL citation annotation for referencing external web resources.
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationURLCitation) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationURLCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion ¶
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion struct { FileID string `json:"file_id"` Filename string `json:"filename"` Index int64 `json:"index"` // Any of "file_citation", "url_citation", "container_file_citation", "file_path". Type string `json:"type"` EndIndex int64 `json:"end_index"` StartIndex int64 `json:"start_index"` // This field is from variant // [ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationURLCitation]. Title string `json:"title"` // This field is from variant // [ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationURLCitation]. URL string `json:"url"` // This field is from variant // [ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation]. ContainerID string `json:"container_id"` JSON struct { FileID respjson.Field Filename respjson.Field Index respjson.Field Type respjson.Field EndIndex respjson.Field StartIndex respjson.Field Title respjson.Field URL respjson.Field ContainerID respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion contains all possible properties and values from ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFileCitation, ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationURLCitation, ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation, ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFilePath.
Use the ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsAny ¶
func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsAny() anyResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotation
Use the following switch statement to find the correct variant
switch variant := ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion.AsAny().(type) { case llamastackclient.ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFileCitation: case llamastackclient.ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationURLCitation: case llamastackclient.ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation: case llamastackclient.ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFilePath: default: fmt.Errorf("no variant present") }
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsContainerFileCitation ¶
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsFileCitation ¶
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsFilePath ¶
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsURLCitation ¶
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) RawJSON ¶
func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemDetail ¶
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseListResponseInputOpenAIResponseMessageContentArrayItemDetailLow ResponseListResponseInputOpenAIResponseMessageContentArrayItemDetail = "low" ResponseListResponseInputOpenAIResponseMessageContentArrayItemDetailHigh ResponseListResponseInputOpenAIResponseMessageContentArrayItemDetail = "high" ResponseListResponseInputOpenAIResponseMessageContentArrayItemDetailAuto ResponseListResponseInputOpenAIResponseMessageContentArrayItemDetail = "auto" )
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage ¶
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage struct { // Level of detail for image processing, can be "low", "high", or "auto" // // Any of "low", "high", "auto". Detail ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImageDetail `json:"detail,required"` // Content type identifier, always "input_image" Type constant.InputImage `json:"type,required"` // (Optional) URL of the image content ImageURL string `json:"image_url"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Detail respjson.Field Type respjson.Field ImageURL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image content for input messages in OpenAI response format.
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImageDetail ¶
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImageDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImageDetailLow ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImageDetail = "low" ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImageDetailHigh ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImageDetail = "high" ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImageDetailAuto ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImageDetail = "auto" )
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText ¶
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText struct { // The text content of the input message Text string `json:"text,required"` // Content type identifier, always "input_text" Type constant.InputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content for input messages in OpenAI response format.
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion ¶
type ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion struct { // This field is from variant // [ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText]. Text string `json:"text"` // Any of "input_text", "input_image". Type string `json:"type"` // This field is from variant // [ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage]. Detail ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImageDetail `json:"detail"` // This field is from variant // [ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage]. ImageURL string `json:"image_url"` JSON struct { Text respjson.Field Type respjson.Field Detail respjson.Field ImageURL respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion contains all possible properties and values from ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText, ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage.
Use the ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) AsAny ¶
func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) AsAny() anyResponseListResponseInputOpenAIResponseMessageContentArrayItem
Use the following switch statement to find the correct variant
switch variant := ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion.AsAny().(type) { case llamastackclient.ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText: case llamastackclient.ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage: default: fmt.Errorf("no variant present") }
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) AsInputImage ¶
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) AsInputText ¶
func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) RawJSON ¶
func (u ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseMessageContentUnion ¶
type ResponseListResponseInputOpenAIResponseMessageContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion] instead // of an object. OfResponseListResponseInputOpenAIResponseMessageContentArray []ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion `json:",inline"` // This field will be present if the value is a // [[]ResponseListResponseInputOpenAIResponseMessageContentArrayItem] instead of an // object. OfVariant2 []ResponseListResponseInputOpenAIResponseMessageContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfResponseListResponseInputOpenAIResponseMessageContentArray respjson.Field OfVariant2 respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseListResponseInputOpenAIResponseMessageContentUnion contains all possible properties and values from [string], [[]ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion], [[]ResponseListResponseInputOpenAIResponseMessageContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfResponseListResponseInputOpenAIResponseMessageContentArray OfVariant2]
func (ResponseListResponseInputOpenAIResponseMessageContentUnion) AsResponseListResponseInputOpenAIResponseMessageContentArray ¶
func (u ResponseListResponseInputOpenAIResponseMessageContentUnion) AsResponseListResponseInputOpenAIResponseMessageContentArray() (v []ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion)
func (ResponseListResponseInputOpenAIResponseMessageContentUnion) AsString ¶
func (u ResponseListResponseInputOpenAIResponseMessageContentUnion) AsString() (v string)
func (ResponseListResponseInputOpenAIResponseMessageContentUnion) AsVariant2 ¶
func (ResponseListResponseInputOpenAIResponseMessageContentUnion) RawJSON ¶
func (u ResponseListResponseInputOpenAIResponseMessageContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseMessageContentUnion) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseMessageContentUnion) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseMessageRole ¶
type ResponseListResponseInputOpenAIResponseMessageRole string
const ( ResponseListResponseInputOpenAIResponseMessageRoleSystem ResponseListResponseInputOpenAIResponseMessageRole = "system" ResponseListResponseInputOpenAIResponseMessageRoleDeveloper ResponseListResponseInputOpenAIResponseMessageRole = "developer" ResponseListResponseInputOpenAIResponseMessageRoleUser ResponseListResponseInputOpenAIResponseMessageRole = "user" ResponseListResponseInputOpenAIResponseMessageRoleAssistant ResponseListResponseInputOpenAIResponseMessageRole = "assistant" )
type ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall ¶
type ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // List of search queries executed Queries []string `json:"queries,required"` // Current status of the file search operation Status string `json:"status,required"` // Tool call type identifier, always "file_search_call" Type constant.FileSearchCall `json:"type,required"` // (Optional) Search results returned by the file search operation Results []ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResult `json:"results"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Queries respjson.Field Status respjson.Field Type respjson.Field Results respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File search tool call output message for OpenAI responses.
func (ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResult ¶
type ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResult struct { // (Optional) Key-value attributes associated with the file Attributes map[string]ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion `json:"attributes,required"` // Unique identifier of the file containing the result FileID string `json:"file_id,required"` // Name of the file containing the result Filename string `json:"filename,required"` // Relevance score for this search result (between 0 and 1) Score float64 `json:"score,required"` // Text content of the search result Text string `json:"text,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Attributes respjson.Field FileID respjson.Field Filename respjson.Field Score respjson.Field Text respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Search results returned by the file search operation.
func (ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResult) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResult) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResult) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion ¶
type ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsAnyArray ¶
func (u ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsAnyArray() (v []any)
func (ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsBool ¶
func (ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsFloat ¶
func (ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsString ¶
func (u ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsString() (v string)
func (ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) RawJSON ¶
func (u ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall ¶
type ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall struct { // JSON string containing the function arguments Arguments string `json:"arguments,required"` // Unique identifier for the function call CallID string `json:"call_id,required"` // Name of the function being called Name string `json:"name,required"` // Tool call type identifier, always "function_call" Type constant.FunctionCall `json:"type,required"` // (Optional) Additional identifier for the tool call ID string `json:"id"` // (Optional) Current status of the function call execution Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field CallID respjson.Field Name respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Function tool call output message for OpenAI responses.
func (ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall) UnmarshalJSON(data []byte) error
type ResponseListResponseInputOpenAIResponseOutputMessageWebSearchToolCall ¶
type ResponseListResponseInputOpenAIResponseOutputMessageWebSearchToolCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // Current status of the web search operation Status string `json:"status,required"` // Tool call type identifier, always "web_search_call" Type constant.WebSearchCall `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Status respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Web search tool call output message for OpenAI responses.
func (ResponseListResponseInputOpenAIResponseOutputMessageWebSearchToolCall) RawJSON ¶
func (r ResponseListResponseInputOpenAIResponseOutputMessageWebSearchToolCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputOpenAIResponseOutputMessageWebSearchToolCall) UnmarshalJSON ¶
func (r *ResponseListResponseInputOpenAIResponseOutputMessageWebSearchToolCall) UnmarshalJSON(data []byte) error
type ResponseListResponseInputRole ¶
type ResponseListResponseInputRole string
const ( ResponseListResponseInputRoleSystem ResponseListResponseInputRole = "system" ResponseListResponseInputRoleDeveloper ResponseListResponseInputRole = "developer" ResponseListResponseInputRoleUser ResponseListResponseInputRole = "user" ResponseListResponseInputRoleAssistant ResponseListResponseInputRole = "assistant" )
type ResponseListResponseInputUnion ¶
type ResponseListResponseInputUnion struct { ID string `json:"id"` Status string `json:"status"` Type string `json:"type"` // This field is from variant // [ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall]. Queries []string `json:"queries"` // This field is from variant // [ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall]. Results []ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResult `json:"results"` // This field is from variant // [ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall]. Arguments string `json:"arguments"` CallID string `json:"call_id"` // This field is from variant // [ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall]. Name string `json:"name"` // This field is from variant // [ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput]. Output string `json:"output"` // This field is from variant [ResponseListResponseInputOpenAIResponseMessage]. Content ResponseListResponseInputOpenAIResponseMessageContentUnion `json:"content"` // This field is from variant [ResponseListResponseInputOpenAIResponseMessage]. Role ResponseListResponseInputOpenAIResponseMessageRole `json:"role"` JSON struct { ID respjson.Field Status respjson.Field Type respjson.Field Queries respjson.Field Results respjson.Field Arguments respjson.Field CallID respjson.Field Name respjson.Field Output respjson.Field Content respjson.Field Role respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseListResponseInputUnion contains all possible properties and values from ResponseListResponseInputOpenAIResponseOutputMessageWebSearchToolCall, ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall, ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall, ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput, ResponseListResponseInputOpenAIResponseMessage.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseListResponseInputUnion) AsOpenAIResponseInputFunctionToolCallOutput ¶
func (u ResponseListResponseInputUnion) AsOpenAIResponseInputFunctionToolCallOutput() (v ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput)
func (ResponseListResponseInputUnion) AsOpenAIResponseMessage ¶
func (u ResponseListResponseInputUnion) AsOpenAIResponseMessage() (v ResponseListResponseInputOpenAIResponseMessage)
func (ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageFileSearchToolCall ¶
func (u ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageFileSearchToolCall() (v ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall)
func (ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageFunctionToolCall ¶
func (u ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageFunctionToolCall() (v ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall)
func (ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageWebSearchToolCall ¶
func (u ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageWebSearchToolCall() (v ResponseListResponseInputOpenAIResponseOutputMessageWebSearchToolCall)
func (ResponseListResponseInputUnion) RawJSON ¶
func (u ResponseListResponseInputUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseInputUnion) UnmarshalJSON ¶
func (r *ResponseListResponseInputUnion) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputFileSearchCall ¶
type ResponseListResponseOutputFileSearchCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // List of search queries executed Queries []string `json:"queries,required"` // Current status of the file search operation Status string `json:"status,required"` // Tool call type identifier, always "file_search_call" Type constant.FileSearchCall `json:"type,required"` // (Optional) Search results returned by the file search operation Results []ResponseListResponseOutputFileSearchCallResult `json:"results"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Queries respjson.Field Status respjson.Field Type respjson.Field Results respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File search tool call output message for OpenAI responses.
func (ResponseListResponseOutputFileSearchCall) RawJSON ¶
func (r ResponseListResponseOutputFileSearchCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputFileSearchCall) UnmarshalJSON ¶
func (r *ResponseListResponseOutputFileSearchCall) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputFileSearchCallResult ¶
type ResponseListResponseOutputFileSearchCallResult struct { // (Optional) Key-value attributes associated with the file Attributes map[string]ResponseListResponseOutputFileSearchCallResultAttributeUnion `json:"attributes,required"` // Unique identifier of the file containing the result FileID string `json:"file_id,required"` // Name of the file containing the result Filename string `json:"filename,required"` // Relevance score for this search result (between 0 and 1) Score float64 `json:"score,required"` // Text content of the search result Text string `json:"text,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Attributes respjson.Field FileID respjson.Field Filename respjson.Field Score respjson.Field Text respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Search results returned by the file search operation.
func (ResponseListResponseOutputFileSearchCallResult) RawJSON ¶
func (r ResponseListResponseOutputFileSearchCallResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputFileSearchCallResult) UnmarshalJSON ¶
func (r *ResponseListResponseOutputFileSearchCallResult) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputFileSearchCallResultAttributeUnion ¶
type ResponseListResponseOutputFileSearchCallResultAttributeUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseListResponseOutputFileSearchCallResultAttributeUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsAnyArray ¶
func (u ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsAnyArray() (v []any)
func (ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsBool ¶
func (u ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsBool() (v bool)
func (ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsFloat ¶
func (u ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsFloat() (v float64)
func (ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsString ¶
func (u ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsString() (v string)
func (ResponseListResponseOutputFileSearchCallResultAttributeUnion) RawJSON ¶
func (u ResponseListResponseOutputFileSearchCallResultAttributeUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputFileSearchCallResultAttributeUnion) UnmarshalJSON ¶
func (r *ResponseListResponseOutputFileSearchCallResultAttributeUnion) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputFunctionCall ¶
type ResponseListResponseOutputFunctionCall struct { // JSON string containing the function arguments Arguments string `json:"arguments,required"` // Unique identifier for the function call CallID string `json:"call_id,required"` // Name of the function being called Name string `json:"name,required"` // Tool call type identifier, always "function_call" Type constant.FunctionCall `json:"type,required"` // (Optional) Additional identifier for the tool call ID string `json:"id"` // (Optional) Current status of the function call execution Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field CallID respjson.Field Name respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Function tool call output message for OpenAI responses.
func (ResponseListResponseOutputFunctionCall) RawJSON ¶
func (r ResponseListResponseOutputFunctionCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputFunctionCall) UnmarshalJSON ¶
func (r *ResponseListResponseOutputFunctionCall) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMcpCall ¶
type ResponseListResponseOutputMcpCall struct { // Unique identifier for this MCP call ID string `json:"id,required"` // JSON string containing the MCP call arguments Arguments string `json:"arguments,required"` // Name of the MCP method being called Name string `json:"name,required"` // Label identifying the MCP server handling the call ServerLabel string `json:"server_label,required"` // Tool call type identifier, always "mcp_call" Type constant.McpCall `json:"type,required"` // (Optional) Error message if the MCP call failed Error string `json:"error"` // (Optional) Output result from the successful MCP call Output string `json:"output"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Arguments respjson.Field Name respjson.Field ServerLabel respjson.Field Type respjson.Field Error respjson.Field Output respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Model Context Protocol (MCP) call output message for OpenAI responses.
func (ResponseListResponseOutputMcpCall) RawJSON ¶
func (r ResponseListResponseOutputMcpCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMcpCall) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMcpCall) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMcpListTools ¶
type ResponseListResponseOutputMcpListTools struct { // Unique identifier for this MCP list tools operation ID string `json:"id,required"` // Label identifying the MCP server providing the tools ServerLabel string `json:"server_label,required"` // List of available tools provided by the MCP server Tools []ResponseListResponseOutputMcpListToolsTool `json:"tools,required"` // Tool call type identifier, always "mcp_list_tools" Type constant.McpListTools `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field ServerLabel respjson.Field Tools respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
MCP list tools output message containing available tools from an MCP server.
func (ResponseListResponseOutputMcpListTools) RawJSON ¶
func (r ResponseListResponseOutputMcpListTools) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMcpListTools) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMcpListTools) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMcpListToolsTool ¶
type ResponseListResponseOutputMcpListToolsTool struct { // JSON schema defining the tool's input parameters InputSchema map[string]ResponseListResponseOutputMcpListToolsToolInputSchemaUnion `json:"input_schema,required"` // Name of the tool Name string `json:"name,required"` // (Optional) Description of what the tool does Description string `json:"description"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { InputSchema respjson.Field Name respjson.Field Description respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Tool definition returned by MCP list tools operation.
func (ResponseListResponseOutputMcpListToolsTool) RawJSON ¶
func (r ResponseListResponseOutputMcpListToolsTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMcpListToolsTool) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMcpListToolsTool) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMcpListToolsToolInputSchemaUnion ¶
type ResponseListResponseOutputMcpListToolsToolInputSchemaUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseListResponseOutputMcpListToolsToolInputSchemaUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsAnyArray ¶
func (u ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsAnyArray() (v []any)
func (ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsBool ¶
func (u ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsBool() (v bool)
func (ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsFloat ¶
func (u ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsFloat() (v float64)
func (ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsString ¶
func (u ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsString() (v string)
func (ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) RawJSON ¶
func (u ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMessage ¶
type ResponseListResponseOutputMessage struct { Content ResponseListResponseOutputMessageContentUnion `json:"content,required"` // Any of "system", "developer", "user", "assistant". Role ResponseListResponseOutputMessageRole `json:"role,required"` Type constant.Message `json:"type,required"` ID string `json:"id"` Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same "type" value, and there is no way to tell them apart in certain scenarios.
func (ResponseListResponseOutputMessage) RawJSON ¶
func (r ResponseListResponseOutputMessage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMessage) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMessage) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMessageContentArrayItem ¶
type ResponseListResponseOutputMessageContentArrayItem struct { Annotations []ResponseListResponseOutputMessageContentArrayItemAnnotationUnion `json:"annotations,required"` Text string `json:"text,required"` Type constant.OutputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Annotations respjson.Field Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseListResponseOutputMessageContentArrayItem) RawJSON ¶
func (r ResponseListResponseOutputMessageContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMessageContentArrayItem) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMessageContentArrayItem) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMessageContentArrayItemAnnotationContainerFileCitation ¶
type ResponseListResponseOutputMessageContentArrayItemAnnotationContainerFileCitation struct { ContainerID string `json:"container_id,required"` EndIndex int64 `json:"end_index,required"` FileID string `json:"file_id,required"` Filename string `json:"filename,required"` StartIndex int64 `json:"start_index,required"` Type constant.ContainerFileCitation `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ContainerID respjson.Field EndIndex respjson.Field FileID respjson.Field Filename respjson.Field StartIndex respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseListResponseOutputMessageContentArrayItemAnnotationContainerFileCitation) RawJSON ¶
func (r ResponseListResponseOutputMessageContentArrayItemAnnotationContainerFileCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMessageContentArrayItemAnnotationFileCitation ¶
type ResponseListResponseOutputMessageContentArrayItemAnnotationFileCitation struct { // Unique identifier of the referenced file FileID string `json:"file_id,required"` // Name of the referenced file Filename string `json:"filename,required"` // Position index of the citation within the content Index int64 `json:"index,required"` // Annotation type identifier, always "file_citation" Type constant.FileCitation `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileID respjson.Field Filename respjson.Field Index respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File citation annotation for referencing specific files in response content.
func (ResponseListResponseOutputMessageContentArrayItemAnnotationFileCitation) RawJSON ¶
func (r ResponseListResponseOutputMessageContentArrayItemAnnotationFileCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMessageContentArrayItemAnnotationFilePath ¶
type ResponseListResponseOutputMessageContentArrayItemAnnotationFilePath struct { FileID string `json:"file_id,required"` Index int64 `json:"index,required"` Type constant.FilePath `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileID respjson.Field Index respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseListResponseOutputMessageContentArrayItemAnnotationFilePath) RawJSON ¶
func (r ResponseListResponseOutputMessageContentArrayItemAnnotationFilePath) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMessageContentArrayItemAnnotationFilePath) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMessageContentArrayItemAnnotationFilePath) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation ¶
type ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation struct { // End position of the citation span in the content EndIndex int64 `json:"end_index,required"` // Start position of the citation span in the content StartIndex int64 `json:"start_index,required"` // Title of the referenced web resource Title string `json:"title,required"` // Annotation type identifier, always "url_citation" Type constant.URLCitation `json:"type,required"` // URL of the referenced web resource URL string `json:"url,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EndIndex respjson.Field StartIndex respjson.Field Title respjson.Field Type respjson.Field URL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
URL citation annotation for referencing external web resources.
func (ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation) RawJSON ¶
func (r ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMessageContentArrayItemAnnotationUnion ¶
type ResponseListResponseOutputMessageContentArrayItemAnnotationUnion struct { FileID string `json:"file_id"` Filename string `json:"filename"` Index int64 `json:"index"` // Any of "file_citation", "url_citation", "container_file_citation", "file_path". Type string `json:"type"` EndIndex int64 `json:"end_index"` StartIndex int64 `json:"start_index"` // This field is from variant // [ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation]. Title string `json:"title"` // This field is from variant // [ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation]. URL string `json:"url"` // This field is from variant // [ResponseListResponseOutputMessageContentArrayItemAnnotationContainerFileCitation]. ContainerID string `json:"container_id"` JSON struct { FileID respjson.Field Filename respjson.Field Index respjson.Field Type respjson.Field EndIndex respjson.Field StartIndex respjson.Field Title respjson.Field URL respjson.Field ContainerID respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseListResponseOutputMessageContentArrayItemAnnotationUnion contains all possible properties and values from ResponseListResponseOutputMessageContentArrayItemAnnotationFileCitation, ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation, ResponseListResponseOutputMessageContentArrayItemAnnotationContainerFileCitation, ResponseListResponseOutputMessageContentArrayItemAnnotationFilePath.
Use the ResponseListResponseOutputMessageContentArrayItemAnnotationUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsAny ¶
func (u ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsAny() anyResponseListResponseOutputMessageContentArrayItemAnnotation
Use the following switch statement to find the correct variant
switch variant := ResponseListResponseOutputMessageContentArrayItemAnnotationUnion.AsAny().(type) { case llamastackclient.ResponseListResponseOutputMessageContentArrayItemAnnotationFileCitation: case llamastackclient.ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation: case llamastackclient.ResponseListResponseOutputMessageContentArrayItemAnnotationContainerFileCitation: case llamastackclient.ResponseListResponseOutputMessageContentArrayItemAnnotationFilePath: default: fmt.Errorf("no variant present") }
func (ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsContainerFileCitation ¶
func (u ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsContainerFileCitation() (v ResponseListResponseOutputMessageContentArrayItemAnnotationContainerFileCitation)
func (ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsFileCitation ¶
func (ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsFilePath ¶
func (ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsURLCitation ¶
func (ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) RawJSON ¶
func (u ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMessageContentArrayItemDetail ¶
type ResponseListResponseOutputMessageContentArrayItemDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseListResponseOutputMessageContentArrayItemDetailLow ResponseListResponseOutputMessageContentArrayItemDetail = "low" ResponseListResponseOutputMessageContentArrayItemDetailHigh ResponseListResponseOutputMessageContentArrayItemDetail = "high" ResponseListResponseOutputMessageContentArrayItemDetailAuto ResponseListResponseOutputMessageContentArrayItemDetail = "auto" )
type ResponseListResponseOutputMessageContentArrayItemInputImage ¶
type ResponseListResponseOutputMessageContentArrayItemInputImage struct { // Level of detail for image processing, can be "low", "high", or "auto" // // Any of "low", "high", "auto". Detail ResponseListResponseOutputMessageContentArrayItemInputImageDetail `json:"detail,required"` // Content type identifier, always "input_image" Type constant.InputImage `json:"type,required"` // (Optional) URL of the image content ImageURL string `json:"image_url"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Detail respjson.Field Type respjson.Field ImageURL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image content for input messages in OpenAI response format.
func (ResponseListResponseOutputMessageContentArrayItemInputImage) RawJSON ¶
func (r ResponseListResponseOutputMessageContentArrayItemInputImage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMessageContentArrayItemInputImage) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMessageContentArrayItemInputImage) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMessageContentArrayItemInputImageDetail ¶
type ResponseListResponseOutputMessageContentArrayItemInputImageDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseListResponseOutputMessageContentArrayItemInputImageDetailLow ResponseListResponseOutputMessageContentArrayItemInputImageDetail = "low" ResponseListResponseOutputMessageContentArrayItemInputImageDetailHigh ResponseListResponseOutputMessageContentArrayItemInputImageDetail = "high" ResponseListResponseOutputMessageContentArrayItemInputImageDetailAuto ResponseListResponseOutputMessageContentArrayItemInputImageDetail = "auto" )
type ResponseListResponseOutputMessageContentArrayItemInputText ¶
type ResponseListResponseOutputMessageContentArrayItemInputText struct { // The text content of the input message Text string `json:"text,required"` // Content type identifier, always "input_text" Type constant.InputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content for input messages in OpenAI response format.
func (ResponseListResponseOutputMessageContentArrayItemInputText) RawJSON ¶
func (r ResponseListResponseOutputMessageContentArrayItemInputText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMessageContentArrayItemInputText) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMessageContentArrayItemInputText) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMessageContentArrayItemUnion ¶
type ResponseListResponseOutputMessageContentArrayItemUnion struct { // This field is from variant // [ResponseListResponseOutputMessageContentArrayItemInputText]. Text string `json:"text"` // Any of "input_text", "input_image". Type string `json:"type"` // This field is from variant // [ResponseListResponseOutputMessageContentArrayItemInputImage]. Detail ResponseListResponseOutputMessageContentArrayItemInputImageDetail `json:"detail"` // This field is from variant // [ResponseListResponseOutputMessageContentArrayItemInputImage]. ImageURL string `json:"image_url"` JSON struct { Text respjson.Field Type respjson.Field Detail respjson.Field ImageURL respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseListResponseOutputMessageContentArrayItemUnion contains all possible properties and values from ResponseListResponseOutputMessageContentArrayItemInputText, ResponseListResponseOutputMessageContentArrayItemInputImage.
Use the ResponseListResponseOutputMessageContentArrayItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseListResponseOutputMessageContentArrayItemUnion) AsAny ¶
func (u ResponseListResponseOutputMessageContentArrayItemUnion) AsAny() anyResponseListResponseOutputMessageContentArrayItem
Use the following switch statement to find the correct variant
switch variant := ResponseListResponseOutputMessageContentArrayItemUnion.AsAny().(type) { case llamastackclient.ResponseListResponseOutputMessageContentArrayItemInputText: case llamastackclient.ResponseListResponseOutputMessageContentArrayItemInputImage: default: fmt.Errorf("no variant present") }
func (ResponseListResponseOutputMessageContentArrayItemUnion) AsInputImage ¶
func (u ResponseListResponseOutputMessageContentArrayItemUnion) AsInputImage() (v ResponseListResponseOutputMessageContentArrayItemInputImage)
func (ResponseListResponseOutputMessageContentArrayItemUnion) AsInputText ¶
func (u ResponseListResponseOutputMessageContentArrayItemUnion) AsInputText() (v ResponseListResponseOutputMessageContentArrayItemInputText)
func (ResponseListResponseOutputMessageContentArrayItemUnion) RawJSON ¶
func (u ResponseListResponseOutputMessageContentArrayItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMessageContentArrayItemUnion) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMessageContentUnion ¶
type ResponseListResponseOutputMessageContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ResponseListResponseOutputMessageContentArrayItemUnion] instead of an object. OfResponseListResponseOutputMessageContentArray []ResponseListResponseOutputMessageContentArrayItemUnion `json:",inline"` // This field will be present if the value is a // [[]ResponseListResponseOutputMessageContentArrayItem] instead of an object. OfVariant2 []ResponseListResponseOutputMessageContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfResponseListResponseOutputMessageContentArray respjson.Field OfVariant2 respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseListResponseOutputMessageContentUnion contains all possible properties and values from [string], [[]ResponseListResponseOutputMessageContentArrayItemUnion], [[]ResponseListResponseOutputMessageContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfResponseListResponseOutputMessageContentArray OfVariant2]
func (ResponseListResponseOutputMessageContentUnion) AsResponseListResponseOutputMessageContentArray ¶
func (u ResponseListResponseOutputMessageContentUnion) AsResponseListResponseOutputMessageContentArray() (v []ResponseListResponseOutputMessageContentArrayItemUnion)
func (ResponseListResponseOutputMessageContentUnion) AsString ¶
func (u ResponseListResponseOutputMessageContentUnion) AsString() (v string)
func (ResponseListResponseOutputMessageContentUnion) AsVariant2 ¶
func (u ResponseListResponseOutputMessageContentUnion) AsVariant2() (v []ResponseListResponseOutputMessageContentArrayItem)
func (ResponseListResponseOutputMessageContentUnion) RawJSON ¶
func (u ResponseListResponseOutputMessageContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputMessageContentUnion) UnmarshalJSON ¶
func (r *ResponseListResponseOutputMessageContentUnion) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputMessageRole ¶
type ResponseListResponseOutputMessageRole string
const ( ResponseListResponseOutputMessageRoleSystem ResponseListResponseOutputMessageRole = "system" ResponseListResponseOutputMessageRoleDeveloper ResponseListResponseOutputMessageRole = "developer" ResponseListResponseOutputMessageRoleUser ResponseListResponseOutputMessageRole = "user" ResponseListResponseOutputMessageRoleAssistant ResponseListResponseOutputMessageRole = "assistant" )
type ResponseListResponseOutputRole ¶
type ResponseListResponseOutputRole string
const ( ResponseListResponseOutputRoleSystem ResponseListResponseOutputRole = "system" ResponseListResponseOutputRoleDeveloper ResponseListResponseOutputRole = "developer" ResponseListResponseOutputRoleUser ResponseListResponseOutputRole = "user" ResponseListResponseOutputRoleAssistant ResponseListResponseOutputRole = "assistant" )
type ResponseListResponseOutputUnion ¶
type ResponseListResponseOutputUnion struct { // This field is from variant [ResponseListResponseOutputMessage]. Content ResponseListResponseOutputMessageContentUnion `json:"content"` // This field is from variant [ResponseListResponseOutputMessage]. Role ResponseListResponseOutputMessageRole `json:"role"` // Any of "message", "web_search_call", "file_search_call", "function_call", // "mcp_call", "mcp_list_tools". Type string `json:"type"` ID string `json:"id"` Status string `json:"status"` // This field is from variant [ResponseListResponseOutputFileSearchCall]. Queries []string `json:"queries"` // This field is from variant [ResponseListResponseOutputFileSearchCall]. Results []ResponseListResponseOutputFileSearchCallResult `json:"results"` Arguments string `json:"arguments"` // This field is from variant [ResponseListResponseOutputFunctionCall]. CallID string `json:"call_id"` Name string `json:"name"` ServerLabel string `json:"server_label"` // This field is from variant [ResponseListResponseOutputMcpCall]. Error string `json:"error"` // This field is from variant [ResponseListResponseOutputMcpCall]. Output string `json:"output"` // This field is from variant [ResponseListResponseOutputMcpListTools]. Tools []ResponseListResponseOutputMcpListToolsTool `json:"tools"` JSON struct { Content respjson.Field Role respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field Queries respjson.Field Results respjson.Field Arguments respjson.Field CallID respjson.Field Name respjson.Field ServerLabel respjson.Field Error respjson.Field Output respjson.Field Tools respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseListResponseOutputUnion contains all possible properties and values from ResponseListResponseOutputMessage, ResponseListResponseOutputWebSearchCall, ResponseListResponseOutputFileSearchCall, ResponseListResponseOutputFunctionCall, ResponseListResponseOutputMcpCall, ResponseListResponseOutputMcpListTools.
Use the ResponseListResponseOutputUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseListResponseOutputUnion) AsAny ¶
func (u ResponseListResponseOutputUnion) AsAny() anyResponseListResponseOutput
Use the following switch statement to find the correct variant
switch variant := ResponseListResponseOutputUnion.AsAny().(type) { case llamastackclient.ResponseListResponseOutputMessage: case llamastackclient.ResponseListResponseOutputWebSearchCall: case llamastackclient.ResponseListResponseOutputFileSearchCall: case llamastackclient.ResponseListResponseOutputFunctionCall: case llamastackclient.ResponseListResponseOutputMcpCall: case llamastackclient.ResponseListResponseOutputMcpListTools: default: fmt.Errorf("no variant present") }
func (ResponseListResponseOutputUnion) AsFileSearchCall ¶
func (u ResponseListResponseOutputUnion) AsFileSearchCall() (v ResponseListResponseOutputFileSearchCall)
func (ResponseListResponseOutputUnion) AsFunctionCall ¶
func (u ResponseListResponseOutputUnion) AsFunctionCall() (v ResponseListResponseOutputFunctionCall)
func (ResponseListResponseOutputUnion) AsMcpCall ¶
func (u ResponseListResponseOutputUnion) AsMcpCall() (v ResponseListResponseOutputMcpCall)
func (ResponseListResponseOutputUnion) AsMcpListTools ¶
func (u ResponseListResponseOutputUnion) AsMcpListTools() (v ResponseListResponseOutputMcpListTools)
func (ResponseListResponseOutputUnion) AsMessage ¶
func (u ResponseListResponseOutputUnion) AsMessage() (v ResponseListResponseOutputMessage)
func (ResponseListResponseOutputUnion) AsWebSearchCall ¶
func (u ResponseListResponseOutputUnion) AsWebSearchCall() (v ResponseListResponseOutputWebSearchCall)
func (ResponseListResponseOutputUnion) RawJSON ¶
func (u ResponseListResponseOutputUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputUnion) UnmarshalJSON ¶
func (r *ResponseListResponseOutputUnion) UnmarshalJSON(data []byte) error
type ResponseListResponseOutputWebSearchCall ¶
type ResponseListResponseOutputWebSearchCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // Current status of the web search operation Status string `json:"status,required"` // Tool call type identifier, always "web_search_call" Type constant.WebSearchCall `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Status respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Web search tool call output message for OpenAI responses.
func (ResponseListResponseOutputWebSearchCall) RawJSON ¶
func (r ResponseListResponseOutputWebSearchCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseOutputWebSearchCall) UnmarshalJSON ¶
func (r *ResponseListResponseOutputWebSearchCall) UnmarshalJSON(data []byte) error
type ResponseListResponseText ¶
type ResponseListResponseText struct { // (Optional) Text format configuration specifying output format requirements Format ResponseListResponseTextFormat `json:"format"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Format respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text formatting configuration for the response
func (ResponseListResponseText) RawJSON ¶
func (r ResponseListResponseText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseText) UnmarshalJSON ¶
func (r *ResponseListResponseText) UnmarshalJSON(data []byte) error
type ResponseListResponseTextFormat ¶
type ResponseListResponseTextFormat struct { // Must be "text", "json_schema", or "json_object" to identify the format type // // Any of "text", "json_schema", "json_object". Type ResponseListResponseTextFormatType `json:"type,required"` // (Optional) A description of the response format. Only used for json_schema. Description string `json:"description"` // The name of the response format. Only used for json_schema. Name string `json:"name"` // The JSON schema the response should conform to. In a Python SDK, this is often a // `pydantic` model. Only used for json_schema. Schema map[string]ResponseListResponseTextFormatSchemaUnion `json:"schema"` // (Optional) Whether to strictly enforce the JSON schema. If true, the response // must match the schema exactly. Only used for json_schema. Strict bool `json:"strict"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Type respjson.Field Description respjson.Field Name respjson.Field Schema respjson.Field Strict respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Text format configuration specifying output format requirements
func (ResponseListResponseTextFormat) RawJSON ¶
func (r ResponseListResponseTextFormat) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseTextFormat) UnmarshalJSON ¶
func (r *ResponseListResponseTextFormat) UnmarshalJSON(data []byte) error
type ResponseListResponseTextFormatSchemaUnion ¶
type ResponseListResponseTextFormatSchemaUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseListResponseTextFormatSchemaUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ResponseListResponseTextFormatSchemaUnion) AsAnyArray ¶
func (u ResponseListResponseTextFormatSchemaUnion) AsAnyArray() (v []any)
func (ResponseListResponseTextFormatSchemaUnion) AsBool ¶
func (u ResponseListResponseTextFormatSchemaUnion) AsBool() (v bool)
func (ResponseListResponseTextFormatSchemaUnion) AsFloat ¶
func (u ResponseListResponseTextFormatSchemaUnion) AsFloat() (v float64)
func (ResponseListResponseTextFormatSchemaUnion) AsString ¶
func (u ResponseListResponseTextFormatSchemaUnion) AsString() (v string)
func (ResponseListResponseTextFormatSchemaUnion) RawJSON ¶
func (u ResponseListResponseTextFormatSchemaUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseListResponseTextFormatSchemaUnion) UnmarshalJSON ¶
func (r *ResponseListResponseTextFormatSchemaUnion) UnmarshalJSON(data []byte) error
type ResponseListResponseTextFormatType ¶
type ResponseListResponseTextFormatType string
Must be "text", "json_schema", or "json_object" to identify the format type
const ( ResponseListResponseTextFormatTypeText ResponseListResponseTextFormatType = "text" ResponseListResponseTextFormatTypeJsonSchema ResponseListResponseTextFormatType = "json_schema" ResponseListResponseTextFormatTypeJsonObject ResponseListResponseTextFormatType = "json_object" )
type ResponseNewParams ¶
type ResponseNewParams struct { // Input message(s) to create the response. Input ResponseNewParamsInputUnion `json:"input,omitzero,required"` // The underlying LLM used for completions. Model string `json:"model,required"` Instructions param.Opt[string] `json:"instructions,omitzero"` MaxInferIters param.Opt[int64] `json:"max_infer_iters,omitzero"` // (Optional) if specified, the new response will be a continuation of the previous // response. This can be used to easily fork-off new responses from existing // responses. PreviousResponseID param.Opt[string] `json:"previous_response_id,omitzero"` Store param.Opt[bool] `json:"store,omitzero"` Temperature param.Opt[float64] `json:"temperature,omitzero"` // (Optional) Additional fields to include in the response. Include []string `json:"include,omitzero"` // Text response configuration for OpenAI responses. Text ResponseNewParamsText `json:"text,omitzero"` Tools []ResponseNewParamsToolUnion `json:"tools,omitzero"` // contains filtered or unexported fields }
func (ResponseNewParams) MarshalJSON ¶
func (r ResponseNewParams) MarshalJSON() (data []byte, err error)
func (*ResponseNewParams) UnmarshalJSON ¶
func (r *ResponseNewParams) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseInputFunctionToolCallOutput ¶
type ResponseNewParamsInputArrayItemOpenAIResponseInputFunctionToolCallOutput struct { CallID string `json:"call_id,required"` Output string `json:"output,required"` ID param.Opt[string] `json:"id,omitzero"` Status param.Opt[string] `json:"status,omitzero"` // This field can be elided, and will marshal its zero value as // "function_call_output". Type constant.FunctionCallOutput `json:"type,required"` // contains filtered or unexported fields }
This represents the output of a function call that gets passed back to the model.
The properties CallID, Output, Type are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseInputFunctionToolCallOutput) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseInputFunctionToolCallOutput) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseInputFunctionToolCallOutput) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseInputFunctionToolCallOutput) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseMessage ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessage struct { Content ResponseNewParamsInputArrayItemOpenAIResponseMessageContentUnion `json:"content,omitzero,required"` // Any of "system", "developer", "user", "assistant". Role ResponseNewParamsInputArrayItemOpenAIResponseMessageRole `json:"role,omitzero,required"` ID param.Opt[string] `json:"id,omitzero"` Status param.Opt[string] `json:"status,omitzero"` // This field can be elided, and will marshal its zero value as "message". Type constant.Message `json:"type,required"` // contains filtered or unexported fields }
Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same "type" value, and there is no way to tell them apart in certain scenarios.
The properties Content, Role, Type are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessage) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseMessage) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseMessage) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseMessage) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItem ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItem struct { Annotations []ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion `json:"annotations,omitzero,required"` Text string `json:"text,required"` // This field can be elided, and will marshal its zero value as "output_text". Type constant.OutputText `json:"type,required"` // contains filtered or unexported fields }
The properties Annotations, Text, Type are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItem) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItem) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItem) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItem) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation struct { ContainerID string `json:"container_id,required"` EndIndex int64 `json:"end_index,required"` FileID string `json:"file_id,required"` Filename string `json:"filename,required"` StartIndex int64 `json:"start_index,required"` // This field can be elided, and will marshal its zero value as // "container_file_citation". Type constant.ContainerFileCitation `json:"type,required"` // contains filtered or unexported fields }
The properties ContainerID, EndIndex, FileID, Filename, StartIndex, Type are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFileCitation ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFileCitation struct { // Unique identifier of the referenced file FileID string `json:"file_id,required"` // Name of the referenced file Filename string `json:"filename,required"` // Position index of the citation within the content Index int64 `json:"index,required"` // Annotation type identifier, always "file_citation" // // This field can be elided, and will marshal its zero value as "file_citation". Type constant.FileCitation `json:"type,required"` // contains filtered or unexported fields }
File citation annotation for referencing specific files in response content.
The properties FileID, Filename, Index, Type are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFileCitation) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFileCitation) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFilePath ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFilePath struct { FileID string `json:"file_id,required"` Index int64 `json:"index,required"` // This field can be elided, and will marshal its zero value as "file_path". Type constant.FilePath `json:"type,required"` // contains filtered or unexported fields }
The properties FileID, Index, Type are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFilePath) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFilePath) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFilePath) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFilePath) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationURLCitation ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationURLCitation struct { // End position of the citation span in the content EndIndex int64 `json:"end_index,required"` // Start position of the citation span in the content StartIndex int64 `json:"start_index,required"` // Title of the referenced web resource Title string `json:"title,required"` // URL of the referenced web resource URL string `json:"url,required"` // Annotation type identifier, always "url_citation" // // This field can be elided, and will marshal its zero value as "url_citation". Type constant.URLCitation `json:"type,required"` // contains filtered or unexported fields }
URL citation annotation for referencing external web resources.
The properties EndIndex, StartIndex, Title, Type, URL are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationURLCitation) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationURLCitation) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion struct { OfFileCitation *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFileCitation `json:",omitzero,inline"` OfURLCitation *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationURLCitation `json:",omitzero,inline"` OfContainerFileCitation *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation `json:",omitzero,inline"` OfFilePath *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFilePath `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetContainerID ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetContainerID() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetEndIndex ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetEndIndex() *int64
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetFileID ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetFileID() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetFilename ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetFilename() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetIndex ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetIndex() *int64
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetStartIndex ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetStartIndex() *int64
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetTitle ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetTitle() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetType ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetURL ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetURL() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) MarshalJSON ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImage ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImage struct { // Level of detail for image processing, can be "low", "high", or "auto" // // Any of "low", "high", "auto". Detail ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImageDetail `json:"detail,omitzero,required"` // (Optional) URL of the image content ImageURL param.Opt[string] `json:"image_url,omitzero"` // Content type identifier, always "input_image" // // This field can be elided, and will marshal its zero value as "input_image". Type constant.InputImage `json:"type,required"` // contains filtered or unexported fields }
Image content for input messages in OpenAI response format.
The properties Detail, Type are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImage) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImage) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImage) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImage) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImageDetail ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImageDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImageDetailLow ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImageDetail = "low" ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImageDetailHigh ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImageDetail = "high" ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImageDetailAuto ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImageDetail = "auto" )
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputText ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputText struct { // The text content of the input message Text string `json:"text,required"` // Content type identifier, always "input_text" // // This field can be elided, and will marshal its zero value as "input_text". Type constant.InputText `json:"type,required"` // contains filtered or unexported fields }
Text content for input messages in OpenAI response format.
The properties Text, Type are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputText) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputText) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputText) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputText) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion struct { OfInputText *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputText `json:",omitzero,inline"` OfInputImage *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImage `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetDetail ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetDetail() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetImageURL ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetImageURL() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetText ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetText() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetType ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) MarshalJSON ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentUnion ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfResponseNewsInputArrayItemOpenAIResponseMessageContentArray []ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion `json:",omitzero,inline"` OfVariant2 []ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItem `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentUnion) MarshalJSON ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseMessageContentUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentUnion) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseMessageRole ¶
type ResponseNewParamsInputArrayItemOpenAIResponseMessageRole string
const ( ResponseNewParamsInputArrayItemOpenAIResponseMessageRoleSystem ResponseNewParamsInputArrayItemOpenAIResponseMessageRole = "system" ResponseNewParamsInputArrayItemOpenAIResponseMessageRoleDeveloper ResponseNewParamsInputArrayItemOpenAIResponseMessageRole = "developer" ResponseNewParamsInputArrayItemOpenAIResponseMessageRoleUser ResponseNewParamsInputArrayItemOpenAIResponseMessageRole = "user" ResponseNewParamsInputArrayItemOpenAIResponseMessageRoleAssistant ResponseNewParamsInputArrayItemOpenAIResponseMessageRole = "assistant" )
type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCall ¶
type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // List of search queries executed Queries []string `json:"queries,omitzero,required"` // Current status of the file search operation Status string `json:"status,required"` // (Optional) Search results returned by the file search operation Results []ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResult `json:"results,omitzero"` // Tool call type identifier, always "file_search_call" // // This field can be elided, and will marshal its zero value as "file_search_call". Type constant.FileSearchCall `json:"type,required"` // contains filtered or unexported fields }
File search tool call output message for OpenAI responses.
The properties ID, Queries, Status, Type are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCall) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCall) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCall) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCall) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResult ¶
type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResult struct { // (Optional) Key-value attributes associated with the file Attributes map[string]ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion `json:"attributes,omitzero,required"` // Unique identifier of the file containing the result FileID string `json:"file_id,required"` // Name of the file containing the result Filename string `json:"filename,required"` // Relevance score for this search result (between 0 and 1) Score float64 `json:"score,required"` // Text content of the search result Text string `json:"text,required"` // contains filtered or unexported fields }
Search results returned by the file search operation.
The properties Attributes, FileID, Filename, Score, Text are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResult) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResult) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResult) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResult) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion ¶
type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) MarshalJSON ¶
func (u ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFunctionToolCall ¶
type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFunctionToolCall struct { // JSON string containing the function arguments Arguments string `json:"arguments,required"` // Unique identifier for the function call CallID string `json:"call_id,required"` // Name of the function being called Name string `json:"name,required"` // (Optional) Additional identifier for the tool call ID param.Opt[string] `json:"id,omitzero"` // (Optional) Current status of the function call execution Status param.Opt[string] `json:"status,omitzero"` // Tool call type identifier, always "function_call" // // This field can be elided, and will marshal its zero value as "function_call". Type constant.FunctionCall `json:"type,required"` // contains filtered or unexported fields }
Function tool call output message for OpenAI responses.
The properties Arguments, CallID, Name, Type are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFunctionToolCall) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFunctionToolCall) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFunctionToolCall) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFunctionToolCall) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageWebSearchToolCall ¶
type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageWebSearchToolCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // Current status of the web search operation Status string `json:"status,required"` // Tool call type identifier, always "web_search_call" // // This field can be elided, and will marshal its zero value as "web_search_call". Type constant.WebSearchCall `json:"type,required"` // contains filtered or unexported fields }
Web search tool call output message for OpenAI responses.
The properties ID, Status, Type are required.
func (ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageWebSearchToolCall) MarshalJSON ¶
func (r ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageWebSearchToolCall) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageWebSearchToolCall) UnmarshalJSON ¶
func (r *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageWebSearchToolCall) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputArrayItemUnion ¶
type ResponseNewParamsInputArrayItemUnion struct { OfOpenAIResponseOutputMessageWebSearchToolCall *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageWebSearchToolCall `json:",omitzero,inline"` OfOpenAIResponseOutputMessageFileSearchToolCall *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCall `json:",omitzero,inline"` OfOpenAIResponseOutputMessageFunctionToolCall *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFunctionToolCall `json:",omitzero,inline"` OfOpenAIResponseInputFunctionToolCallOutput *ResponseNewParamsInputArrayItemOpenAIResponseInputFunctionToolCallOutput `json:",omitzero,inline"` OfOpenAIResponseMessage *ResponseNewParamsInputArrayItemOpenAIResponseMessage `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsInputArrayItemUnion) GetArguments ¶
func (u ResponseNewParamsInputArrayItemUnion) GetArguments() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemUnion) GetCallID ¶
func (u ResponseNewParamsInputArrayItemUnion) GetCallID() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemUnion) GetContent ¶
func (u ResponseNewParamsInputArrayItemUnion) GetContent() *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentUnion
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemUnion) GetID ¶
func (u ResponseNewParamsInputArrayItemUnion) GetID() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemUnion) GetName ¶
func (u ResponseNewParamsInputArrayItemUnion) GetName() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemUnion) GetOutput ¶
func (u ResponseNewParamsInputArrayItemUnion) GetOutput() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemUnion) GetQueries ¶
func (u ResponseNewParamsInputArrayItemUnion) GetQueries() []string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemUnion) GetResults ¶
func (u ResponseNewParamsInputArrayItemUnion) GetResults() []ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResult
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemUnion) GetRole ¶
func (u ResponseNewParamsInputArrayItemUnion) GetRole() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemUnion) GetStatus ¶
func (u ResponseNewParamsInputArrayItemUnion) GetStatus() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemUnion) GetType ¶
func (u ResponseNewParamsInputArrayItemUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsInputArrayItemUnion) MarshalJSON ¶
func (u ResponseNewParamsInputArrayItemUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsInputArrayItemUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsInputArrayItemUnion) UnmarshalJSON(data []byte) error
type ResponseNewParamsInputUnion ¶
type ResponseNewParamsInputUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfResponseNewsInputArray []ResponseNewParamsInputArrayItemUnion `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsInputUnion) MarshalJSON ¶
func (u ResponseNewParamsInputUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsInputUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsInputUnion) UnmarshalJSON(data []byte) error
type ResponseNewParamsText ¶
type ResponseNewParamsText struct { // (Optional) Text format configuration specifying output format requirements Format ResponseNewParamsTextFormat `json:"format,omitzero"` // contains filtered or unexported fields }
Text response configuration for OpenAI responses.
func (ResponseNewParamsText) MarshalJSON ¶
func (r ResponseNewParamsText) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsText) UnmarshalJSON ¶
func (r *ResponseNewParamsText) UnmarshalJSON(data []byte) error
type ResponseNewParamsTextFormat ¶
type ResponseNewParamsTextFormat struct { // Must be "text", "json_schema", or "json_object" to identify the format type // // Any of "text", "json_schema", "json_object". Type ResponseNewParamsTextFormatType `json:"type,omitzero,required"` // (Optional) A description of the response format. Only used for json_schema. Description param.Opt[string] `json:"description,omitzero"` // The name of the response format. Only used for json_schema. Name param.Opt[string] `json:"name,omitzero"` // (Optional) Whether to strictly enforce the JSON schema. If true, the response // must match the schema exactly. Only used for json_schema. Strict param.Opt[bool] `json:"strict,omitzero"` // The JSON schema the response should conform to. In a Python SDK, this is often a // `pydantic` model. Only used for json_schema. Schema map[string]ResponseNewParamsTextFormatSchemaUnion `json:"schema,omitzero"` // contains filtered or unexported fields }
(Optional) Text format configuration specifying output format requirements
The property Type is required.
func (ResponseNewParamsTextFormat) MarshalJSON ¶
func (r ResponseNewParamsTextFormat) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsTextFormat) UnmarshalJSON ¶
func (r *ResponseNewParamsTextFormat) UnmarshalJSON(data []byte) error
type ResponseNewParamsTextFormatSchemaUnion ¶
type ResponseNewParamsTextFormatSchemaUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsTextFormatSchemaUnion) MarshalJSON ¶
func (u ResponseNewParamsTextFormatSchemaUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsTextFormatSchemaUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsTextFormatSchemaUnion) UnmarshalJSON(data []byte) error
type ResponseNewParamsTextFormatType ¶
type ResponseNewParamsTextFormatType string
Must be "text", "json_schema", or "json_object" to identify the format type
const ( ResponseNewParamsTextFormatTypeText ResponseNewParamsTextFormatType = "text" ResponseNewParamsTextFormatTypeJsonSchema ResponseNewParamsTextFormatType = "json_schema" ResponseNewParamsTextFormatTypeJsonObject ResponseNewParamsTextFormatType = "json_object" )
type ResponseNewParamsToolFileSearch ¶
type ResponseNewParamsToolFileSearch struct { // List of vector store identifiers to search within VectorStoreIDs []string `json:"vector_store_ids,omitzero,required"` // (Optional) Maximum number of search results to return (1-50) MaxNumResults param.Opt[int64] `json:"max_num_results,omitzero"` // (Optional) Additional filters to apply to the search Filters map[string]ResponseNewParamsToolFileSearchFilterUnion `json:"filters,omitzero"` // (Optional) Options for ranking and scoring search results RankingOptions ResponseNewParamsToolFileSearchRankingOptions `json:"ranking_options,omitzero"` // Tool type identifier, always "file_search" // // This field can be elided, and will marshal its zero value as "file_search". Type constant.FileSearch `json:"type,required"` // contains filtered or unexported fields }
File search tool configuration for OpenAI response inputs.
The properties Type, VectorStoreIDs are required.
func (ResponseNewParamsToolFileSearch) MarshalJSON ¶
func (r ResponseNewParamsToolFileSearch) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsToolFileSearch) UnmarshalJSON ¶
func (r *ResponseNewParamsToolFileSearch) UnmarshalJSON(data []byte) error
type ResponseNewParamsToolFileSearchFilterUnion ¶
type ResponseNewParamsToolFileSearchFilterUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsToolFileSearchFilterUnion) MarshalJSON ¶
func (u ResponseNewParamsToolFileSearchFilterUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsToolFileSearchFilterUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsToolFileSearchFilterUnion) UnmarshalJSON(data []byte) error
type ResponseNewParamsToolFileSearchRankingOptions ¶
type ResponseNewParamsToolFileSearchRankingOptions struct { // (Optional) Name of the ranking algorithm to use Ranker param.Opt[string] `json:"ranker,omitzero"` // (Optional) Minimum relevance score threshold for results ScoreThreshold param.Opt[float64] `json:"score_threshold,omitzero"` // contains filtered or unexported fields }
(Optional) Options for ranking and scoring search results
func (ResponseNewParamsToolFileSearchRankingOptions) MarshalJSON ¶
func (r ResponseNewParamsToolFileSearchRankingOptions) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsToolFileSearchRankingOptions) UnmarshalJSON ¶
func (r *ResponseNewParamsToolFileSearchRankingOptions) UnmarshalJSON(data []byte) error
type ResponseNewParamsToolFunction ¶
type ResponseNewParamsToolFunction struct { // Name of the function that can be called Name string `json:"name,required"` // (Optional) Description of what the function does Description param.Opt[string] `json:"description,omitzero"` // (Optional) Whether to enforce strict parameter validation Strict param.Opt[bool] `json:"strict,omitzero"` // (Optional) JSON schema defining the function's parameters Parameters map[string]ResponseNewParamsToolFunctionParameterUnion `json:"parameters,omitzero"` // Tool type identifier, always "function" // // This field can be elided, and will marshal its zero value as "function". Type constant.Function `json:"type,required"` // contains filtered or unexported fields }
Function tool configuration for OpenAI response inputs.
The properties Name, Type are required.
func (ResponseNewParamsToolFunction) MarshalJSON ¶
func (r ResponseNewParamsToolFunction) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsToolFunction) UnmarshalJSON ¶
func (r *ResponseNewParamsToolFunction) UnmarshalJSON(data []byte) error
type ResponseNewParamsToolFunctionParameterUnion ¶
type ResponseNewParamsToolFunctionParameterUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsToolFunctionParameterUnion) MarshalJSON ¶
func (u ResponseNewParamsToolFunctionParameterUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsToolFunctionParameterUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsToolFunctionParameterUnion) UnmarshalJSON(data []byte) error
type ResponseNewParamsToolMcp ¶
type ResponseNewParamsToolMcp struct { // Approval requirement for tool calls ("always", "never", or filter) RequireApproval ResponseNewParamsToolMcpRequireApprovalUnion `json:"require_approval,omitzero,required"` // Label to identify this MCP server ServerLabel string `json:"server_label,required"` // URL endpoint of the MCP server ServerURL string `json:"server_url,required"` // (Optional) Restriction on which tools can be used from this server AllowedTools ResponseNewParamsToolMcpAllowedToolsUnion `json:"allowed_tools,omitzero"` // (Optional) HTTP headers to include when connecting to the server Headers map[string]ResponseNewParamsToolMcpHeaderUnion `json:"headers,omitzero"` // Tool type identifier, always "mcp" // // This field can be elided, and will marshal its zero value as "mcp". Type constant.Mcp `json:"type,required"` // contains filtered or unexported fields }
Model Context Protocol (MCP) tool configuration for OpenAI response inputs.
The properties RequireApproval, ServerLabel, ServerURL, Type are required.
func (ResponseNewParamsToolMcp) MarshalJSON ¶
func (r ResponseNewParamsToolMcp) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsToolMcp) UnmarshalJSON ¶
func (r *ResponseNewParamsToolMcp) UnmarshalJSON(data []byte) error
type ResponseNewParamsToolMcpAllowedToolsAllowedToolsFilter ¶
type ResponseNewParamsToolMcpAllowedToolsAllowedToolsFilter struct { // (Optional) List of specific tool names that are allowed ToolNames []string `json:"tool_names,omitzero"` // contains filtered or unexported fields }
Filter configuration for restricting which MCP tools can be used.
func (ResponseNewParamsToolMcpAllowedToolsAllowedToolsFilter) MarshalJSON ¶
func (r ResponseNewParamsToolMcpAllowedToolsAllowedToolsFilter) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsToolMcpAllowedToolsAllowedToolsFilter) UnmarshalJSON ¶
func (r *ResponseNewParamsToolMcpAllowedToolsAllowedToolsFilter) UnmarshalJSON(data []byte) error
type ResponseNewParamsToolMcpAllowedToolsUnion ¶
type ResponseNewParamsToolMcpAllowedToolsUnion struct { OfStringArray []string `json:",omitzero,inline"` OfAllowedToolsFilter *ResponseNewParamsToolMcpAllowedToolsAllowedToolsFilter `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsToolMcpAllowedToolsUnion) MarshalJSON ¶
func (u ResponseNewParamsToolMcpAllowedToolsUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsToolMcpAllowedToolsUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsToolMcpAllowedToolsUnion) UnmarshalJSON(data []byte) error
type ResponseNewParamsToolMcpHeaderUnion ¶
type ResponseNewParamsToolMcpHeaderUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsToolMcpHeaderUnion) MarshalJSON ¶
func (u ResponseNewParamsToolMcpHeaderUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsToolMcpHeaderUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsToolMcpHeaderUnion) UnmarshalJSON(data []byte) error
type ResponseNewParamsToolMcpRequireApprovalApprovalFilter ¶
type ResponseNewParamsToolMcpRequireApprovalApprovalFilter struct { // (Optional) List of tool names that always require approval Always []string `json:"always,omitzero"` // (Optional) List of tool names that never require approval Never []string `json:"never,omitzero"` // contains filtered or unexported fields }
Filter configuration for MCP tool approval requirements.
func (ResponseNewParamsToolMcpRequireApprovalApprovalFilter) MarshalJSON ¶
func (r ResponseNewParamsToolMcpRequireApprovalApprovalFilter) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsToolMcpRequireApprovalApprovalFilter) UnmarshalJSON ¶
func (r *ResponseNewParamsToolMcpRequireApprovalApprovalFilter) UnmarshalJSON(data []byte) error
type ResponseNewParamsToolMcpRequireApprovalString ¶
type ResponseNewParamsToolMcpRequireApprovalString string
const ( ResponseNewParamsToolMcpRequireApprovalStringAlways ResponseNewParamsToolMcpRequireApprovalString = "always" ResponseNewParamsToolMcpRequireApprovalStringNever ResponseNewParamsToolMcpRequireApprovalString = "never" )
type ResponseNewParamsToolMcpRequireApprovalUnion ¶
type ResponseNewParamsToolMcpRequireApprovalUnion struct { // Check if union is this variant with // !param.IsOmitted(union.OfResponseNewsToolMcpRequireApprovalString) OfResponseNewsToolMcpRequireApprovalString param.Opt[ResponseNewParamsToolMcpRequireApprovalString] `json:",omitzero,inline"` OfApprovalFilter *ResponseNewParamsToolMcpRequireApprovalApprovalFilter `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsToolMcpRequireApprovalUnion) MarshalJSON ¶
func (u ResponseNewParamsToolMcpRequireApprovalUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsToolMcpRequireApprovalUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsToolMcpRequireApprovalUnion) UnmarshalJSON(data []byte) error
type ResponseNewParamsToolOpenAIResponseInputToolWebSearch ¶
type ResponseNewParamsToolOpenAIResponseInputToolWebSearch struct { // Web search tool type variant to use // // Any of "web_search", "web_search_preview", "web_search_preview_2025_03_11". Type ResponseNewParamsToolOpenAIResponseInputToolWebSearchType `json:"type,omitzero,required"` // (Optional) Size of search context, must be "low", "medium", or "high" SearchContextSize param.Opt[string] `json:"search_context_size,omitzero"` // contains filtered or unexported fields }
Web search tool configuration for OpenAI response inputs.
The property Type is required.
func (ResponseNewParamsToolOpenAIResponseInputToolWebSearch) MarshalJSON ¶
func (r ResponseNewParamsToolOpenAIResponseInputToolWebSearch) MarshalJSON() (data []byte, err error)
func (*ResponseNewParamsToolOpenAIResponseInputToolWebSearch) UnmarshalJSON ¶
func (r *ResponseNewParamsToolOpenAIResponseInputToolWebSearch) UnmarshalJSON(data []byte) error
type ResponseNewParamsToolOpenAIResponseInputToolWebSearchType ¶
type ResponseNewParamsToolOpenAIResponseInputToolWebSearchType string
Web search tool type variant to use
const ( ResponseNewParamsToolOpenAIResponseInputToolWebSearchTypeWebSearch ResponseNewParamsToolOpenAIResponseInputToolWebSearchType = "web_search" ResponseNewParamsToolOpenAIResponseInputToolWebSearchTypeWebSearchPreview ResponseNewParamsToolOpenAIResponseInputToolWebSearchType = "web_search_preview" ResponseNewParamsToolOpenAIResponseInputToolWebSearchTypeWebSearchPreview2025_03_11 ResponseNewParamsToolOpenAIResponseInputToolWebSearchType = "web_search_preview_2025_03_11" )
type ResponseNewParamsToolUnion ¶
type ResponseNewParamsToolUnion struct { OfOpenAIResponseInputToolWebSearch *ResponseNewParamsToolOpenAIResponseInputToolWebSearch `json:",omitzero,inline"` OfFileSearch *ResponseNewParamsToolFileSearch `json:",omitzero,inline"` OfFunction *ResponseNewParamsToolFunction `json:",omitzero,inline"` OfMcp *ResponseNewParamsToolMcp `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ResponseNewParamsToolUnion) GetAllowedTools ¶
func (u ResponseNewParamsToolUnion) GetAllowedTools() *ResponseNewParamsToolMcpAllowedToolsUnion
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetDescription ¶
func (u ResponseNewParamsToolUnion) GetDescription() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetFilters ¶
func (u ResponseNewParamsToolUnion) GetFilters() map[string]ResponseNewParamsToolFileSearchFilterUnion
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetHeaders ¶
func (u ResponseNewParamsToolUnion) GetHeaders() map[string]ResponseNewParamsToolMcpHeaderUnion
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetMaxNumResults ¶
func (u ResponseNewParamsToolUnion) GetMaxNumResults() *int64
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetName ¶
func (u ResponseNewParamsToolUnion) GetName() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetParameters ¶
func (u ResponseNewParamsToolUnion) GetParameters() map[string]ResponseNewParamsToolFunctionParameterUnion
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetRankingOptions ¶
func (u ResponseNewParamsToolUnion) GetRankingOptions() *ResponseNewParamsToolFileSearchRankingOptions
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetRequireApproval ¶
func (u ResponseNewParamsToolUnion) GetRequireApproval() *ResponseNewParamsToolMcpRequireApprovalUnion
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetSearchContextSize ¶
func (u ResponseNewParamsToolUnion) GetSearchContextSize() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetServerLabel ¶
func (u ResponseNewParamsToolUnion) GetServerLabel() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetServerURL ¶
func (u ResponseNewParamsToolUnion) GetServerURL() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetStrict ¶
func (u ResponseNewParamsToolUnion) GetStrict() *bool
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetType ¶
func (u ResponseNewParamsToolUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) GetVectorStoreIDs ¶
func (u ResponseNewParamsToolUnion) GetVectorStoreIDs() []string
Returns a pointer to the underlying variant's property, if present.
func (ResponseNewParamsToolUnion) MarshalJSON ¶
func (u ResponseNewParamsToolUnion) MarshalJSON() ([]byte, error)
func (*ResponseNewParamsToolUnion) UnmarshalJSON ¶
func (u *ResponseNewParamsToolUnion) UnmarshalJSON(data []byte) error
type ResponseObject ¶
type ResponseObject struct { // Unique identifier for this response ID string `json:"id,required"` // Unix timestamp when the response was created CreatedAt int64 `json:"created_at,required"` // Model identifier used for generation Model string `json:"model,required"` // Object type identifier, always "response" Object constant.Response `json:"object,required"` // List of generated output items (messages, tool calls, etc.) Output []ResponseObjectOutputUnion `json:"output,required"` // Whether tool calls can be executed in parallel ParallelToolCalls bool `json:"parallel_tool_calls,required"` // Current status of the response generation Status string `json:"status,required"` // Text formatting configuration for the response Text ResponseObjectText `json:"text,required"` // (Optional) Error details if the response generation failed Error ResponseObjectError `json:"error"` // (Optional) ID of the previous response in a conversation PreviousResponseID string `json:"previous_response_id"` // (Optional) Sampling temperature used for generation Temperature float64 `json:"temperature"` // (Optional) Nucleus sampling parameter used for generation TopP float64 `json:"top_p"` // (Optional) Truncation strategy applied to the response Truncation string `json:"truncation"` // (Optional) User identifier associated with the request User string `json:"user"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field CreatedAt respjson.Field Model respjson.Field Object respjson.Field Output respjson.Field ParallelToolCalls respjson.Field Status respjson.Field Text respjson.Field Error respjson.Field PreviousResponseID respjson.Field Temperature respjson.Field TopP respjson.Field Truncation respjson.Field User respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Complete OpenAI response object containing generation results and metadata.
func (ResponseObject) RawJSON ¶
func (r ResponseObject) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObject) UnmarshalJSON ¶
func (r *ResponseObject) UnmarshalJSON(data []byte) error
type ResponseObjectError ¶
type ResponseObjectError struct { // Error code identifying the type of failure Code string `json:"code,required"` // Human-readable error message describing the failure Message string `json:"message,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Code respjson.Field Message respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Error details if the response generation failed
func (ResponseObjectError) RawJSON ¶
func (r ResponseObjectError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectError) UnmarshalJSON ¶
func (r *ResponseObjectError) UnmarshalJSON(data []byte) error
type ResponseObjectOutputFileSearchCall ¶
type ResponseObjectOutputFileSearchCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // List of search queries executed Queries []string `json:"queries,required"` // Current status of the file search operation Status string `json:"status,required"` // Tool call type identifier, always "file_search_call" Type constant.FileSearchCall `json:"type,required"` // (Optional) Search results returned by the file search operation Results []ResponseObjectOutputFileSearchCallResult `json:"results"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Queries respjson.Field Status respjson.Field Type respjson.Field Results respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File search tool call output message for OpenAI responses.
func (ResponseObjectOutputFileSearchCall) RawJSON ¶
func (r ResponseObjectOutputFileSearchCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputFileSearchCall) UnmarshalJSON ¶
func (r *ResponseObjectOutputFileSearchCall) UnmarshalJSON(data []byte) error
type ResponseObjectOutputFileSearchCallResult ¶
type ResponseObjectOutputFileSearchCallResult struct { // (Optional) Key-value attributes associated with the file Attributes map[string]ResponseObjectOutputFileSearchCallResultAttributeUnion `json:"attributes,required"` // Unique identifier of the file containing the result FileID string `json:"file_id,required"` // Name of the file containing the result Filename string `json:"filename,required"` // Relevance score for this search result (between 0 and 1) Score float64 `json:"score,required"` // Text content of the search result Text string `json:"text,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Attributes respjson.Field FileID respjson.Field Filename respjson.Field Score respjson.Field Text respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Search results returned by the file search operation.
func (ResponseObjectOutputFileSearchCallResult) RawJSON ¶
func (r ResponseObjectOutputFileSearchCallResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputFileSearchCallResult) UnmarshalJSON ¶
func (r *ResponseObjectOutputFileSearchCallResult) UnmarshalJSON(data []byte) error
type ResponseObjectOutputFileSearchCallResultAttributeUnion ¶
type ResponseObjectOutputFileSearchCallResultAttributeUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectOutputFileSearchCallResultAttributeUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ResponseObjectOutputFileSearchCallResultAttributeUnion) AsAnyArray ¶
func (u ResponseObjectOutputFileSearchCallResultAttributeUnion) AsAnyArray() (v []any)
func (ResponseObjectOutputFileSearchCallResultAttributeUnion) AsBool ¶
func (u ResponseObjectOutputFileSearchCallResultAttributeUnion) AsBool() (v bool)
func (ResponseObjectOutputFileSearchCallResultAttributeUnion) AsFloat ¶
func (u ResponseObjectOutputFileSearchCallResultAttributeUnion) AsFloat() (v float64)
func (ResponseObjectOutputFileSearchCallResultAttributeUnion) AsString ¶
func (u ResponseObjectOutputFileSearchCallResultAttributeUnion) AsString() (v string)
func (ResponseObjectOutputFileSearchCallResultAttributeUnion) RawJSON ¶
func (u ResponseObjectOutputFileSearchCallResultAttributeUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputFileSearchCallResultAttributeUnion) UnmarshalJSON ¶
func (r *ResponseObjectOutputFileSearchCallResultAttributeUnion) UnmarshalJSON(data []byte) error
type ResponseObjectOutputFunctionCall ¶
type ResponseObjectOutputFunctionCall struct { // JSON string containing the function arguments Arguments string `json:"arguments,required"` // Unique identifier for the function call CallID string `json:"call_id,required"` // Name of the function being called Name string `json:"name,required"` // Tool call type identifier, always "function_call" Type constant.FunctionCall `json:"type,required"` // (Optional) Additional identifier for the tool call ID string `json:"id"` // (Optional) Current status of the function call execution Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field CallID respjson.Field Name respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Function tool call output message for OpenAI responses.
func (ResponseObjectOutputFunctionCall) RawJSON ¶
func (r ResponseObjectOutputFunctionCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputFunctionCall) UnmarshalJSON ¶
func (r *ResponseObjectOutputFunctionCall) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMcpCall ¶
type ResponseObjectOutputMcpCall struct { // Unique identifier for this MCP call ID string `json:"id,required"` // JSON string containing the MCP call arguments Arguments string `json:"arguments,required"` // Name of the MCP method being called Name string `json:"name,required"` // Label identifying the MCP server handling the call ServerLabel string `json:"server_label,required"` // Tool call type identifier, always "mcp_call" Type constant.McpCall `json:"type,required"` // (Optional) Error message if the MCP call failed Error string `json:"error"` // (Optional) Output result from the successful MCP call Output string `json:"output"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Arguments respjson.Field Name respjson.Field ServerLabel respjson.Field Type respjson.Field Error respjson.Field Output respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Model Context Protocol (MCP) call output message for OpenAI responses.
func (ResponseObjectOutputMcpCall) RawJSON ¶
func (r ResponseObjectOutputMcpCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMcpCall) UnmarshalJSON ¶
func (r *ResponseObjectOutputMcpCall) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMcpListTools ¶
type ResponseObjectOutputMcpListTools struct { // Unique identifier for this MCP list tools operation ID string `json:"id,required"` // Label identifying the MCP server providing the tools ServerLabel string `json:"server_label,required"` // List of available tools provided by the MCP server Tools []ResponseObjectOutputMcpListToolsTool `json:"tools,required"` // Tool call type identifier, always "mcp_list_tools" Type constant.McpListTools `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field ServerLabel respjson.Field Tools respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
MCP list tools output message containing available tools from an MCP server.
func (ResponseObjectOutputMcpListTools) RawJSON ¶
func (r ResponseObjectOutputMcpListTools) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMcpListTools) UnmarshalJSON ¶
func (r *ResponseObjectOutputMcpListTools) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMcpListToolsTool ¶
type ResponseObjectOutputMcpListToolsTool struct { // JSON schema defining the tool's input parameters InputSchema map[string]ResponseObjectOutputMcpListToolsToolInputSchemaUnion `json:"input_schema,required"` // Name of the tool Name string `json:"name,required"` // (Optional) Description of what the tool does Description string `json:"description"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { InputSchema respjson.Field Name respjson.Field Description respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Tool definition returned by MCP list tools operation.
func (ResponseObjectOutputMcpListToolsTool) RawJSON ¶
func (r ResponseObjectOutputMcpListToolsTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMcpListToolsTool) UnmarshalJSON ¶
func (r *ResponseObjectOutputMcpListToolsTool) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMcpListToolsToolInputSchemaUnion ¶
type ResponseObjectOutputMcpListToolsToolInputSchemaUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectOutputMcpListToolsToolInputSchemaUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsAnyArray ¶
func (u ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsAnyArray() (v []any)
func (ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsBool ¶
func (u ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsBool() (v bool)
func (ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsFloat ¶
func (u ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsFloat() (v float64)
func (ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsString ¶
func (u ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsString() (v string)
func (ResponseObjectOutputMcpListToolsToolInputSchemaUnion) RawJSON ¶
func (u ResponseObjectOutputMcpListToolsToolInputSchemaUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMcpListToolsToolInputSchemaUnion) UnmarshalJSON ¶
func (r *ResponseObjectOutputMcpListToolsToolInputSchemaUnion) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMessage ¶
type ResponseObjectOutputMessage struct { Content ResponseObjectOutputMessageContentUnion `json:"content,required"` // Any of "system", "developer", "user", "assistant". Role ResponseObjectOutputMessageRole `json:"role,required"` Type constant.Message `json:"type,required"` ID string `json:"id"` Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same "type" value, and there is no way to tell them apart in certain scenarios.
func (ResponseObjectOutputMessage) RawJSON ¶
func (r ResponseObjectOutputMessage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMessage) UnmarshalJSON ¶
func (r *ResponseObjectOutputMessage) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMessageContentArrayItem ¶
type ResponseObjectOutputMessageContentArrayItem struct { Annotations []ResponseObjectOutputMessageContentArrayItemAnnotationUnion `json:"annotations,required"` Text string `json:"text,required"` Type constant.OutputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Annotations respjson.Field Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectOutputMessageContentArrayItem) RawJSON ¶
func (r ResponseObjectOutputMessageContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMessageContentArrayItem) UnmarshalJSON ¶
func (r *ResponseObjectOutputMessageContentArrayItem) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation ¶
type ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation struct { ContainerID string `json:"container_id,required"` EndIndex int64 `json:"end_index,required"` FileID string `json:"file_id,required"` Filename string `json:"filename,required"` StartIndex int64 `json:"start_index,required"` Type constant.ContainerFileCitation `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ContainerID respjson.Field EndIndex respjson.Field FileID respjson.Field Filename respjson.Field StartIndex respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation) RawJSON ¶
func (r ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON ¶
func (r *ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMessageContentArrayItemAnnotationFileCitation ¶
type ResponseObjectOutputMessageContentArrayItemAnnotationFileCitation struct { // Unique identifier of the referenced file FileID string `json:"file_id,required"` // Name of the referenced file Filename string `json:"filename,required"` // Position index of the citation within the content Index int64 `json:"index,required"` // Annotation type identifier, always "file_citation" Type constant.FileCitation `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileID respjson.Field Filename respjson.Field Index respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File citation annotation for referencing specific files in response content.
func (ResponseObjectOutputMessageContentArrayItemAnnotationFileCitation) RawJSON ¶
func (r ResponseObjectOutputMessageContentArrayItemAnnotationFileCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON ¶
func (r *ResponseObjectOutputMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMessageContentArrayItemAnnotationFilePath ¶
type ResponseObjectOutputMessageContentArrayItemAnnotationFilePath struct { FileID string `json:"file_id,required"` Index int64 `json:"index,required"` Type constant.FilePath `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileID respjson.Field Index respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectOutputMessageContentArrayItemAnnotationFilePath) RawJSON ¶
func (r ResponseObjectOutputMessageContentArrayItemAnnotationFilePath) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMessageContentArrayItemAnnotationFilePath) UnmarshalJSON ¶
func (r *ResponseObjectOutputMessageContentArrayItemAnnotationFilePath) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation ¶
type ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation struct { // End position of the citation span in the content EndIndex int64 `json:"end_index,required"` // Start position of the citation span in the content StartIndex int64 `json:"start_index,required"` // Title of the referenced web resource Title string `json:"title,required"` // Annotation type identifier, always "url_citation" Type constant.URLCitation `json:"type,required"` // URL of the referenced web resource URL string `json:"url,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EndIndex respjson.Field StartIndex respjson.Field Title respjson.Field Type respjson.Field URL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
URL citation annotation for referencing external web resources.
func (ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation) RawJSON ¶
func (r ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON ¶
func (r *ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMessageContentArrayItemAnnotationUnion ¶
type ResponseObjectOutputMessageContentArrayItemAnnotationUnion struct { FileID string `json:"file_id"` Filename string `json:"filename"` Index int64 `json:"index"` // Any of "file_citation", "url_citation", "container_file_citation", "file_path". Type string `json:"type"` EndIndex int64 `json:"end_index"` StartIndex int64 `json:"start_index"` // This field is from variant // [ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation]. Title string `json:"title"` // This field is from variant // [ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation]. URL string `json:"url"` // This field is from variant // [ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation]. ContainerID string `json:"container_id"` JSON struct { FileID respjson.Field Filename respjson.Field Index respjson.Field Type respjson.Field EndIndex respjson.Field StartIndex respjson.Field Title respjson.Field URL respjson.Field ContainerID respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectOutputMessageContentArrayItemAnnotationUnion contains all possible properties and values from ResponseObjectOutputMessageContentArrayItemAnnotationFileCitation, ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation, ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation, ResponseObjectOutputMessageContentArrayItemAnnotationFilePath.
Use the ResponseObjectOutputMessageContentArrayItemAnnotationUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsAny ¶
func (u ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsAny() anyResponseObjectOutputMessageContentArrayItemAnnotation
Use the following switch statement to find the correct variant
switch variant := ResponseObjectOutputMessageContentArrayItemAnnotationUnion.AsAny().(type) { case llamastackclient.ResponseObjectOutputMessageContentArrayItemAnnotationFileCitation: case llamastackclient.ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation: case llamastackclient.ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation: case llamastackclient.ResponseObjectOutputMessageContentArrayItemAnnotationFilePath: default: fmt.Errorf("no variant present") }
func (ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsContainerFileCitation ¶
func (u ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsContainerFileCitation() (v ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation)
func (ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsFileCitation ¶
func (u ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsFileCitation() (v ResponseObjectOutputMessageContentArrayItemAnnotationFileCitation)
func (ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsFilePath ¶
func (ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsURLCitation ¶
func (ResponseObjectOutputMessageContentArrayItemAnnotationUnion) RawJSON ¶
func (u ResponseObjectOutputMessageContentArrayItemAnnotationUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMessageContentArrayItemAnnotationUnion) UnmarshalJSON ¶
func (r *ResponseObjectOutputMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMessageContentArrayItemDetail ¶
type ResponseObjectOutputMessageContentArrayItemDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseObjectOutputMessageContentArrayItemDetailLow ResponseObjectOutputMessageContentArrayItemDetail = "low" ResponseObjectOutputMessageContentArrayItemDetailHigh ResponseObjectOutputMessageContentArrayItemDetail = "high" ResponseObjectOutputMessageContentArrayItemDetailAuto ResponseObjectOutputMessageContentArrayItemDetail = "auto" )
type ResponseObjectOutputMessageContentArrayItemInputImage ¶
type ResponseObjectOutputMessageContentArrayItemInputImage struct { // Level of detail for image processing, can be "low", "high", or "auto" // // Any of "low", "high", "auto". Detail ResponseObjectOutputMessageContentArrayItemInputImageDetail `json:"detail,required"` // Content type identifier, always "input_image" Type constant.InputImage `json:"type,required"` // (Optional) URL of the image content ImageURL string `json:"image_url"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Detail respjson.Field Type respjson.Field ImageURL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image content for input messages in OpenAI response format.
func (ResponseObjectOutputMessageContentArrayItemInputImage) RawJSON ¶
func (r ResponseObjectOutputMessageContentArrayItemInputImage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMessageContentArrayItemInputImage) UnmarshalJSON ¶
func (r *ResponseObjectOutputMessageContentArrayItemInputImage) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMessageContentArrayItemInputImageDetail ¶
type ResponseObjectOutputMessageContentArrayItemInputImageDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseObjectOutputMessageContentArrayItemInputImageDetailLow ResponseObjectOutputMessageContentArrayItemInputImageDetail = "low" ResponseObjectOutputMessageContentArrayItemInputImageDetailHigh ResponseObjectOutputMessageContentArrayItemInputImageDetail = "high" ResponseObjectOutputMessageContentArrayItemInputImageDetailAuto ResponseObjectOutputMessageContentArrayItemInputImageDetail = "auto" )
type ResponseObjectOutputMessageContentArrayItemInputText ¶
type ResponseObjectOutputMessageContentArrayItemInputText struct { // The text content of the input message Text string `json:"text,required"` // Content type identifier, always "input_text" Type constant.InputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content for input messages in OpenAI response format.
func (ResponseObjectOutputMessageContentArrayItemInputText) RawJSON ¶
func (r ResponseObjectOutputMessageContentArrayItemInputText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMessageContentArrayItemInputText) UnmarshalJSON ¶
func (r *ResponseObjectOutputMessageContentArrayItemInputText) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMessageContentArrayItemUnion ¶
type ResponseObjectOutputMessageContentArrayItemUnion struct { // This field is from variant // [ResponseObjectOutputMessageContentArrayItemInputText]. Text string `json:"text"` // Any of "input_text", "input_image". Type string `json:"type"` // This field is from variant // [ResponseObjectOutputMessageContentArrayItemInputImage]. Detail ResponseObjectOutputMessageContentArrayItemInputImageDetail `json:"detail"` // This field is from variant // [ResponseObjectOutputMessageContentArrayItemInputImage]. ImageURL string `json:"image_url"` JSON struct { Text respjson.Field Type respjson.Field Detail respjson.Field ImageURL respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectOutputMessageContentArrayItemUnion contains all possible properties and values from ResponseObjectOutputMessageContentArrayItemInputText, ResponseObjectOutputMessageContentArrayItemInputImage.
Use the ResponseObjectOutputMessageContentArrayItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseObjectOutputMessageContentArrayItemUnion) AsAny ¶
func (u ResponseObjectOutputMessageContentArrayItemUnion) AsAny() anyResponseObjectOutputMessageContentArrayItem
Use the following switch statement to find the correct variant
switch variant := ResponseObjectOutputMessageContentArrayItemUnion.AsAny().(type) { case llamastackclient.ResponseObjectOutputMessageContentArrayItemInputText: case llamastackclient.ResponseObjectOutputMessageContentArrayItemInputImage: default: fmt.Errorf("no variant present") }
func (ResponseObjectOutputMessageContentArrayItemUnion) AsInputImage ¶
func (u ResponseObjectOutputMessageContentArrayItemUnion) AsInputImage() (v ResponseObjectOutputMessageContentArrayItemInputImage)
func (ResponseObjectOutputMessageContentArrayItemUnion) AsInputText ¶
func (u ResponseObjectOutputMessageContentArrayItemUnion) AsInputText() (v ResponseObjectOutputMessageContentArrayItemInputText)
func (ResponseObjectOutputMessageContentArrayItemUnion) RawJSON ¶
func (u ResponseObjectOutputMessageContentArrayItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMessageContentArrayItemUnion) UnmarshalJSON ¶
func (r *ResponseObjectOutputMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMessageContentUnion ¶
type ResponseObjectOutputMessageContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ResponseObjectOutputMessageContentArrayItemUnion] instead of an object. OfResponseObjectOutputMessageContentArray []ResponseObjectOutputMessageContentArrayItemUnion `json:",inline"` // This field will be present if the value is a // [[]ResponseObjectOutputMessageContentArrayItem] instead of an object. OfVariant2 []ResponseObjectOutputMessageContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfResponseObjectOutputMessageContentArray respjson.Field OfVariant2 respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectOutputMessageContentUnion contains all possible properties and values from [string], [[]ResponseObjectOutputMessageContentArrayItemUnion], [[]ResponseObjectOutputMessageContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfResponseObjectOutputMessageContentArray OfVariant2]
func (ResponseObjectOutputMessageContentUnion) AsResponseObjectOutputMessageContentArray ¶
func (u ResponseObjectOutputMessageContentUnion) AsResponseObjectOutputMessageContentArray() (v []ResponseObjectOutputMessageContentArrayItemUnion)
func (ResponseObjectOutputMessageContentUnion) AsString ¶
func (u ResponseObjectOutputMessageContentUnion) AsString() (v string)
func (ResponseObjectOutputMessageContentUnion) AsVariant2 ¶
func (u ResponseObjectOutputMessageContentUnion) AsVariant2() (v []ResponseObjectOutputMessageContentArrayItem)
func (ResponseObjectOutputMessageContentUnion) RawJSON ¶
func (u ResponseObjectOutputMessageContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputMessageContentUnion) UnmarshalJSON ¶
func (r *ResponseObjectOutputMessageContentUnion) UnmarshalJSON(data []byte) error
type ResponseObjectOutputMessageRole ¶
type ResponseObjectOutputMessageRole string
const ( ResponseObjectOutputMessageRoleSystem ResponseObjectOutputMessageRole = "system" ResponseObjectOutputMessageRoleDeveloper ResponseObjectOutputMessageRole = "developer" ResponseObjectOutputMessageRoleUser ResponseObjectOutputMessageRole = "user" ResponseObjectOutputMessageRoleAssistant ResponseObjectOutputMessageRole = "assistant" )
type ResponseObjectOutputRole ¶
type ResponseObjectOutputRole string
const ( ResponseObjectOutputRoleSystem ResponseObjectOutputRole = "system" ResponseObjectOutputRoleDeveloper ResponseObjectOutputRole = "developer" ResponseObjectOutputRoleUser ResponseObjectOutputRole = "user" ResponseObjectOutputRoleAssistant ResponseObjectOutputRole = "assistant" )
type ResponseObjectOutputUnion ¶
type ResponseObjectOutputUnion struct { // This field is from variant [ResponseObjectOutputMessage]. Content ResponseObjectOutputMessageContentUnion `json:"content"` // This field is from variant [ResponseObjectOutputMessage]. Role ResponseObjectOutputMessageRole `json:"role"` // Any of "message", "web_search_call", "file_search_call", "function_call", // "mcp_call", "mcp_list_tools". Type string `json:"type"` ID string `json:"id"` Status string `json:"status"` // This field is from variant [ResponseObjectOutputFileSearchCall]. Queries []string `json:"queries"` // This field is from variant [ResponseObjectOutputFileSearchCall]. Results []ResponseObjectOutputFileSearchCallResult `json:"results"` Arguments string `json:"arguments"` // This field is from variant [ResponseObjectOutputFunctionCall]. CallID string `json:"call_id"` Name string `json:"name"` ServerLabel string `json:"server_label"` // This field is from variant [ResponseObjectOutputMcpCall]. Error string `json:"error"` // This field is from variant [ResponseObjectOutputMcpCall]. Output string `json:"output"` // This field is from variant [ResponseObjectOutputMcpListTools]. Tools []ResponseObjectOutputMcpListToolsTool `json:"tools"` JSON struct { Content respjson.Field Role respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field Queries respjson.Field Results respjson.Field Arguments respjson.Field CallID respjson.Field Name respjson.Field ServerLabel respjson.Field Error respjson.Field Output respjson.Field Tools respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectOutputUnion contains all possible properties and values from ResponseObjectOutputMessage, ResponseObjectOutputWebSearchCall, ResponseObjectOutputFileSearchCall, ResponseObjectOutputFunctionCall, ResponseObjectOutputMcpCall, ResponseObjectOutputMcpListTools.
Use the ResponseObjectOutputUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseObjectOutputUnion) AsAny ¶
func (u ResponseObjectOutputUnion) AsAny() anyResponseObjectOutput
Use the following switch statement to find the correct variant
switch variant := ResponseObjectOutputUnion.AsAny().(type) { case llamastackclient.ResponseObjectOutputMessage: case llamastackclient.ResponseObjectOutputWebSearchCall: case llamastackclient.ResponseObjectOutputFileSearchCall: case llamastackclient.ResponseObjectOutputFunctionCall: case llamastackclient.ResponseObjectOutputMcpCall: case llamastackclient.ResponseObjectOutputMcpListTools: default: fmt.Errorf("no variant present") }
func (ResponseObjectOutputUnion) AsFileSearchCall ¶
func (u ResponseObjectOutputUnion) AsFileSearchCall() (v ResponseObjectOutputFileSearchCall)
func (ResponseObjectOutputUnion) AsFunctionCall ¶
func (u ResponseObjectOutputUnion) AsFunctionCall() (v ResponseObjectOutputFunctionCall)
func (ResponseObjectOutputUnion) AsMcpCall ¶
func (u ResponseObjectOutputUnion) AsMcpCall() (v ResponseObjectOutputMcpCall)
func (ResponseObjectOutputUnion) AsMcpListTools ¶
func (u ResponseObjectOutputUnion) AsMcpListTools() (v ResponseObjectOutputMcpListTools)
func (ResponseObjectOutputUnion) AsMessage ¶
func (u ResponseObjectOutputUnion) AsMessage() (v ResponseObjectOutputMessage)
func (ResponseObjectOutputUnion) AsWebSearchCall ¶
func (u ResponseObjectOutputUnion) AsWebSearchCall() (v ResponseObjectOutputWebSearchCall)
func (ResponseObjectOutputUnion) RawJSON ¶
func (u ResponseObjectOutputUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputUnion) UnmarshalJSON ¶
func (r *ResponseObjectOutputUnion) UnmarshalJSON(data []byte) error
type ResponseObjectOutputWebSearchCall ¶
type ResponseObjectOutputWebSearchCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // Current status of the web search operation Status string `json:"status,required"` // Tool call type identifier, always "web_search_call" Type constant.WebSearchCall `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Status respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Web search tool call output message for OpenAI responses.
func (ResponseObjectOutputWebSearchCall) RawJSON ¶
func (r ResponseObjectOutputWebSearchCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectOutputWebSearchCall) UnmarshalJSON ¶
func (r *ResponseObjectOutputWebSearchCall) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseCompleted ¶
type ResponseObjectStreamResponseCompleted struct { // The completed response object Response ResponseObject `json:"response,required"` // Event type identifier, always "response.completed" Type constant.ResponseCompleted `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Response respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event indicating a response has been completed.
func (ResponseObjectStreamResponseCompleted) RawJSON ¶
func (r ResponseObjectStreamResponseCompleted) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseCompleted) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseCompleted) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseContentPartAdded ¶
type ResponseObjectStreamResponseContentPartAdded struct { // Unique identifier of the output item containing this content part ItemID string `json:"item_id,required"` // The content part that was added Part ResponseObjectStreamResponseContentPartAddedPartUnion `json:"part,required"` // Unique identifier of the response containing this content ResponseID string `json:"response_id,required"` // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Event type identifier, always "response.content_part.added" Type constant.ResponseContentPartAdded `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ItemID respjson.Field Part respjson.Field ResponseID respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for when a new content part is added to a response item.
func (ResponseObjectStreamResponseContentPartAdded) RawJSON ¶
func (r ResponseObjectStreamResponseContentPartAdded) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseContentPartAdded) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseContentPartAdded) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseContentPartAddedPartOutputText ¶
type ResponseObjectStreamResponseContentPartAddedPartOutputText struct { Text string `json:"text,required"` Type constant.OutputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseContentPartAddedPartOutputText) RawJSON ¶
func (r ResponseObjectStreamResponseContentPartAddedPartOutputText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseContentPartAddedPartOutputText) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseContentPartAddedPartOutputText) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseContentPartAddedPartRefusal ¶
type ResponseObjectStreamResponseContentPartAddedPartRefusal struct { Refusal string `json:"refusal,required"` Type constant.Refusal `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Refusal respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseContentPartAddedPartRefusal) RawJSON ¶
func (r ResponseObjectStreamResponseContentPartAddedPartRefusal) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseContentPartAddedPartRefusal) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseContentPartAddedPartRefusal) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseContentPartAddedPartUnion ¶
type ResponseObjectStreamResponseContentPartAddedPartUnion struct { // This field is from variant // [ResponseObjectStreamResponseContentPartAddedPartOutputText]. Text string `json:"text"` // Any of "output_text", "refusal". Type string `json:"type"` // This field is from variant // [ResponseObjectStreamResponseContentPartAddedPartRefusal]. Refusal string `json:"refusal"` JSON struct { Text respjson.Field Type respjson.Field Refusal respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseContentPartAddedPartUnion contains all possible properties and values from ResponseObjectStreamResponseContentPartAddedPartOutputText, ResponseObjectStreamResponseContentPartAddedPartRefusal.
Use the ResponseObjectStreamResponseContentPartAddedPartUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseObjectStreamResponseContentPartAddedPartUnion) AsAny ¶
func (u ResponseObjectStreamResponseContentPartAddedPartUnion) AsAny() anyResponseObjectStreamResponseContentPartAddedPart
Use the following switch statement to find the correct variant
switch variant := ResponseObjectStreamResponseContentPartAddedPartUnion.AsAny().(type) { case llamastackclient.ResponseObjectStreamResponseContentPartAddedPartOutputText: case llamastackclient.ResponseObjectStreamResponseContentPartAddedPartRefusal: default: fmt.Errorf("no variant present") }
func (ResponseObjectStreamResponseContentPartAddedPartUnion) AsOutputText ¶
func (u ResponseObjectStreamResponseContentPartAddedPartUnion) AsOutputText() (v ResponseObjectStreamResponseContentPartAddedPartOutputText)
func (ResponseObjectStreamResponseContentPartAddedPartUnion) RawJSON ¶
func (u ResponseObjectStreamResponseContentPartAddedPartUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseContentPartAddedPartUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseContentPartAddedPartUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseContentPartDone ¶
type ResponseObjectStreamResponseContentPartDone struct { // Unique identifier of the output item containing this content part ItemID string `json:"item_id,required"` // The completed content part Part ResponseObjectStreamResponseContentPartDonePartUnion `json:"part,required"` // Unique identifier of the response containing this content ResponseID string `json:"response_id,required"` // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Event type identifier, always "response.content_part.done" Type constant.ResponseContentPartDone `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ItemID respjson.Field Part respjson.Field ResponseID respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for when a content part is completed.
func (ResponseObjectStreamResponseContentPartDone) RawJSON ¶
func (r ResponseObjectStreamResponseContentPartDone) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseContentPartDone) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseContentPartDone) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseContentPartDonePartOutputText ¶
type ResponseObjectStreamResponseContentPartDonePartOutputText struct { Text string `json:"text,required"` Type constant.OutputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseContentPartDonePartOutputText) RawJSON ¶
func (r ResponseObjectStreamResponseContentPartDonePartOutputText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseContentPartDonePartOutputText) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseContentPartDonePartOutputText) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseContentPartDonePartRefusal ¶
type ResponseObjectStreamResponseContentPartDonePartRefusal struct { Refusal string `json:"refusal,required"` Type constant.Refusal `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Refusal respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseContentPartDonePartRefusal) RawJSON ¶
func (r ResponseObjectStreamResponseContentPartDonePartRefusal) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseContentPartDonePartRefusal) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseContentPartDonePartRefusal) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseContentPartDonePartUnion ¶
type ResponseObjectStreamResponseContentPartDonePartUnion struct { // This field is from variant // [ResponseObjectStreamResponseContentPartDonePartOutputText]. Text string `json:"text"` // Any of "output_text", "refusal". Type string `json:"type"` // This field is from variant // [ResponseObjectStreamResponseContentPartDonePartRefusal]. Refusal string `json:"refusal"` JSON struct { Text respjson.Field Type respjson.Field Refusal respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseContentPartDonePartUnion contains all possible properties and values from ResponseObjectStreamResponseContentPartDonePartOutputText, ResponseObjectStreamResponseContentPartDonePartRefusal.
Use the ResponseObjectStreamResponseContentPartDonePartUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseObjectStreamResponseContentPartDonePartUnion) AsAny ¶
func (u ResponseObjectStreamResponseContentPartDonePartUnion) AsAny() anyResponseObjectStreamResponseContentPartDonePart
Use the following switch statement to find the correct variant
switch variant := ResponseObjectStreamResponseContentPartDonePartUnion.AsAny().(type) { case llamastackclient.ResponseObjectStreamResponseContentPartDonePartOutputText: case llamastackclient.ResponseObjectStreamResponseContentPartDonePartRefusal: default: fmt.Errorf("no variant present") }
func (ResponseObjectStreamResponseContentPartDonePartUnion) AsOutputText ¶
func (u ResponseObjectStreamResponseContentPartDonePartUnion) AsOutputText() (v ResponseObjectStreamResponseContentPartDonePartOutputText)
func (ResponseObjectStreamResponseContentPartDonePartUnion) RawJSON ¶
func (u ResponseObjectStreamResponseContentPartDonePartUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseContentPartDonePartUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseContentPartDonePartUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseCreated ¶
type ResponseObjectStreamResponseCreated struct { // The newly created response object Response ResponseObject `json:"response,required"` // Event type identifier, always "response.created" Type constant.ResponseCreated `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Response respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event indicating a new response has been created.
func (ResponseObjectStreamResponseCreated) RawJSON ¶
func (r ResponseObjectStreamResponseCreated) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseCreated) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseCreated) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseFunctionCallArgumentsDelta ¶
type ResponseObjectStreamResponseFunctionCallArgumentsDelta struct { // Incremental function call arguments being added Delta string `json:"delta,required"` // Unique identifier of the function call being updated ItemID string `json:"item_id,required"` // Index position of the item in the output list OutputIndex int64 `json:"output_index,required"` // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Event type identifier, always "response.function_call_arguments.delta" Type constant.ResponseFunctionCallArgumentsDelta `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Delta respjson.Field ItemID respjson.Field OutputIndex respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for incremental function call argument updates.
func (ResponseObjectStreamResponseFunctionCallArgumentsDelta) RawJSON ¶
func (r ResponseObjectStreamResponseFunctionCallArgumentsDelta) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseFunctionCallArgumentsDelta) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseFunctionCallArgumentsDelta) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseFunctionCallArgumentsDone ¶
type ResponseObjectStreamResponseFunctionCallArgumentsDone struct { // Final complete arguments JSON string for the function call Arguments string `json:"arguments,required"` // Unique identifier of the completed function call ItemID string `json:"item_id,required"` // Index position of the item in the output list OutputIndex int64 `json:"output_index,required"` // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Event type identifier, always "response.function_call_arguments.done" Type constant.ResponseFunctionCallArgumentsDone `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field ItemID respjson.Field OutputIndex respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for when function call arguments are completed.
func (ResponseObjectStreamResponseFunctionCallArgumentsDone) RawJSON ¶
func (r ResponseObjectStreamResponseFunctionCallArgumentsDone) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseFunctionCallArgumentsDone) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseFunctionCallArgumentsDone) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseMcpCallArgumentsDelta ¶
type ResponseObjectStreamResponseMcpCallArgumentsDelta struct { Delta string `json:"delta,required"` ItemID string `json:"item_id,required"` OutputIndex int64 `json:"output_index,required"` SequenceNumber int64 `json:"sequence_number,required"` Type constant.ResponseMcpCallArgumentsDelta `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Delta respjson.Field ItemID respjson.Field OutputIndex respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseMcpCallArgumentsDelta) RawJSON ¶
func (r ResponseObjectStreamResponseMcpCallArgumentsDelta) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseMcpCallArgumentsDelta) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseMcpCallArgumentsDelta) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseMcpCallArgumentsDone ¶
type ResponseObjectStreamResponseMcpCallArgumentsDone struct { Arguments string `json:"arguments,required"` ItemID string `json:"item_id,required"` OutputIndex int64 `json:"output_index,required"` SequenceNumber int64 `json:"sequence_number,required"` Type constant.ResponseMcpCallArgumentsDone `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field ItemID respjson.Field OutputIndex respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseMcpCallArgumentsDone) RawJSON ¶
func (r ResponseObjectStreamResponseMcpCallArgumentsDone) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseMcpCallArgumentsDone) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseMcpCallArgumentsDone) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseMcpCallCompleted ¶
type ResponseObjectStreamResponseMcpCallCompleted struct { // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Event type identifier, always "response.mcp_call.completed" Type constant.ResponseMcpCallCompleted `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for completed MCP calls.
func (ResponseObjectStreamResponseMcpCallCompleted) RawJSON ¶
func (r ResponseObjectStreamResponseMcpCallCompleted) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseMcpCallCompleted) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseMcpCallCompleted) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseMcpCallFailed ¶
type ResponseObjectStreamResponseMcpCallFailed struct { // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Event type identifier, always "response.mcp_call.failed" Type constant.ResponseMcpCallFailed `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for failed MCP calls.
func (ResponseObjectStreamResponseMcpCallFailed) RawJSON ¶
func (r ResponseObjectStreamResponseMcpCallFailed) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseMcpCallFailed) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseMcpCallFailed) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseMcpCallInProgress ¶
type ResponseObjectStreamResponseMcpCallInProgress struct { // Unique identifier of the MCP call ItemID string `json:"item_id,required"` // Index position of the item in the output list OutputIndex int64 `json:"output_index,required"` // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Event type identifier, always "response.mcp_call.in_progress" Type constant.ResponseMcpCallInProgress `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ItemID respjson.Field OutputIndex respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for MCP calls in progress.
func (ResponseObjectStreamResponseMcpCallInProgress) RawJSON ¶
func (r ResponseObjectStreamResponseMcpCallInProgress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseMcpCallInProgress) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseMcpCallInProgress) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseMcpListToolsCompleted ¶
type ResponseObjectStreamResponseMcpListToolsCompleted struct { SequenceNumber int64 `json:"sequence_number,required"` Type constant.ResponseMcpListToolsCompleted `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseMcpListToolsCompleted) RawJSON ¶
func (r ResponseObjectStreamResponseMcpListToolsCompleted) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseMcpListToolsCompleted) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseMcpListToolsCompleted) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseMcpListToolsFailed ¶
type ResponseObjectStreamResponseMcpListToolsFailed struct { SequenceNumber int64 `json:"sequence_number,required"` Type constant.ResponseMcpListToolsFailed `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseMcpListToolsFailed) RawJSON ¶
func (r ResponseObjectStreamResponseMcpListToolsFailed) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseMcpListToolsFailed) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseMcpListToolsFailed) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseMcpListToolsInProgress ¶
type ResponseObjectStreamResponseMcpListToolsInProgress struct { SequenceNumber int64 `json:"sequence_number,required"` Type constant.ResponseMcpListToolsInProgress `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseMcpListToolsInProgress) RawJSON ¶
func (r ResponseObjectStreamResponseMcpListToolsInProgress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseMcpListToolsInProgress) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseMcpListToolsInProgress) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAdded ¶
type ResponseObjectStreamResponseOutputItemAdded struct { // The output item that was added (message, tool call, etc.) Item ResponseObjectStreamResponseOutputItemAddedItemUnion `json:"item,required"` // Index position of this item in the output list OutputIndex int64 `json:"output_index,required"` // Unique identifier of the response containing this output ResponseID string `json:"response_id,required"` // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Event type identifier, always "response.output_item.added" Type constant.ResponseOutputItemAdded `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Item respjson.Field OutputIndex respjson.Field ResponseID respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for when a new output item is added to the response.
func (ResponseObjectStreamResponseOutputItemAdded) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAdded) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAdded) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAdded) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall ¶
type ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // List of search queries executed Queries []string `json:"queries,required"` // Current status of the file search operation Status string `json:"status,required"` // Tool call type identifier, always "file_search_call" Type constant.FileSearchCall `json:"type,required"` // (Optional) Search results returned by the file search operation Results []ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult `json:"results"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Queries respjson.Field Status respjson.Field Type respjson.Field Results respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File search tool call output message for OpenAI responses.
func (ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult ¶
type ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult struct { // (Optional) Key-value attributes associated with the file Attributes map[string]ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion `json:"attributes,required"` // Unique identifier of the file containing the result FileID string `json:"file_id,required"` // Name of the file containing the result Filename string `json:"filename,required"` // Relevance score for this search result (between 0 and 1) Score float64 `json:"score,required"` // Text content of the search result Text string `json:"text,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Attributes respjson.Field FileID respjson.Field Filename respjson.Field Score respjson.Field Text respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Search results returned by the file search operation.
func (ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion ¶
type ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsAnyArray ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsAnyArray() (v []any)
func (ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsBool ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsBool() (v bool)
func (ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsFloat ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsFloat() (v float64)
func (ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsString ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsString() (v string)
func (ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) RawJSON ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemFunctionCall ¶
type ResponseObjectStreamResponseOutputItemAddedItemFunctionCall struct { // JSON string containing the function arguments Arguments string `json:"arguments,required"` // Unique identifier for the function call CallID string `json:"call_id,required"` // Name of the function being called Name string `json:"name,required"` // Tool call type identifier, always "function_call" Type constant.FunctionCall `json:"type,required"` // (Optional) Additional identifier for the tool call ID string `json:"id"` // (Optional) Current status of the function call execution Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field CallID respjson.Field Name respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Function tool call output message for OpenAI responses.
func (ResponseObjectStreamResponseOutputItemAddedItemFunctionCall) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemFunctionCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemFunctionCall) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemFunctionCall) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMcpCall ¶
type ResponseObjectStreamResponseOutputItemAddedItemMcpCall struct { // Unique identifier for this MCP call ID string `json:"id,required"` // JSON string containing the MCP call arguments Arguments string `json:"arguments,required"` // Name of the MCP method being called Name string `json:"name,required"` // Label identifying the MCP server handling the call ServerLabel string `json:"server_label,required"` // Tool call type identifier, always "mcp_call" Type constant.McpCall `json:"type,required"` // (Optional) Error message if the MCP call failed Error string `json:"error"` // (Optional) Output result from the successful MCP call Output string `json:"output"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Arguments respjson.Field Name respjson.Field ServerLabel respjson.Field Type respjson.Field Error respjson.Field Output respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Model Context Protocol (MCP) call output message for OpenAI responses.
func (ResponseObjectStreamResponseOutputItemAddedItemMcpCall) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemMcpCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMcpCall) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMcpCall) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMcpListTools ¶
type ResponseObjectStreamResponseOutputItemAddedItemMcpListTools struct { // Unique identifier for this MCP list tools operation ID string `json:"id,required"` // Label identifying the MCP server providing the tools ServerLabel string `json:"server_label,required"` // List of available tools provided by the MCP server Tools []ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool `json:"tools,required"` // Tool call type identifier, always "mcp_list_tools" Type constant.McpListTools `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field ServerLabel respjson.Field Tools respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
MCP list tools output message containing available tools from an MCP server.
func (ResponseObjectStreamResponseOutputItemAddedItemMcpListTools) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemMcpListTools) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMcpListTools) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMcpListTools) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool ¶
type ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool struct { // JSON schema defining the tool's input parameters InputSchema map[string]ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion `json:"input_schema,required"` // Name of the tool Name string `json:"name,required"` // (Optional) Description of what the tool does Description string `json:"description"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { InputSchema respjson.Field Name respjson.Field Description respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Tool definition returned by MCP list tools operation.
func (ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion ¶
type ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsAnyArray ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsAnyArray() (v []any)
func (ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsBool ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsBool() (v bool)
func (ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsFloat ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsFloat() (v float64)
func (ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsString ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsString() (v string)
func (ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) RawJSON ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMessage ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessage struct { Content ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion `json:"content,required"` // Any of "system", "developer", "user", "assistant". Role ResponseObjectStreamResponseOutputItemAddedItemMessageRole `json:"role,required"` Type constant.Message `json:"type,required"` ID string `json:"id"` Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same "type" value, and there is no way to tell them apart in certain scenarios.
func (ResponseObjectStreamResponseOutputItemAddedItemMessage) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemMessage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMessage) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMessage) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem struct { Annotations []ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion `json:"annotations,required"` Text string `json:"text,required"` Type constant.OutputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Annotations respjson.Field Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationContainerFileCitation ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationContainerFileCitation struct { ContainerID string `json:"container_id,required"` EndIndex int64 `json:"end_index,required"` FileID string `json:"file_id,required"` Filename string `json:"filename,required"` StartIndex int64 `json:"start_index,required"` Type constant.ContainerFileCitation `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ContainerID respjson.Field EndIndex respjson.Field FileID respjson.Field Filename respjson.Field StartIndex respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationContainerFileCitation) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationContainerFileCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFileCitation ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFileCitation struct { // Unique identifier of the referenced file FileID string `json:"file_id,required"` // Name of the referenced file Filename string `json:"filename,required"` // Position index of the citation within the content Index int64 `json:"index,required"` // Annotation type identifier, always "file_citation" Type constant.FileCitation `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileID respjson.Field Filename respjson.Field Index respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File citation annotation for referencing specific files in response content.
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFileCitation) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFileCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFilePath ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFilePath struct { FileID string `json:"file_id,required"` Index int64 `json:"index,required"` Type constant.FilePath `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileID respjson.Field Index respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFilePath) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFilePath) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFilePath) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFilePath) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationURLCitation ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationURLCitation struct { // End position of the citation span in the content EndIndex int64 `json:"end_index,required"` // Start position of the citation span in the content StartIndex int64 `json:"start_index,required"` // Title of the referenced web resource Title string `json:"title,required"` // Annotation type identifier, always "url_citation" Type constant.URLCitation `json:"type,required"` // URL of the referenced web resource URL string `json:"url,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EndIndex respjson.Field StartIndex respjson.Field Title respjson.Field Type respjson.Field URL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
URL citation annotation for referencing external web resources.
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationURLCitation) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationURLCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion struct { FileID string `json:"file_id"` Filename string `json:"filename"` Index int64 `json:"index"` // Any of "file_citation", "url_citation", "container_file_citation", "file_path". Type string `json:"type"` EndIndex int64 `json:"end_index"` StartIndex int64 `json:"start_index"` // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationURLCitation]. Title string `json:"title"` // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationURLCitation]. URL string `json:"url"` // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationContainerFileCitation]. ContainerID string `json:"container_id"` JSON struct { FileID respjson.Field Filename respjson.Field Index respjson.Field Type respjson.Field EndIndex respjson.Field StartIndex respjson.Field Title respjson.Field URL respjson.Field ContainerID respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion contains all possible properties and values from ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFileCitation, ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationURLCitation, ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationContainerFileCitation, ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFilePath.
Use the ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) AsAny ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) AsAny() anyResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotation
Use the following switch statement to find the correct variant
switch variant := ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion.AsAny().(type) { case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFileCitation: case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationURLCitation: case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationContainerFileCitation: case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFilePath: default: fmt.Errorf("no variant present") }
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) AsContainerFileCitation ¶
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) AsFileCitation ¶
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) AsFilePath ¶
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) AsURLCitation ¶
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) RawJSON ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemDetail ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemDetailLow ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemDetail = "low" ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemDetailHigh ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemDetail = "high" ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemDetailAuto ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemDetail = "auto" )
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage struct { // Level of detail for image processing, can be "low", "high", or "auto" // // Any of "low", "high", "auto". Detail ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImageDetail `json:"detail,required"` // Content type identifier, always "input_image" Type constant.InputImage `json:"type,required"` // (Optional) URL of the image content ImageURL string `json:"image_url"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Detail respjson.Field Type respjson.Field ImageURL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image content for input messages in OpenAI response format.
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImageDetail ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImageDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImageDetailLow ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImageDetail = "low" ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImageDetailHigh ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImageDetail = "high" ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImageDetailAuto ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImageDetail = "auto" )
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputText ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputText struct { // The text content of the input message Text string `json:"text,required"` // Content type identifier, always "input_text" Type constant.InputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content for input messages in OpenAI response format.
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputText) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputText) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputText) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion struct { // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputText]. Text string `json:"text"` // Any of "input_text", "input_image". Type string `json:"type"` // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage]. Detail ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImageDetail `json:"detail"` // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage]. ImageURL string `json:"image_url"` JSON struct { Text respjson.Field Type respjson.Field Detail respjson.Field ImageURL respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion contains all possible properties and values from ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputText, ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage.
Use the ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) AsAny ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) AsAny() anyResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem
Use the following switch statement to find the correct variant
switch variant := ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion.AsAny().(type) { case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputText: case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage: default: fmt.Errorf("no variant present") }
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) AsInputImage ¶
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) AsInputText ¶
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) RawJSON ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion] // instead of an object. OfResponseObjectStreamResponseOutputItemAddedItemMessageContentArray []ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion `json:",inline"` // This field will be present if the value is a // [[]ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem] // instead of an object. OfVariant2 []ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfResponseObjectStreamResponseOutputItemAddedItemMessageContentArray respjson.Field OfVariant2 respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion contains all possible properties and values from [string], [[]ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion], [[]ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfResponseObjectStreamResponseOutputItemAddedItemMessageContentArray OfVariant2]
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) AsResponseObjectStreamResponseOutputItemAddedItemMessageContentArray ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) AsResponseObjectStreamResponseOutputItemAddedItemMessageContentArray() (v []ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion)
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) AsString ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) AsString() (v string)
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) AsVariant2 ¶
func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) RawJSON ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemMessageRole ¶
type ResponseObjectStreamResponseOutputItemAddedItemMessageRole string
const ( ResponseObjectStreamResponseOutputItemAddedItemMessageRoleSystem ResponseObjectStreamResponseOutputItemAddedItemMessageRole = "system" ResponseObjectStreamResponseOutputItemAddedItemMessageRoleDeveloper ResponseObjectStreamResponseOutputItemAddedItemMessageRole = "developer" ResponseObjectStreamResponseOutputItemAddedItemMessageRoleUser ResponseObjectStreamResponseOutputItemAddedItemMessageRole = "user" ResponseObjectStreamResponseOutputItemAddedItemMessageRoleAssistant ResponseObjectStreamResponseOutputItemAddedItemMessageRole = "assistant" )
type ResponseObjectStreamResponseOutputItemAddedItemRole ¶
type ResponseObjectStreamResponseOutputItemAddedItemRole string
const ( ResponseObjectStreamResponseOutputItemAddedItemRoleSystem ResponseObjectStreamResponseOutputItemAddedItemRole = "system" ResponseObjectStreamResponseOutputItemAddedItemRoleDeveloper ResponseObjectStreamResponseOutputItemAddedItemRole = "developer" ResponseObjectStreamResponseOutputItemAddedItemRoleUser ResponseObjectStreamResponseOutputItemAddedItemRole = "user" ResponseObjectStreamResponseOutputItemAddedItemRoleAssistant ResponseObjectStreamResponseOutputItemAddedItemRole = "assistant" )
type ResponseObjectStreamResponseOutputItemAddedItemUnion ¶
type ResponseObjectStreamResponseOutputItemAddedItemUnion struct { // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemMessage]. Content ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion `json:"content"` // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemMessage]. Role ResponseObjectStreamResponseOutputItemAddedItemMessageRole `json:"role"` // Any of "message", "web_search_call", "file_search_call", "function_call", // "mcp_call", "mcp_list_tools". Type string `json:"type"` ID string `json:"id"` Status string `json:"status"` // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall]. Queries []string `json:"queries"` // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall]. Results []ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult `json:"results"` Arguments string `json:"arguments"` // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemFunctionCall]. CallID string `json:"call_id"` Name string `json:"name"` ServerLabel string `json:"server_label"` // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemMcpCall]. Error string `json:"error"` // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemMcpCall]. Output string `json:"output"` // This field is from variant // [ResponseObjectStreamResponseOutputItemAddedItemMcpListTools]. Tools []ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool `json:"tools"` JSON struct { Content respjson.Field Role respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field Queries respjson.Field Results respjson.Field Arguments respjson.Field CallID respjson.Field Name respjson.Field ServerLabel respjson.Field Error respjson.Field Output respjson.Field Tools respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseOutputItemAddedItemUnion contains all possible properties and values from ResponseObjectStreamResponseOutputItemAddedItemMessage, ResponseObjectStreamResponseOutputItemAddedItemWebSearchCall, ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall, ResponseObjectStreamResponseOutputItemAddedItemFunctionCall, ResponseObjectStreamResponseOutputItemAddedItemMcpCall, ResponseObjectStreamResponseOutputItemAddedItemMcpListTools.
Use the ResponseObjectStreamResponseOutputItemAddedItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsAny ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) AsAny() anyResponseObjectStreamResponseOutputItemAddedItem
Use the following switch statement to find the correct variant
switch variant := ResponseObjectStreamResponseOutputItemAddedItemUnion.AsAny().(type) { case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemMessage: case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemWebSearchCall: case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall: case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemFunctionCall: case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemMcpCall: case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemMcpListTools: default: fmt.Errorf("no variant present") }
func (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsFileSearchCall ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) AsFileSearchCall() (v ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall)
func (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsFunctionCall ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) AsFunctionCall() (v ResponseObjectStreamResponseOutputItemAddedItemFunctionCall)
func (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsMcpListTools ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) AsMcpListTools() (v ResponseObjectStreamResponseOutputItemAddedItemMcpListTools)
func (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsWebSearchCall ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) AsWebSearchCall() (v ResponseObjectStreamResponseOutputItemAddedItemWebSearchCall)
func (ResponseObjectStreamResponseOutputItemAddedItemUnion) RawJSON ¶
func (u ResponseObjectStreamResponseOutputItemAddedItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemAddedItemWebSearchCall ¶
type ResponseObjectStreamResponseOutputItemAddedItemWebSearchCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // Current status of the web search operation Status string `json:"status,required"` // Tool call type identifier, always "web_search_call" Type constant.WebSearchCall `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Status respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Web search tool call output message for OpenAI responses.
func (ResponseObjectStreamResponseOutputItemAddedItemWebSearchCall) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemAddedItemWebSearchCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemAddedItemWebSearchCall) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemAddedItemWebSearchCall) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDone ¶
type ResponseObjectStreamResponseOutputItemDone struct { // The completed output item (message, tool call, etc.) Item ResponseObjectStreamResponseOutputItemDoneItemUnion `json:"item,required"` // Index position of this item in the output list OutputIndex int64 `json:"output_index,required"` // Unique identifier of the response containing this output ResponseID string `json:"response_id,required"` // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Event type identifier, always "response.output_item.done" Type constant.ResponseOutputItemDone `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Item respjson.Field OutputIndex respjson.Field ResponseID respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for when an output item is completed.
func (ResponseObjectStreamResponseOutputItemDone) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDone) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDone) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDone) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall ¶
type ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // List of search queries executed Queries []string `json:"queries,required"` // Current status of the file search operation Status string `json:"status,required"` // Tool call type identifier, always "file_search_call" Type constant.FileSearchCall `json:"type,required"` // (Optional) Search results returned by the file search operation Results []ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult `json:"results"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Queries respjson.Field Status respjson.Field Type respjson.Field Results respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File search tool call output message for OpenAI responses.
func (ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult ¶
type ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult struct { // (Optional) Key-value attributes associated with the file Attributes map[string]ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion `json:"attributes,required"` // Unique identifier of the file containing the result FileID string `json:"file_id,required"` // Name of the file containing the result Filename string `json:"filename,required"` // Relevance score for this search result (between 0 and 1) Score float64 `json:"score,required"` // Text content of the search result Text string `json:"text,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Attributes respjson.Field FileID respjson.Field Filename respjson.Field Score respjson.Field Text respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Search results returned by the file search operation.
func (ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion ¶
type ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsAnyArray ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsAnyArray() (v []any)
func (ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsBool ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsBool() (v bool)
func (ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsFloat ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsFloat() (v float64)
func (ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsString ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsString() (v string)
func (ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) RawJSON ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemFunctionCall ¶
type ResponseObjectStreamResponseOutputItemDoneItemFunctionCall struct { // JSON string containing the function arguments Arguments string `json:"arguments,required"` // Unique identifier for the function call CallID string `json:"call_id,required"` // Name of the function being called Name string `json:"name,required"` // Tool call type identifier, always "function_call" Type constant.FunctionCall `json:"type,required"` // (Optional) Additional identifier for the tool call ID string `json:"id"` // (Optional) Current status of the function call execution Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Arguments respjson.Field CallID respjson.Field Name respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Function tool call output message for OpenAI responses.
func (ResponseObjectStreamResponseOutputItemDoneItemFunctionCall) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemFunctionCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemFunctionCall) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemFunctionCall) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMcpCall ¶
type ResponseObjectStreamResponseOutputItemDoneItemMcpCall struct { // Unique identifier for this MCP call ID string `json:"id,required"` // JSON string containing the MCP call arguments Arguments string `json:"arguments,required"` // Name of the MCP method being called Name string `json:"name,required"` // Label identifying the MCP server handling the call ServerLabel string `json:"server_label,required"` // Tool call type identifier, always "mcp_call" Type constant.McpCall `json:"type,required"` // (Optional) Error message if the MCP call failed Error string `json:"error"` // (Optional) Output result from the successful MCP call Output string `json:"output"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Arguments respjson.Field Name respjson.Field ServerLabel respjson.Field Type respjson.Field Error respjson.Field Output respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Model Context Protocol (MCP) call output message for OpenAI responses.
func (ResponseObjectStreamResponseOutputItemDoneItemMcpCall) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemMcpCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMcpCall) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMcpCall) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMcpListTools ¶
type ResponseObjectStreamResponseOutputItemDoneItemMcpListTools struct { // Unique identifier for this MCP list tools operation ID string `json:"id,required"` // Label identifying the MCP server providing the tools ServerLabel string `json:"server_label,required"` // List of available tools provided by the MCP server Tools []ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool `json:"tools,required"` // Tool call type identifier, always "mcp_list_tools" Type constant.McpListTools `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field ServerLabel respjson.Field Tools respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
MCP list tools output message containing available tools from an MCP server.
func (ResponseObjectStreamResponseOutputItemDoneItemMcpListTools) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemMcpListTools) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMcpListTools) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMcpListTools) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool ¶
type ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool struct { // JSON schema defining the tool's input parameters InputSchema map[string]ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion `json:"input_schema,required"` // Name of the tool Name string `json:"name,required"` // (Optional) Description of what the tool does Description string `json:"description"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { InputSchema respjson.Field Name respjson.Field Description respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Tool definition returned by MCP list tools operation.
func (ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion ¶
type ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsAnyArray ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsAnyArray() (v []any)
func (ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsBool ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsBool() (v bool)
func (ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsFloat ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsFloat() (v float64)
func (ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsString ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsString() (v string)
func (ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) RawJSON ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMessage ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessage struct { Content ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion `json:"content,required"` // Any of "system", "developer", "user", "assistant". Role ResponseObjectStreamResponseOutputItemDoneItemMessageRole `json:"role,required"` Type constant.Message `json:"type,required"` ID string `json:"id"` Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field Role respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Corresponds to the various Message types in the Responses API. They are all under one type because the Responses API gives them all the same "type" value, and there is no way to tell them apart in certain scenarios.
func (ResponseObjectStreamResponseOutputItemDoneItemMessage) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemMessage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMessage) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMessage) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem struct { Annotations []ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion `json:"annotations,required"` Text string `json:"text,required"` Type constant.OutputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Annotations respjson.Field Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationContainerFileCitation ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationContainerFileCitation struct { ContainerID string `json:"container_id,required"` EndIndex int64 `json:"end_index,required"` FileID string `json:"file_id,required"` Filename string `json:"filename,required"` StartIndex int64 `json:"start_index,required"` Type constant.ContainerFileCitation `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ContainerID respjson.Field EndIndex respjson.Field FileID respjson.Field Filename respjson.Field StartIndex respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationContainerFileCitation) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationContainerFileCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFileCitation ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFileCitation struct { // Unique identifier of the referenced file FileID string `json:"file_id,required"` // Name of the referenced file Filename string `json:"filename,required"` // Position index of the citation within the content Index int64 `json:"index,required"` // Annotation type identifier, always "file_citation" Type constant.FileCitation `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileID respjson.Field Filename respjson.Field Index respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File citation annotation for referencing specific files in response content.
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFileCitation) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFileCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFilePath ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFilePath struct { FileID string `json:"file_id,required"` Index int64 `json:"index,required"` Type constant.FilePath `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { FileID respjson.Field Index respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFilePath) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFilePath) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFilePath) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFilePath) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationURLCitation ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationURLCitation struct { // End position of the citation span in the content EndIndex int64 `json:"end_index,required"` // Start position of the citation span in the content StartIndex int64 `json:"start_index,required"` // Title of the referenced web resource Title string `json:"title,required"` // Annotation type identifier, always "url_citation" Type constant.URLCitation `json:"type,required"` // URL of the referenced web resource URL string `json:"url,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EndIndex respjson.Field StartIndex respjson.Field Title respjson.Field Type respjson.Field URL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
URL citation annotation for referencing external web resources.
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationURLCitation) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationURLCitation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion struct { FileID string `json:"file_id"` Filename string `json:"filename"` Index int64 `json:"index"` // Any of "file_citation", "url_citation", "container_file_citation", "file_path". Type string `json:"type"` EndIndex int64 `json:"end_index"` StartIndex int64 `json:"start_index"` // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationURLCitation]. Title string `json:"title"` // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationURLCitation]. URL string `json:"url"` // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationContainerFileCitation]. ContainerID string `json:"container_id"` JSON struct { FileID respjson.Field Filename respjson.Field Index respjson.Field Type respjson.Field EndIndex respjson.Field StartIndex respjson.Field Title respjson.Field URL respjson.Field ContainerID respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion contains all possible properties and values from ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFileCitation, ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationURLCitation, ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationContainerFileCitation, ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFilePath.
Use the ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) AsAny ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) AsAny() anyResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotation
Use the following switch statement to find the correct variant
switch variant := ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion.AsAny().(type) { case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFileCitation: case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationURLCitation: case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationContainerFileCitation: case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFilePath: default: fmt.Errorf("no variant present") }
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) AsContainerFileCitation ¶
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) AsFileCitation ¶
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) AsFilePath ¶
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) AsURLCitation ¶
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) RawJSON ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemDetail ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemDetailLow ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemDetail = "low" ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemDetailHigh ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemDetail = "high" ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemDetailAuto ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemDetail = "auto" )
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage struct { // Level of detail for image processing, can be "low", "high", or "auto" // // Any of "low", "high", "auto". Detail ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImageDetail `json:"detail,required"` // Content type identifier, always "input_image" Type constant.InputImage `json:"type,required"` // (Optional) URL of the image content ImageURL string `json:"image_url"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Detail respjson.Field Type respjson.Field ImageURL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image content for input messages in OpenAI response format.
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImageDetail ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImageDetail string
Level of detail for image processing, can be "low", "high", or "auto"
const ( ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImageDetailLow ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImageDetail = "low" ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImageDetailHigh ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImageDetail = "high" ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImageDetailAuto ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImageDetail = "auto" )
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputText ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputText struct { // The text content of the input message Text string `json:"text,required"` // Content type identifier, always "input_text" Type constant.InputText `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text content for input messages in OpenAI response format.
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputText) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputText) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputText) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion struct { // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputText]. Text string `json:"text"` // Any of "input_text", "input_image". Type string `json:"type"` // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage]. Detail ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImageDetail `json:"detail"` // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage]. ImageURL string `json:"image_url"` JSON struct { Text respjson.Field Type respjson.Field Detail respjson.Field ImageURL respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion contains all possible properties and values from ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputText, ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage.
Use the ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) AsAny ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) AsAny() anyResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem
Use the following switch statement to find the correct variant
switch variant := ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion.AsAny().(type) { case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputText: case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage: default: fmt.Errorf("no variant present") }
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) AsInputImage ¶
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) AsInputText ¶
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) RawJSON ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion] // instead of an object. OfResponseObjectStreamResponseOutputItemDoneItemMessageContentArray []ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion `json:",inline"` // This field will be present if the value is a // [[]ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem] // instead of an object. OfVariant2 []ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem `json:",inline"` JSON struct { OfString respjson.Field OfResponseObjectStreamResponseOutputItemDoneItemMessageContentArray respjson.Field OfVariant2 respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion contains all possible properties and values from [string], [[]ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion], [[]ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfResponseObjectStreamResponseOutputItemDoneItemMessageContentArray OfVariant2]
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) AsResponseObjectStreamResponseOutputItemDoneItemMessageContentArray ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) AsResponseObjectStreamResponseOutputItemDoneItemMessageContentArray() (v []ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion)
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) AsString ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) AsString() (v string)
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) AsVariant2 ¶
func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) RawJSON ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemMessageRole ¶
type ResponseObjectStreamResponseOutputItemDoneItemMessageRole string
const ( ResponseObjectStreamResponseOutputItemDoneItemMessageRoleSystem ResponseObjectStreamResponseOutputItemDoneItemMessageRole = "system" ResponseObjectStreamResponseOutputItemDoneItemMessageRoleDeveloper ResponseObjectStreamResponseOutputItemDoneItemMessageRole = "developer" ResponseObjectStreamResponseOutputItemDoneItemMessageRoleUser ResponseObjectStreamResponseOutputItemDoneItemMessageRole = "user" ResponseObjectStreamResponseOutputItemDoneItemMessageRoleAssistant ResponseObjectStreamResponseOutputItemDoneItemMessageRole = "assistant" )
type ResponseObjectStreamResponseOutputItemDoneItemRole ¶
type ResponseObjectStreamResponseOutputItemDoneItemRole string
const ( ResponseObjectStreamResponseOutputItemDoneItemRoleSystem ResponseObjectStreamResponseOutputItemDoneItemRole = "system" ResponseObjectStreamResponseOutputItemDoneItemRoleDeveloper ResponseObjectStreamResponseOutputItemDoneItemRole = "developer" ResponseObjectStreamResponseOutputItemDoneItemRoleUser ResponseObjectStreamResponseOutputItemDoneItemRole = "user" ResponseObjectStreamResponseOutputItemDoneItemRoleAssistant ResponseObjectStreamResponseOutputItemDoneItemRole = "assistant" )
type ResponseObjectStreamResponseOutputItemDoneItemUnion ¶
type ResponseObjectStreamResponseOutputItemDoneItemUnion struct { // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemMessage]. Content ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion `json:"content"` // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemMessage]. Role ResponseObjectStreamResponseOutputItemDoneItemMessageRole `json:"role"` // Any of "message", "web_search_call", "file_search_call", "function_call", // "mcp_call", "mcp_list_tools". Type string `json:"type"` ID string `json:"id"` Status string `json:"status"` // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall]. Queries []string `json:"queries"` // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall]. Results []ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult `json:"results"` Arguments string `json:"arguments"` // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemFunctionCall]. CallID string `json:"call_id"` Name string `json:"name"` ServerLabel string `json:"server_label"` // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemMcpCall]. Error string `json:"error"` // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemMcpCall]. Output string `json:"output"` // This field is from variant // [ResponseObjectStreamResponseOutputItemDoneItemMcpListTools]. Tools []ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool `json:"tools"` JSON struct { Content respjson.Field Role respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field Queries respjson.Field Results respjson.Field Arguments respjson.Field CallID respjson.Field Name respjson.Field ServerLabel respjson.Field Error respjson.Field Output respjson.Field Tools respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamResponseOutputItemDoneItemUnion contains all possible properties and values from ResponseObjectStreamResponseOutputItemDoneItemMessage, ResponseObjectStreamResponseOutputItemDoneItemWebSearchCall, ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall, ResponseObjectStreamResponseOutputItemDoneItemFunctionCall, ResponseObjectStreamResponseOutputItemDoneItemMcpCall, ResponseObjectStreamResponseOutputItemDoneItemMcpListTools.
Use the ResponseObjectStreamResponseOutputItemDoneItemUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsAny ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsAny() anyResponseObjectStreamResponseOutputItemDoneItem
Use the following switch statement to find the correct variant
switch variant := ResponseObjectStreamResponseOutputItemDoneItemUnion.AsAny().(type) { case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemMessage: case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemWebSearchCall: case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall: case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemFunctionCall: case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemMcpCall: case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemMcpListTools: default: fmt.Errorf("no variant present") }
func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsFileSearchCall ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsFileSearchCall() (v ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall)
func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsFunctionCall ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsFunctionCall() (v ResponseObjectStreamResponseOutputItemDoneItemFunctionCall)
func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMcpCall ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMcpCall() (v ResponseObjectStreamResponseOutputItemDoneItemMcpCall)
func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMcpListTools ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMcpListTools() (v ResponseObjectStreamResponseOutputItemDoneItemMcpListTools)
func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMessage ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMessage() (v ResponseObjectStreamResponseOutputItemDoneItemMessage)
func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsWebSearchCall ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) AsWebSearchCall() (v ResponseObjectStreamResponseOutputItemDoneItemWebSearchCall)
func (ResponseObjectStreamResponseOutputItemDoneItemUnion) RawJSON ¶
func (u ResponseObjectStreamResponseOutputItemDoneItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputItemDoneItemWebSearchCall ¶
type ResponseObjectStreamResponseOutputItemDoneItemWebSearchCall struct { // Unique identifier for this tool call ID string `json:"id,required"` // Current status of the web search operation Status string `json:"status,required"` // Tool call type identifier, always "web_search_call" Type constant.WebSearchCall `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Status respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Web search tool call output message for OpenAI responses.
func (ResponseObjectStreamResponseOutputItemDoneItemWebSearchCall) RawJSON ¶
func (r ResponseObjectStreamResponseOutputItemDoneItemWebSearchCall) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputItemDoneItemWebSearchCall) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputItemDoneItemWebSearchCall) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputTextDelta ¶
type ResponseObjectStreamResponseOutputTextDelta struct { // Index position within the text content ContentIndex int64 `json:"content_index,required"` // Incremental text content being added Delta string `json:"delta,required"` // Unique identifier of the output item being updated ItemID string `json:"item_id,required"` // Index position of the item in the output list OutputIndex int64 `json:"output_index,required"` // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Event type identifier, always "response.output_text.delta" Type constant.ResponseOutputTextDelta `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ContentIndex respjson.Field Delta respjson.Field ItemID respjson.Field OutputIndex respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for incremental text content updates.
func (ResponseObjectStreamResponseOutputTextDelta) RawJSON ¶
func (r ResponseObjectStreamResponseOutputTextDelta) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputTextDelta) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputTextDelta) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseOutputTextDone ¶
type ResponseObjectStreamResponseOutputTextDone struct { // Index position within the text content ContentIndex int64 `json:"content_index,required"` // Unique identifier of the completed output item ItemID string `json:"item_id,required"` // Index position of the item in the output list OutputIndex int64 `json:"output_index,required"` // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Final complete text content of the output item Text string `json:"text,required"` // Event type identifier, always "response.output_text.done" Type constant.ResponseOutputTextDone `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ContentIndex respjson.Field ItemID respjson.Field OutputIndex respjson.Field SequenceNumber respjson.Field Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for when text output is completed.
func (ResponseObjectStreamResponseOutputTextDone) RawJSON ¶
func (r ResponseObjectStreamResponseOutputTextDone) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseOutputTextDone) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseOutputTextDone) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseWebSearchCallCompleted ¶
type ResponseObjectStreamResponseWebSearchCallCompleted struct { // Unique identifier of the completed web search call ItemID string `json:"item_id,required"` // Index position of the item in the output list OutputIndex int64 `json:"output_index,required"` // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Event type identifier, always "response.web_search_call.completed" Type constant.ResponseWebSearchCallCompleted `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ItemID respjson.Field OutputIndex respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for completed web search calls.
func (ResponseObjectStreamResponseWebSearchCallCompleted) RawJSON ¶
func (r ResponseObjectStreamResponseWebSearchCallCompleted) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseWebSearchCallCompleted) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseWebSearchCallCompleted) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseWebSearchCallInProgress ¶
type ResponseObjectStreamResponseWebSearchCallInProgress struct { // Unique identifier of the web search call ItemID string `json:"item_id,required"` // Index position of the item in the output list OutputIndex int64 `json:"output_index,required"` // Sequential number for ordering streaming events SequenceNumber int64 `json:"sequence_number,required"` // Event type identifier, always "response.web_search_call.in_progress" Type constant.ResponseWebSearchCallInProgress `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ItemID respjson.Field OutputIndex respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Streaming event for web search calls in progress.
func (ResponseObjectStreamResponseWebSearchCallInProgress) RawJSON ¶
func (r ResponseObjectStreamResponseWebSearchCallInProgress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseWebSearchCallInProgress) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseWebSearchCallInProgress) UnmarshalJSON(data []byte) error
type ResponseObjectStreamResponseWebSearchCallSearching ¶
type ResponseObjectStreamResponseWebSearchCallSearching struct { ItemID string `json:"item_id,required"` OutputIndex int64 `json:"output_index,required"` SequenceNumber int64 `json:"sequence_number,required"` Type constant.ResponseWebSearchCallSearching `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ItemID respjson.Field OutputIndex respjson.Field SequenceNumber respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (ResponseObjectStreamResponseWebSearchCallSearching) RawJSON ¶
func (r ResponseObjectStreamResponseWebSearchCallSearching) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamResponseWebSearchCallSearching) UnmarshalJSON ¶
func (r *ResponseObjectStreamResponseWebSearchCallSearching) UnmarshalJSON(data []byte) error
type ResponseObjectStreamUnion ¶
type ResponseObjectStreamUnion struct { // This field is from variant [ResponseObjectStreamResponseCreated]. Response ResponseObject `json:"response"` // Any of "response.created", "response.output_item.added", // "response.output_item.done", "response.output_text.delta", // "response.output_text.done", "response.function_call_arguments.delta", // "response.function_call_arguments.done", "response.web_search_call.in_progress", // "response.web_search_call.searching", "response.web_search_call.completed", // "response.mcp_list_tools.in_progress", "response.mcp_list_tools.failed", // "response.mcp_list_tools.completed", "response.mcp_call.arguments.delta", // "response.mcp_call.arguments.done", "response.mcp_call.in_progress", // "response.mcp_call.failed", "response.mcp_call.completed", // "response.content_part.added", "response.content_part.done", // "response.completed". Type string `json:"type"` // This field is a union of [ResponseObjectStreamResponseOutputItemAddedItemUnion], // [ResponseObjectStreamResponseOutputItemDoneItemUnion] Item ResponseObjectStreamUnionItem `json:"item"` OutputIndex int64 `json:"output_index"` ResponseID string `json:"response_id"` SequenceNumber int64 `json:"sequence_number"` ContentIndex int64 `json:"content_index"` Delta string `json:"delta"` ItemID string `json:"item_id"` // This field is from variant [ResponseObjectStreamResponseOutputTextDone]. Text string `json:"text"` Arguments string `json:"arguments"` // This field is a union of // [ResponseObjectStreamResponseContentPartAddedPartUnion], // [ResponseObjectStreamResponseContentPartDonePartUnion] Part ResponseObjectStreamUnionPart `json:"part"` JSON struct { Response respjson.Field Type respjson.Field Item respjson.Field OutputIndex respjson.Field ResponseID respjson.Field SequenceNumber respjson.Field ContentIndex respjson.Field Delta respjson.Field ItemID respjson.Field Text respjson.Field Arguments respjson.Field Part respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamUnion contains all possible properties and values from ResponseObjectStreamResponseCreated, ResponseObjectStreamResponseOutputItemAdded, ResponseObjectStreamResponseOutputItemDone, ResponseObjectStreamResponseOutputTextDelta, ResponseObjectStreamResponseOutputTextDone, ResponseObjectStreamResponseFunctionCallArgumentsDelta, ResponseObjectStreamResponseFunctionCallArgumentsDone, ResponseObjectStreamResponseWebSearchCallInProgress, ResponseObjectStreamResponseWebSearchCallSearching, ResponseObjectStreamResponseWebSearchCallCompleted, ResponseObjectStreamResponseMcpListToolsInProgress, ResponseObjectStreamResponseMcpListToolsFailed, ResponseObjectStreamResponseMcpListToolsCompleted, ResponseObjectStreamResponseMcpCallArgumentsDelta, ResponseObjectStreamResponseMcpCallArgumentsDone, ResponseObjectStreamResponseMcpCallInProgress, ResponseObjectStreamResponseMcpCallFailed, ResponseObjectStreamResponseMcpCallCompleted, ResponseObjectStreamResponseContentPartAdded, ResponseObjectStreamResponseContentPartDone, ResponseObjectStreamResponseCompleted.
Use the ResponseObjectStreamUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ResponseObjectStreamUnion) AsAny ¶
func (u ResponseObjectStreamUnion) AsAny() anyResponseObjectStream
Use the following switch statement to find the correct variant
switch variant := ResponseObjectStreamUnion.AsAny().(type) { case llamastackclient.ResponseObjectStreamResponseCreated: case llamastackclient.ResponseObjectStreamResponseOutputItemAdded: case llamastackclient.ResponseObjectStreamResponseOutputItemDone: case llamastackclient.ResponseObjectStreamResponseOutputTextDelta: case llamastackclient.ResponseObjectStreamResponseOutputTextDone: case llamastackclient.ResponseObjectStreamResponseFunctionCallArgumentsDelta: case llamastackclient.ResponseObjectStreamResponseFunctionCallArgumentsDone: case llamastackclient.ResponseObjectStreamResponseWebSearchCallInProgress: case llamastackclient.ResponseObjectStreamResponseWebSearchCallSearching: case llamastackclient.ResponseObjectStreamResponseWebSearchCallCompleted: case llamastackclient.ResponseObjectStreamResponseMcpListToolsInProgress: case llamastackclient.ResponseObjectStreamResponseMcpListToolsFailed: case llamastackclient.ResponseObjectStreamResponseMcpListToolsCompleted: case llamastackclient.ResponseObjectStreamResponseMcpCallArgumentsDelta: case llamastackclient.ResponseObjectStreamResponseMcpCallArgumentsDone: case llamastackclient.ResponseObjectStreamResponseMcpCallInProgress: case llamastackclient.ResponseObjectStreamResponseMcpCallFailed: case llamastackclient.ResponseObjectStreamResponseMcpCallCompleted: case llamastackclient.ResponseObjectStreamResponseContentPartAdded: case llamastackclient.ResponseObjectStreamResponseContentPartDone: case llamastackclient.ResponseObjectStreamResponseCompleted: default: fmt.Errorf("no variant present") }
func (ResponseObjectStreamUnion) AsResponseCompleted ¶
func (u ResponseObjectStreamUnion) AsResponseCompleted() (v ResponseObjectStreamResponseCompleted)
func (ResponseObjectStreamUnion) AsResponseContentPartAdded ¶
func (u ResponseObjectStreamUnion) AsResponseContentPartAdded() (v ResponseObjectStreamResponseContentPartAdded)
func (ResponseObjectStreamUnion) AsResponseContentPartDone ¶
func (u ResponseObjectStreamUnion) AsResponseContentPartDone() (v ResponseObjectStreamResponseContentPartDone)
func (ResponseObjectStreamUnion) AsResponseCreated ¶
func (u ResponseObjectStreamUnion) AsResponseCreated() (v ResponseObjectStreamResponseCreated)
func (ResponseObjectStreamUnion) AsResponseFunctionCallArgumentsDelta ¶
func (u ResponseObjectStreamUnion) AsResponseFunctionCallArgumentsDelta() (v ResponseObjectStreamResponseFunctionCallArgumentsDelta)
func (ResponseObjectStreamUnion) AsResponseFunctionCallArgumentsDone ¶
func (u ResponseObjectStreamUnion) AsResponseFunctionCallArgumentsDone() (v ResponseObjectStreamResponseFunctionCallArgumentsDone)
func (ResponseObjectStreamUnion) AsResponseMcpCallArgumentsDelta ¶
func (u ResponseObjectStreamUnion) AsResponseMcpCallArgumentsDelta() (v ResponseObjectStreamResponseMcpCallArgumentsDelta)
func (ResponseObjectStreamUnion) AsResponseMcpCallArgumentsDone ¶
func (u ResponseObjectStreamUnion) AsResponseMcpCallArgumentsDone() (v ResponseObjectStreamResponseMcpCallArgumentsDone)
func (ResponseObjectStreamUnion) AsResponseMcpCallCompleted ¶
func (u ResponseObjectStreamUnion) AsResponseMcpCallCompleted() (v ResponseObjectStreamResponseMcpCallCompleted)
func (ResponseObjectStreamUnion) AsResponseMcpCallFailed ¶
func (u ResponseObjectStreamUnion) AsResponseMcpCallFailed() (v ResponseObjectStreamResponseMcpCallFailed)
func (ResponseObjectStreamUnion) AsResponseMcpCallInProgress ¶
func (u ResponseObjectStreamUnion) AsResponseMcpCallInProgress() (v ResponseObjectStreamResponseMcpCallInProgress)
func (ResponseObjectStreamUnion) AsResponseMcpListToolsCompleted ¶
func (u ResponseObjectStreamUnion) AsResponseMcpListToolsCompleted() (v ResponseObjectStreamResponseMcpListToolsCompleted)
func (ResponseObjectStreamUnion) AsResponseMcpListToolsFailed ¶
func (u ResponseObjectStreamUnion) AsResponseMcpListToolsFailed() (v ResponseObjectStreamResponseMcpListToolsFailed)
func (ResponseObjectStreamUnion) AsResponseMcpListToolsInProgress ¶
func (u ResponseObjectStreamUnion) AsResponseMcpListToolsInProgress() (v ResponseObjectStreamResponseMcpListToolsInProgress)
func (ResponseObjectStreamUnion) AsResponseOutputItemAdded ¶
func (u ResponseObjectStreamUnion) AsResponseOutputItemAdded() (v ResponseObjectStreamResponseOutputItemAdded)
func (ResponseObjectStreamUnion) AsResponseOutputItemDone ¶
func (u ResponseObjectStreamUnion) AsResponseOutputItemDone() (v ResponseObjectStreamResponseOutputItemDone)
func (ResponseObjectStreamUnion) AsResponseOutputTextDelta ¶
func (u ResponseObjectStreamUnion) AsResponseOutputTextDelta() (v ResponseObjectStreamResponseOutputTextDelta)
func (ResponseObjectStreamUnion) AsResponseOutputTextDone ¶
func (u ResponseObjectStreamUnion) AsResponseOutputTextDone() (v ResponseObjectStreamResponseOutputTextDone)
func (ResponseObjectStreamUnion) AsResponseWebSearchCallCompleted ¶
func (u ResponseObjectStreamUnion) AsResponseWebSearchCallCompleted() (v ResponseObjectStreamResponseWebSearchCallCompleted)
func (ResponseObjectStreamUnion) AsResponseWebSearchCallInProgress ¶
func (u ResponseObjectStreamUnion) AsResponseWebSearchCallInProgress() (v ResponseObjectStreamResponseWebSearchCallInProgress)
func (ResponseObjectStreamUnion) AsResponseWebSearchCallSearching ¶
func (u ResponseObjectStreamUnion) AsResponseWebSearchCallSearching() (v ResponseObjectStreamResponseWebSearchCallSearching)
func (ResponseObjectStreamUnion) RawJSON ¶
func (u ResponseObjectStreamUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectStreamUnion) UnmarshalJSON ¶
func (r *ResponseObjectStreamUnion) UnmarshalJSON(data []byte) error
type ResponseObjectStreamUnionItem ¶
type ResponseObjectStreamUnionItem struct { // This field is a union of // [ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion], // [ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion] Content ResponseObjectStreamUnionItemContent `json:"content"` Role string `json:"role"` Type string `json:"type"` ID string `json:"id"` Status string `json:"status"` Queries []string `json:"queries"` // This field is a union of // [[]ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult], // [[]ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult] Results ResponseObjectStreamUnionItemResults `json:"results"` Arguments string `json:"arguments"` CallID string `json:"call_id"` Name string `json:"name"` ServerLabel string `json:"server_label"` Error string `json:"error"` Output string `json:"output"` // This field is a union of // [[]ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool], // [[]ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool] Tools ResponseObjectStreamUnionItemTools `json:"tools"` JSON struct { Content respjson.Field Role respjson.Field Type respjson.Field ID respjson.Field Status respjson.Field Queries respjson.Field Results respjson.Field Arguments respjson.Field CallID respjson.Field Name respjson.Field ServerLabel respjson.Field Error respjson.Field Output respjson.Field Tools respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamUnionItem is an implicit subunion of ResponseObjectStreamUnion. ResponseObjectStreamUnionItem provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ResponseObjectStreamUnion.
func (*ResponseObjectStreamUnionItem) UnmarshalJSON ¶
func (r *ResponseObjectStreamUnionItem) UnmarshalJSON(data []byte) error
type ResponseObjectStreamUnionItemContent ¶
type ResponseObjectStreamUnionItemContent struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion] // instead of an object. OfResponseObjectStreamResponseOutputItemAddedItemMessageContentArray []ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion `json:",inline"` // This field will be present if the value is a // [[]ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem] // instead of an object. OfVariant2 []ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem `json:",inline"` // This field will be present if the value is a // [[]ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion] // instead of an object. OfResponseObjectStreamResponseOutputItemDoneItemMessageContentArray []ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion `json:",inline"` JSON struct { OfString respjson.Field OfResponseObjectStreamResponseOutputItemAddedItemMessageContentArray respjson.Field OfVariant2 respjson.Field OfResponseObjectStreamResponseOutputItemDoneItemMessageContentArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamUnionItemContent is an implicit subunion of ResponseObjectStreamUnion. ResponseObjectStreamUnionItemContent provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ResponseObjectStreamUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfResponseObjectStreamResponseOutputItemAddedItemMessageContentArray OfVariant2 OfResponseObjectStreamResponseOutputItemDoneItemMessageContentArray]
func (*ResponseObjectStreamUnionItemContent) UnmarshalJSON ¶
func (r *ResponseObjectStreamUnionItemContent) UnmarshalJSON(data []byte) error
type ResponseObjectStreamUnionItemResults ¶
type ResponseObjectStreamUnionItemResults struct { // This field will be present if the value is a // [[]ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult] instead // of an object. OfResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResults []ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult `json:",inline"` // This field will be present if the value is a // [[]ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult] instead // of an object. OfResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResults []ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult `json:",inline"` JSON struct { OfResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResults respjson.Field OfResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResults respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamUnionItemResults is an implicit subunion of ResponseObjectStreamUnion. ResponseObjectStreamUnionItemResults provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ResponseObjectStreamUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResults OfResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResults]
func (*ResponseObjectStreamUnionItemResults) UnmarshalJSON ¶
func (r *ResponseObjectStreamUnionItemResults) UnmarshalJSON(data []byte) error
type ResponseObjectStreamUnionItemTools ¶
type ResponseObjectStreamUnionItemTools struct { // This field will be present if the value is a // [[]ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool] instead of // an object. OfResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTools []ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool `json:",inline"` // This field will be present if the value is a // [[]ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool] instead of an // object. OfResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTools []ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool `json:",inline"` JSON struct { OfResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTools respjson.Field OfResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTools respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamUnionItemTools is an implicit subunion of ResponseObjectStreamUnion. ResponseObjectStreamUnionItemTools provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ResponseObjectStreamUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTools OfResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTools]
func (*ResponseObjectStreamUnionItemTools) UnmarshalJSON ¶
func (r *ResponseObjectStreamUnionItemTools) UnmarshalJSON(data []byte) error
type ResponseObjectStreamUnionPart ¶
type ResponseObjectStreamUnionPart struct { Text string `json:"text"` Type string `json:"type"` Refusal string `json:"refusal"` JSON struct { Text respjson.Field Type respjson.Field Refusal respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectStreamUnionPart is an implicit subunion of ResponseObjectStreamUnion. ResponseObjectStreamUnionPart provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ResponseObjectStreamUnion.
func (*ResponseObjectStreamUnionPart) UnmarshalJSON ¶
func (r *ResponseObjectStreamUnionPart) UnmarshalJSON(data []byte) error
type ResponseObjectText ¶
type ResponseObjectText struct { // (Optional) Text format configuration specifying output format requirements Format ResponseObjectTextFormat `json:"format"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Format respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Text formatting configuration for the response
func (ResponseObjectText) RawJSON ¶
func (r ResponseObjectText) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectText) UnmarshalJSON ¶
func (r *ResponseObjectText) UnmarshalJSON(data []byte) error
type ResponseObjectTextFormat ¶
type ResponseObjectTextFormat struct { // Must be "text", "json_schema", or "json_object" to identify the format type // // Any of "text", "json_schema", "json_object". Type ResponseObjectTextFormatType `json:"type,required"` // (Optional) A description of the response format. Only used for json_schema. Description string `json:"description"` // The name of the response format. Only used for json_schema. Name string `json:"name"` // The JSON schema the response should conform to. In a Python SDK, this is often a // `pydantic` model. Only used for json_schema. Schema map[string]ResponseObjectTextFormatSchemaUnion `json:"schema"` // (Optional) Whether to strictly enforce the JSON schema. If true, the response // must match the schema exactly. Only used for json_schema. Strict bool `json:"strict"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Type respjson.Field Description respjson.Field Name respjson.Field Schema respjson.Field Strict respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Text format configuration specifying output format requirements
func (ResponseObjectTextFormat) RawJSON ¶
func (r ResponseObjectTextFormat) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectTextFormat) UnmarshalJSON ¶
func (r *ResponseObjectTextFormat) UnmarshalJSON(data []byte) error
type ResponseObjectTextFormatSchemaUnion ¶
type ResponseObjectTextFormatSchemaUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ResponseObjectTextFormatSchemaUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ResponseObjectTextFormatSchemaUnion) AsAnyArray ¶
func (u ResponseObjectTextFormatSchemaUnion) AsAnyArray() (v []any)
func (ResponseObjectTextFormatSchemaUnion) AsBool ¶
func (u ResponseObjectTextFormatSchemaUnion) AsBool() (v bool)
func (ResponseObjectTextFormatSchemaUnion) AsFloat ¶
func (u ResponseObjectTextFormatSchemaUnion) AsFloat() (v float64)
func (ResponseObjectTextFormatSchemaUnion) AsString ¶
func (u ResponseObjectTextFormatSchemaUnion) AsString() (v string)
func (ResponseObjectTextFormatSchemaUnion) RawJSON ¶
func (u ResponseObjectTextFormatSchemaUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseObjectTextFormatSchemaUnion) UnmarshalJSON ¶
func (r *ResponseObjectTextFormatSchemaUnion) UnmarshalJSON(data []byte) error
type ResponseObjectTextFormatType ¶
type ResponseObjectTextFormatType string
Must be "text", "json_schema", or "json_object" to identify the format type
const ( ResponseObjectTextFormatTypeText ResponseObjectTextFormatType = "text" ResponseObjectTextFormatTypeJsonSchema ResponseObjectTextFormatType = "json_schema" ResponseObjectTextFormatTypeJsonObject ResponseObjectTextFormatType = "json_object" )
type ResponseService ¶
type ResponseService struct { Options []option.RequestOption InputItems ResponseInputItemService }
ResponseService contains methods and other services that help with interacting with the llama-stack-client 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) Get ¶
func (r *ResponseService) Get(ctx context.Context, responseID string, opts ...option.RequestOption) (res *ResponseObject, err error)
Retrieve an OpenAI response by its ID.
func (*ResponseService) List ¶
func (r *ResponseService) List(ctx context.Context, query ResponseListParams, opts ...option.RequestOption) (res *pagination.OpenAICursorPage[ResponseListResponse], err error)
List all OpenAI responses.
func (*ResponseService) ListAutoPaging ¶
func (r *ResponseService) ListAutoPaging(ctx context.Context, query ResponseListParams, opts ...option.RequestOption) *pagination.OpenAICursorPageAutoPager[ResponseListResponse]
List all OpenAI responses.
func (*ResponseService) New ¶
func (r *ResponseService) New(ctx context.Context, body ResponseNewParams, opts ...option.RequestOption) (res *ResponseObject, err error)
Create a new OpenAI response.
func (*ResponseService) NewStreaming ¶
func (r *ResponseService) NewStreaming(ctx context.Context, body ResponseNewParams, opts ...option.RequestOption) (stream *ssestream.Stream[ResponseObjectStreamUnion])
Create a new OpenAI response.
type ReturnTypeParam ¶
type ReturnTypeParam = shared.ReturnTypeParam
This is an alias to an internal type.
type ReturnTypeType ¶
type ReturnTypeType = shared.ReturnTypeType
This is an alias to an internal type.
type RouteInfo ¶
type RouteInfo struct { // HTTP method for the route Method string `json:"method,required"` // List of provider types that implement this route ProviderTypes []string `json:"provider_types,required"` // The API endpoint path Route string `json:"route,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Method respjson.Field ProviderTypes respjson.Field Route respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Information about an API route including its path, method, and implementing providers.
func (*RouteInfo) UnmarshalJSON ¶
type RouteService ¶
type RouteService struct {
Options []option.RequestOption
}
RouteService contains methods and other services that help with interacting with the llama-stack-client 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 *[]RouteInfo, err error)
List all available API routes with their methods and implementing providers.
type RunShieldResponse ¶
type RunShieldResponse struct { // (Optional) Safety violation detected by the shield, if any Violation shared.SafetyViolation `json:"violation"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Violation respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from running a safety shield.
func (RunShieldResponse) RawJSON ¶
func (r RunShieldResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*RunShieldResponse) UnmarshalJSON ¶
func (r *RunShieldResponse) UnmarshalJSON(data []byte) error
type SafetyRunShieldParams ¶
type SafetyRunShieldParams struct { // The messages to run the shield on. Messages []shared.MessageUnionParam `json:"messages,omitzero,required"` // The parameters of the shield. Params map[string]SafetyRunShieldParamsParamUnion `json:"params,omitzero,required"` // The identifier of the shield to run. ShieldID string `json:"shield_id,required"` // contains filtered or unexported fields }
func (SafetyRunShieldParams) MarshalJSON ¶
func (r SafetyRunShieldParams) MarshalJSON() (data []byte, err error)
func (*SafetyRunShieldParams) UnmarshalJSON ¶
func (r *SafetyRunShieldParams) UnmarshalJSON(data []byte) error
type SafetyRunShieldParamsParamUnion ¶
type SafetyRunShieldParamsParamUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (SafetyRunShieldParamsParamUnion) MarshalJSON ¶
func (u SafetyRunShieldParamsParamUnion) MarshalJSON() ([]byte, error)
func (*SafetyRunShieldParamsParamUnion) UnmarshalJSON ¶
func (u *SafetyRunShieldParamsParamUnion) UnmarshalJSON(data []byte) error
type SafetyService ¶
type SafetyService struct {
Options []option.RequestOption
}
SafetyService contains methods and other services that help with interacting with the llama-stack-client 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 NewSafetyService method instead.
func NewSafetyService ¶
func NewSafetyService(opts ...option.RequestOption) (r SafetyService)
NewSafetyService 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 (*SafetyService) RunShield ¶
func (r *SafetyService) RunShield(ctx context.Context, body SafetyRunShieldParams, opts ...option.RequestOption) (res *RunShieldResponse, err error)
Run a shield.
type SafetyViolation ¶
type SafetyViolation = shared.SafetyViolation
Details of a safety violation detected by content moderation.
This is an alias to an internal type.
type SafetyViolationMetadataUnion ¶
type SafetyViolationMetadataUnion = shared.SafetyViolationMetadataUnion
This is an alias to an internal type.
type SafetyViolationViolationLevel ¶
type SafetyViolationViolationLevel = shared.SafetyViolationViolationLevel
Severity level of the violation
This is an alias to an internal type.
type SamplingParams ¶
type SamplingParams = shared.SamplingParams
Sampling parameters.
This is an alias to an internal type.
type SamplingParamsResp ¶
type SamplingParamsResp = shared.SamplingParamsResp
Sampling parameters.
This is an alias to an internal type.
type SamplingParamsStrategyGreedy ¶
type SamplingParamsStrategyGreedy = shared.SamplingParamsStrategyGreedy
Greedy sampling strategy that selects the highest probability token at each step.
This is an alias to an internal type.
type SamplingParamsStrategyGreedyResp ¶
type SamplingParamsStrategyGreedyResp = shared.SamplingParamsStrategyGreedyResp
Greedy sampling strategy that selects the highest probability token at each step.
This is an alias to an internal type.
type SamplingParamsStrategyTopK ¶
type SamplingParamsStrategyTopK = shared.SamplingParamsStrategyTopK
Top-k sampling strategy that restricts sampling to the k most likely tokens.
This is an alias to an internal type.
type SamplingParamsStrategyTopKResp ¶
type SamplingParamsStrategyTopKResp = shared.SamplingParamsStrategyTopKResp
Top-k sampling strategy that restricts sampling to the k most likely tokens.
This is an alias to an internal type.
type SamplingParamsStrategyTopP ¶
type SamplingParamsStrategyTopP = shared.SamplingParamsStrategyTopP
Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p.
This is an alias to an internal type.
type SamplingParamsStrategyTopPResp ¶
type SamplingParamsStrategyTopPResp = shared.SamplingParamsStrategyTopPResp
Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p.
This is an alias to an internal type.
type SamplingParamsStrategyUnion ¶
type SamplingParamsStrategyUnion = shared.SamplingParamsStrategyUnion
The sampling strategy.
This is an alias to an internal type.
type SamplingParamsStrategyUnionResp ¶
type SamplingParamsStrategyUnionResp = shared.SamplingParamsStrategyUnionResp
The sampling strategy.
This is an alias to an internal type.
type ScoringFn ¶
type ScoringFn struct { Identifier string `json:"identifier,required"` Metadata map[string]ScoringFnMetadataUnion `json:"metadata,required"` ProviderID string `json:"provider_id,required"` ReturnType shared.ReturnType `json:"return_type,required"` // The resource type, always scoring_function Type constant.ScoringFunction `json:"type,required"` Description string `json:"description"` // Parameters for LLM-as-judge scoring function configuration. Params ScoringFnParamsUnionResp `json:"params"` ProviderResourceID string `json:"provider_resource_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Identifier respjson.Field Metadata respjson.Field ProviderID respjson.Field ReturnType respjson.Field Type respjson.Field Description respjson.Field Params respjson.Field ProviderResourceID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A scoring function resource for evaluating model outputs.
func (*ScoringFn) UnmarshalJSON ¶
type ScoringFnMetadataUnion ¶
type ScoringFnMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ScoringFnMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ScoringFnMetadataUnion) AsAnyArray ¶
func (u ScoringFnMetadataUnion) AsAnyArray() (v []any)
func (ScoringFnMetadataUnion) AsBool ¶
func (u ScoringFnMetadataUnion) AsBool() (v bool)
func (ScoringFnMetadataUnion) AsFloat ¶
func (u ScoringFnMetadataUnion) AsFloat() (v float64)
func (ScoringFnMetadataUnion) AsString ¶
func (u ScoringFnMetadataUnion) AsString() (v string)
func (ScoringFnMetadataUnion) RawJSON ¶
func (u ScoringFnMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScoringFnMetadataUnion) UnmarshalJSON ¶
func (r *ScoringFnMetadataUnion) UnmarshalJSON(data []byte) error
type ScoringFnParamsBasic ¶
type ScoringFnParamsBasic struct { // Aggregation functions to apply to the scores of each row // // Any of "average", "weighted_average", "median", "categorical_count", "accuracy". AggregationFunctions []string `json:"aggregation_functions,omitzero,required"` // The type of scoring function parameters, always basic // // This field can be elided, and will marshal its zero value as "basic". Type constant.Basic `json:"type,required"` // contains filtered or unexported fields }
Parameters for basic scoring function configuration.
The properties AggregationFunctions, Type are required.
func (ScoringFnParamsBasic) MarshalJSON ¶
func (r ScoringFnParamsBasic) MarshalJSON() (data []byte, err error)
func (*ScoringFnParamsBasic) UnmarshalJSON ¶
func (r *ScoringFnParamsBasic) UnmarshalJSON(data []byte) error
type ScoringFnParamsBasicResp ¶
type ScoringFnParamsBasicResp struct { // Aggregation functions to apply to the scores of each row // // Any of "average", "weighted_average", "median", "categorical_count", "accuracy". AggregationFunctions []string `json:"aggregation_functions,required"` // The type of scoring function parameters, always basic Type constant.Basic `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AggregationFunctions respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Parameters for basic scoring function configuration.
func (ScoringFnParamsBasicResp) RawJSON ¶
func (r ScoringFnParamsBasicResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScoringFnParamsBasicResp) UnmarshalJSON ¶
func (r *ScoringFnParamsBasicResp) UnmarshalJSON(data []byte) error
type ScoringFnParamsLlmAsJudge ¶
type ScoringFnParamsLlmAsJudge struct { // Aggregation functions to apply to the scores of each row // // Any of "average", "weighted_average", "median", "categorical_count", "accuracy". AggregationFunctions []string `json:"aggregation_functions,omitzero,required"` // Identifier of the LLM model to use as a judge for scoring JudgeModel string `json:"judge_model,required"` // Regexes to extract the answer from generated response JudgeScoreRegexes []string `json:"judge_score_regexes,omitzero,required"` // (Optional) Custom prompt template for the judge model PromptTemplate param.Opt[string] `json:"prompt_template,omitzero"` // The type of scoring function parameters, always llm_as_judge // // This field can be elided, and will marshal its zero value as "llm_as_judge". Type constant.LlmAsJudge `json:"type,required"` // contains filtered or unexported fields }
Parameters for LLM-as-judge scoring function configuration.
The properties AggregationFunctions, JudgeModel, JudgeScoreRegexes, Type are required.
func (ScoringFnParamsLlmAsJudge) MarshalJSON ¶
func (r ScoringFnParamsLlmAsJudge) MarshalJSON() (data []byte, err error)
func (*ScoringFnParamsLlmAsJudge) UnmarshalJSON ¶
func (r *ScoringFnParamsLlmAsJudge) UnmarshalJSON(data []byte) error
type ScoringFnParamsLlmAsJudgeResp ¶
type ScoringFnParamsLlmAsJudgeResp struct { // Aggregation functions to apply to the scores of each row // // Any of "average", "weighted_average", "median", "categorical_count", "accuracy". AggregationFunctions []string `json:"aggregation_functions,required"` // Identifier of the LLM model to use as a judge for scoring JudgeModel string `json:"judge_model,required"` // Regexes to extract the answer from generated response JudgeScoreRegexes []string `json:"judge_score_regexes,required"` // The type of scoring function parameters, always llm_as_judge Type constant.LlmAsJudge `json:"type,required"` // (Optional) Custom prompt template for the judge model PromptTemplate string `json:"prompt_template"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AggregationFunctions respjson.Field JudgeModel respjson.Field JudgeScoreRegexes respjson.Field Type respjson.Field PromptTemplate respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Parameters for LLM-as-judge scoring function configuration.
func (ScoringFnParamsLlmAsJudgeResp) RawJSON ¶
func (r ScoringFnParamsLlmAsJudgeResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScoringFnParamsLlmAsJudgeResp) UnmarshalJSON ¶
func (r *ScoringFnParamsLlmAsJudgeResp) UnmarshalJSON(data []byte) error
type ScoringFnParamsRegexParser ¶
type ScoringFnParamsRegexParser struct { // Aggregation functions to apply to the scores of each row // // Any of "average", "weighted_average", "median", "categorical_count", "accuracy". AggregationFunctions []string `json:"aggregation_functions,omitzero,required"` // Regex to extract the answer from generated response ParsingRegexes []string `json:"parsing_regexes,omitzero,required"` // The type of scoring function parameters, always regex_parser // // This field can be elided, and will marshal its zero value as "regex_parser". Type constant.RegexParser `json:"type,required"` // contains filtered or unexported fields }
Parameters for regex parser scoring function configuration.
The properties AggregationFunctions, ParsingRegexes, Type are required.
func (ScoringFnParamsRegexParser) MarshalJSON ¶
func (r ScoringFnParamsRegexParser) MarshalJSON() (data []byte, err error)
func (*ScoringFnParamsRegexParser) UnmarshalJSON ¶
func (r *ScoringFnParamsRegexParser) UnmarshalJSON(data []byte) error
type ScoringFnParamsRegexParserResp ¶
type ScoringFnParamsRegexParserResp struct { // Aggregation functions to apply to the scores of each row // // Any of "average", "weighted_average", "median", "categorical_count", "accuracy". AggregationFunctions []string `json:"aggregation_functions,required"` // Regex to extract the answer from generated response ParsingRegexes []string `json:"parsing_regexes,required"` // The type of scoring function parameters, always regex_parser Type constant.RegexParser `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AggregationFunctions respjson.Field ParsingRegexes respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Parameters for regex parser scoring function configuration.
func (ScoringFnParamsRegexParserResp) RawJSON ¶
func (r ScoringFnParamsRegexParserResp) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScoringFnParamsRegexParserResp) UnmarshalJSON ¶
func (r *ScoringFnParamsRegexParserResp) UnmarshalJSON(data []byte) error
type ScoringFnParamsUnion ¶
type ScoringFnParamsUnion struct { OfLlmAsJudge *ScoringFnParamsLlmAsJudge `json:",omitzero,inline"` OfRegexParser *ScoringFnParamsRegexParser `json:",omitzero,inline"` OfBasic *ScoringFnParamsBasic `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func ScoringFnParamsOfBasic ¶
func ScoringFnParamsOfBasic(aggregationFunctions []string) ScoringFnParamsUnion
func ScoringFnParamsOfLlmAsJudge ¶
func ScoringFnParamsOfLlmAsJudge(aggregationFunctions []string, judgeModel string, judgeScoreRegexes []string) ScoringFnParamsUnion
func ScoringFnParamsOfRegexParser ¶
func ScoringFnParamsOfRegexParser(aggregationFunctions []string, parsingRegexes []string) ScoringFnParamsUnion
func (ScoringFnParamsUnion) GetAggregationFunctions ¶
func (u ScoringFnParamsUnion) GetAggregationFunctions() []string
Returns a pointer to the underlying variant's AggregationFunctions property, if present.
func (ScoringFnParamsUnion) GetJudgeModel ¶
func (u ScoringFnParamsUnion) GetJudgeModel() *string
Returns a pointer to the underlying variant's property, if present.
func (ScoringFnParamsUnion) GetJudgeScoreRegexes ¶
func (u ScoringFnParamsUnion) GetJudgeScoreRegexes() []string
Returns a pointer to the underlying variant's property, if present.
func (ScoringFnParamsUnion) GetParsingRegexes ¶
func (u ScoringFnParamsUnion) GetParsingRegexes() []string
Returns a pointer to the underlying variant's property, if present.
func (ScoringFnParamsUnion) GetPromptTemplate ¶
func (u ScoringFnParamsUnion) GetPromptTemplate() *string
Returns a pointer to the underlying variant's property, if present.
func (ScoringFnParamsUnion) GetType ¶
func (u ScoringFnParamsUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (ScoringFnParamsUnion) MarshalJSON ¶
func (u ScoringFnParamsUnion) MarshalJSON() ([]byte, error)
func (*ScoringFnParamsUnion) UnmarshalJSON ¶
func (u *ScoringFnParamsUnion) UnmarshalJSON(data []byte) error
type ScoringFnParamsUnionResp ¶
type ScoringFnParamsUnionResp struct { AggregationFunctions []string `json:"aggregation_functions"` // This field is from variant [ScoringFnParamsLlmAsJudgeResp]. JudgeModel string `json:"judge_model"` // This field is from variant [ScoringFnParamsLlmAsJudgeResp]. JudgeScoreRegexes []string `json:"judge_score_regexes"` // Any of "llm_as_judge", "regex_parser", "basic". Type string `json:"type"` // This field is from variant [ScoringFnParamsLlmAsJudgeResp]. PromptTemplate string `json:"prompt_template"` // This field is from variant [ScoringFnParamsRegexParserResp]. ParsingRegexes []string `json:"parsing_regexes"` JSON struct { AggregationFunctions respjson.Field JudgeModel respjson.Field JudgeScoreRegexes respjson.Field Type respjson.Field PromptTemplate respjson.Field ParsingRegexes respjson.Field // contains filtered or unexported fields } `json:"-"` }
ScoringFnParamsUnionResp contains all possible properties and values from ScoringFnParamsLlmAsJudgeResp, ScoringFnParamsRegexParserResp, ScoringFnParamsBasicResp.
Use the ScoringFnParamsUnionResp.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ScoringFnParamsUnionResp) AsAny ¶
func (u ScoringFnParamsUnionResp) AsAny() anyScoringFnParamsResp
Use the following switch statement to find the correct variant
switch variant := ScoringFnParamsUnionResp.AsAny().(type) { case llamastackclient.ScoringFnParamsLlmAsJudgeResp: case llamastackclient.ScoringFnParamsRegexParserResp: case llamastackclient.ScoringFnParamsBasicResp: default: fmt.Errorf("no variant present") }
func (ScoringFnParamsUnionResp) AsBasic ¶
func (u ScoringFnParamsUnionResp) AsBasic() (v ScoringFnParamsBasicResp)
func (ScoringFnParamsUnionResp) AsLlmAsJudge ¶
func (u ScoringFnParamsUnionResp) AsLlmAsJudge() (v ScoringFnParamsLlmAsJudgeResp)
func (ScoringFnParamsUnionResp) AsRegexParser ¶
func (u ScoringFnParamsUnionResp) AsRegexParser() (v ScoringFnParamsRegexParserResp)
func (ScoringFnParamsUnionResp) RawJSON ¶
func (u ScoringFnParamsUnionResp) RawJSON() string
Returns the unmodified JSON received from the API
func (ScoringFnParamsUnionResp) ToParam ¶
func (r ScoringFnParamsUnionResp) ToParam() ScoringFnParamsUnion
ToParam converts this ScoringFnParamsUnionResp to a ScoringFnParamsUnion.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ScoringFnParamsUnion.Overrides()
func (*ScoringFnParamsUnionResp) UnmarshalJSON ¶
func (r *ScoringFnParamsUnionResp) UnmarshalJSON(data []byte) error
type ScoringFunctionRegisterParams ¶
type ScoringFunctionRegisterParams struct { // The description of the scoring function. Description string `json:"description,required"` ReturnType shared.ReturnTypeParam `json:"return_type,omitzero,required"` // The ID of the scoring function to register. ScoringFnID string `json:"scoring_fn_id,required"` // The ID of the provider to use for the scoring function. ProviderID param.Opt[string] `json:"provider_id,omitzero"` // The ID of the provider scoring function to use for the scoring function. ProviderScoringFnID param.Opt[string] `json:"provider_scoring_fn_id,omitzero"` // The parameters for the scoring function for benchmark eval, these can be // overridden for app eval. Params ScoringFnParamsUnion `json:"params,omitzero"` // contains filtered or unexported fields }
func (ScoringFunctionRegisterParams) MarshalJSON ¶
func (r ScoringFunctionRegisterParams) MarshalJSON() (data []byte, err error)
func (*ScoringFunctionRegisterParams) UnmarshalJSON ¶
func (r *ScoringFunctionRegisterParams) UnmarshalJSON(data []byte) error
type ScoringFunctionService ¶
type ScoringFunctionService struct {
Options []option.RequestOption
}
ScoringFunctionService contains methods and other services that help with interacting with the llama-stack-client 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 NewScoringFunctionService method instead.
func NewScoringFunctionService ¶
func NewScoringFunctionService(opts ...option.RequestOption) (r ScoringFunctionService)
NewScoringFunctionService 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 (*ScoringFunctionService) Get ¶
func (r *ScoringFunctionService) Get(ctx context.Context, scoringFnID string, opts ...option.RequestOption) (res *ScoringFn, err error)
Get a scoring function by its ID.
func (*ScoringFunctionService) List ¶
func (r *ScoringFunctionService) List(ctx context.Context, opts ...option.RequestOption) (res *[]ScoringFn, err error)
List all scoring functions.
func (*ScoringFunctionService) Register ¶
func (r *ScoringFunctionService) Register(ctx context.Context, body ScoringFunctionRegisterParams, opts ...option.RequestOption) (err error)
Register a scoring function.
type ScoringResult ¶
type ScoringResult = shared.ScoringResult
A scoring result for a single row.
This is an alias to an internal type.
type ScoringResultAggregatedResultUnion ¶
type ScoringResultAggregatedResultUnion = shared.ScoringResultAggregatedResultUnion
This is an alias to an internal type.
type ScoringResultScoreRowUnion ¶
type ScoringResultScoreRowUnion = shared.ScoringResultScoreRowUnion
This is an alias to an internal type.
type ScoringScoreBatchParams ¶
type ScoringScoreBatchParams struct { // The ID of the dataset to score. DatasetID string `json:"dataset_id,required"` // Whether to save the results to a dataset. SaveResultsDataset bool `json:"save_results_dataset,required"` // The scoring functions to use for the scoring. ScoringFunctions map[string]ScoringFnParamsUnion `json:"scoring_functions,omitzero,required"` // contains filtered or unexported fields }
func (ScoringScoreBatchParams) MarshalJSON ¶
func (r ScoringScoreBatchParams) MarshalJSON() (data []byte, err error)
func (*ScoringScoreBatchParams) UnmarshalJSON ¶
func (r *ScoringScoreBatchParams) UnmarshalJSON(data []byte) error
type ScoringScoreBatchResponse ¶
type ScoringScoreBatchResponse struct { // A map of scoring function name to ScoringResult Results map[string]shared.ScoringResult `json:"results,required"` // (Optional) The identifier of the dataset that was scored DatasetID string `json:"dataset_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Results respjson.Field DatasetID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from batch scoring operations on datasets.
func (ScoringScoreBatchResponse) RawJSON ¶
func (r ScoringScoreBatchResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScoringScoreBatchResponse) UnmarshalJSON ¶
func (r *ScoringScoreBatchResponse) UnmarshalJSON(data []byte) error
type ScoringScoreParams ¶
type ScoringScoreParams struct { // The rows to score. InputRows []map[string]ScoringScoreParamsInputRowUnion `json:"input_rows,omitzero,required"` // The scoring functions to use for the scoring. ScoringFunctions map[string]ScoringFnParamsUnion `json:"scoring_functions,omitzero,required"` // contains filtered or unexported fields }
func (ScoringScoreParams) MarshalJSON ¶
func (r ScoringScoreParams) MarshalJSON() (data []byte, err error)
func (*ScoringScoreParams) UnmarshalJSON ¶
func (r *ScoringScoreParams) UnmarshalJSON(data []byte) error
type ScoringScoreParamsInputRowUnion ¶
type ScoringScoreParamsInputRowUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ScoringScoreParamsInputRowUnion) MarshalJSON ¶
func (u ScoringScoreParamsInputRowUnion) MarshalJSON() ([]byte, error)
func (*ScoringScoreParamsInputRowUnion) UnmarshalJSON ¶
func (u *ScoringScoreParamsInputRowUnion) UnmarshalJSON(data []byte) error
type ScoringScoreResponse ¶
type ScoringScoreResponse struct { // A map of scoring function name to ScoringResult. Results map[string]shared.ScoringResult `json:"results,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Results respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
The response from scoring.
func (ScoringScoreResponse) RawJSON ¶
func (r ScoringScoreResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScoringScoreResponse) UnmarshalJSON ¶
func (r *ScoringScoreResponse) UnmarshalJSON(data []byte) error
type ScoringService ¶
type ScoringService struct {
Options []option.RequestOption
}
ScoringService contains methods and other services that help with interacting with the llama-stack-client 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 NewScoringService method instead.
func NewScoringService ¶
func NewScoringService(opts ...option.RequestOption) (r ScoringService)
NewScoringService 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 (*ScoringService) Score ¶
func (r *ScoringService) Score(ctx context.Context, body ScoringScoreParams, opts ...option.RequestOption) (res *ScoringScoreResponse, err error)
Score a list of rows.
func (*ScoringService) ScoreBatch ¶
func (r *ScoringService) ScoreBatch(ctx context.Context, body ScoringScoreBatchParams, opts ...option.RequestOption) (res *ScoringScoreBatchResponse, err error)
Score a batch of rows.
type Session ¶
type Session struct { // Unique identifier for the conversation session SessionID string `json:"session_id,required"` // Human-readable name for the session SessionName string `json:"session_name,required"` // Timestamp when the session was created StartedAt time.Time `json:"started_at,required" format:"date-time"` // List of all turns that have occurred in this session Turns []Turn `json:"turns,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { SessionID respjson.Field SessionName respjson.Field StartedAt respjson.Field Turns respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A single session of an interaction with an Agentic System.
func (*Session) UnmarshalJSON ¶
type SharedCompletionResponse ¶
type SharedCompletionResponse = shared.SharedCompletionResponse
Response from a completion request.
This is an alias to an internal type.
type SharedCompletionResponseLogprob ¶
type SharedCompletionResponseLogprob = shared.SharedCompletionResponseLogprob
Log probabilities for generated tokens.
This is an alias to an internal type.
type SharedCompletionResponseMetric ¶
type SharedCompletionResponseMetric = shared.SharedCompletionResponseMetric
A metric value included in API responses.
This is an alias to an internal type.
type SharedCompletionResponseStopReason ¶
type SharedCompletionResponseStopReason = shared.SharedCompletionResponseStopReason
Reason why generation stopped
This is an alias to an internal type.
type SharedToolDef ¶
type SharedToolDef = shared.SharedToolDef
Tool definition used in runtime contexts.
This is an alias to an internal type.
type SharedToolDefMetadataUnion ¶
type SharedToolDefMetadataUnion = shared.SharedToolDefMetadataUnion
This is an alias to an internal type.
type SharedToolDefMetadataUnionParam ¶
type SharedToolDefMetadataUnionParam = shared.SharedToolDefMetadataUnionParam
This is an alias to an internal type.
type SharedToolDefParam ¶
type SharedToolDefParam = shared.SharedToolDefParam
Tool definition used in runtime contexts.
This is an alias to an internal type.
type SharedToolDefParameter ¶
type SharedToolDefParameter = shared.SharedToolDefParameter
Parameter definition for a tool.
This is an alias to an internal type.
type SharedToolDefParameterDefaultUnion ¶
type SharedToolDefParameterDefaultUnion = shared.SharedToolDefParameterDefaultUnion
(Optional) Default value for the parameter if not provided
This is an alias to an internal type.
type SharedToolDefParameterDefaultUnionParam ¶
type SharedToolDefParameterDefaultUnionParam = shared.SharedToolDefParameterDefaultUnionParam
(Optional) Default value for the parameter if not provided
This is an alias to an internal type.
type SharedToolDefParameterParam ¶
type SharedToolDefParameterParam = shared.SharedToolDefParameterParam
Parameter definition for a tool.
This is an alias to an internal type.
type Shield ¶
type Shield struct { Identifier string `json:"identifier,required"` ProviderID string `json:"provider_id,required"` // The resource type, always shield Type constant.Shield `json:"type,required"` // (Optional) Configuration parameters for the shield Params map[string]ShieldParamUnion `json:"params"` ProviderResourceID string `json:"provider_resource_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Identifier respjson.Field ProviderID respjson.Field Type respjson.Field Params respjson.Field ProviderResourceID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A safety shield resource that can be used to check content.
func (*Shield) UnmarshalJSON ¶
type ShieldCallStep ¶
type ShieldCallStep struct { // The ID of the step. StepID string `json:"step_id,required"` // Type of the step in an agent turn. StepType constant.ShieldCall `json:"step_type,required"` // The ID of the turn. TurnID string `json:"turn_id,required"` // The time the step completed. CompletedAt time.Time `json:"completed_at" format:"date-time"` // The time the step started. StartedAt time.Time `json:"started_at" format:"date-time"` // The violation from the shield call. Violation shared.SafetyViolation `json:"violation"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { StepID respjson.Field StepType respjson.Field TurnID respjson.Field CompletedAt respjson.Field StartedAt respjson.Field Violation respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A shield call step in an agent turn.
func (ShieldCallStep) RawJSON ¶
func (r ShieldCallStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*ShieldCallStep) UnmarshalJSON ¶
func (r *ShieldCallStep) UnmarshalJSON(data []byte) error
type ShieldParamUnion ¶
type ShieldParamUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ShieldParamUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ShieldParamUnion) AsAnyArray ¶
func (u ShieldParamUnion) AsAnyArray() (v []any)
func (ShieldParamUnion) AsBool ¶
func (u ShieldParamUnion) AsBool() (v bool)
func (ShieldParamUnion) AsFloat ¶
func (u ShieldParamUnion) AsFloat() (v float64)
func (ShieldParamUnion) AsString ¶
func (u ShieldParamUnion) AsString() (v string)
func (ShieldParamUnion) RawJSON ¶
func (u ShieldParamUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ShieldParamUnion) UnmarshalJSON ¶
func (r *ShieldParamUnion) UnmarshalJSON(data []byte) error
type ShieldRegisterParams ¶
type ShieldRegisterParams struct { // The identifier of the shield to register. ShieldID string `json:"shield_id,required"` // The identifier of the provider. ProviderID param.Opt[string] `json:"provider_id,omitzero"` // The identifier of the shield in the provider. ProviderShieldID param.Opt[string] `json:"provider_shield_id,omitzero"` // The parameters of the shield. Params map[string]ShieldRegisterParamsParamUnion `json:"params,omitzero"` // contains filtered or unexported fields }
func (ShieldRegisterParams) MarshalJSON ¶
func (r ShieldRegisterParams) MarshalJSON() (data []byte, err error)
func (*ShieldRegisterParams) UnmarshalJSON ¶
func (r *ShieldRegisterParams) UnmarshalJSON(data []byte) error
type ShieldRegisterParamsParamUnion ¶
type ShieldRegisterParamsParamUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ShieldRegisterParamsParamUnion) MarshalJSON ¶
func (u ShieldRegisterParamsParamUnion) MarshalJSON() ([]byte, error)
func (*ShieldRegisterParamsParamUnion) UnmarshalJSON ¶
func (u *ShieldRegisterParamsParamUnion) UnmarshalJSON(data []byte) error
type ShieldService ¶
type ShieldService struct {
Options []option.RequestOption
}
ShieldService contains methods and other services that help with interacting with the llama-stack-client 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 NewShieldService method instead.
func NewShieldService ¶
func NewShieldService(opts ...option.RequestOption) (r ShieldService)
NewShieldService 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 (*ShieldService) Get ¶
func (r *ShieldService) Get(ctx context.Context, identifier string, opts ...option.RequestOption) (res *Shield, err error)
Get a shield by its identifier.
func (*ShieldService) List ¶
func (r *ShieldService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Shield, err error)
List all shields.
func (*ShieldService) Register ¶
func (r *ShieldService) Register(ctx context.Context, body ShieldRegisterParams, opts ...option.RequestOption) (res *Shield, err error)
Register a shield.
type SpanWithStatus ¶
type SpanWithStatus struct { // Human-readable name describing the operation this span represents Name string `json:"name,required"` // Unique identifier for the span SpanID string `json:"span_id,required"` // Timestamp when the operation began StartTime time.Time `json:"start_time,required" format:"date-time"` // Unique identifier for the trace this span belongs to TraceID string `json:"trace_id,required"` // (Optional) Key-value pairs containing additional metadata about the span Attributes map[string]SpanWithStatusAttributeUnion `json:"attributes"` // (Optional) Timestamp when the operation finished, if completed EndTime time.Time `json:"end_time" format:"date-time"` // (Optional) Unique identifier for the parent span, if this is a child span ParentSpanID string `json:"parent_span_id"` // (Optional) The current status of the span // // Any of "ok", "error". Status SpanWithStatusStatus `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Name respjson.Field SpanID respjson.Field StartTime respjson.Field TraceID respjson.Field Attributes respjson.Field EndTime respjson.Field ParentSpanID respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A span that includes status information.
func (SpanWithStatus) RawJSON ¶
func (r SpanWithStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*SpanWithStatus) UnmarshalJSON ¶
func (r *SpanWithStatus) UnmarshalJSON(data []byte) error
type SpanWithStatusAttributeUnion ¶
type SpanWithStatusAttributeUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
SpanWithStatusAttributeUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (SpanWithStatusAttributeUnion) AsAnyArray ¶
func (u SpanWithStatusAttributeUnion) AsAnyArray() (v []any)
func (SpanWithStatusAttributeUnion) AsBool ¶
func (u SpanWithStatusAttributeUnion) AsBool() (v bool)
func (SpanWithStatusAttributeUnion) AsFloat ¶
func (u SpanWithStatusAttributeUnion) AsFloat() (v float64)
func (SpanWithStatusAttributeUnion) AsString ¶
func (u SpanWithStatusAttributeUnion) AsString() (v string)
func (SpanWithStatusAttributeUnion) RawJSON ¶
func (u SpanWithStatusAttributeUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*SpanWithStatusAttributeUnion) UnmarshalJSON ¶
func (r *SpanWithStatusAttributeUnion) UnmarshalJSON(data []byte) error
type SpanWithStatusStatus ¶
type SpanWithStatusStatus string
(Optional) The current status of the span
const ( SpanWithStatusStatusOk SpanWithStatusStatus = "ok" SpanWithStatusStatusError SpanWithStatusStatus = "error" )
type SyntheticDataGenerationGenerateParams ¶
type SyntheticDataGenerationGenerateParams struct { // List of conversation messages to use as input for synthetic data generation Dialogs []shared.MessageUnionParam `json:"dialogs,omitzero,required"` // Type of filtering to apply to generated synthetic data samples // // Any of "none", "random", "top_k", "top_p", "top_k_top_p", "sigmoid". FilteringFunction SyntheticDataGenerationGenerateParamsFilteringFunction `json:"filtering_function,omitzero,required"` // (Optional) The identifier of the model to use. The model must be registered with // Llama Stack and available via the /models endpoint Model param.Opt[string] `json:"model,omitzero"` // contains filtered or unexported fields }
func (SyntheticDataGenerationGenerateParams) MarshalJSON ¶
func (r SyntheticDataGenerationGenerateParams) MarshalJSON() (data []byte, err error)
func (*SyntheticDataGenerationGenerateParams) UnmarshalJSON ¶
func (r *SyntheticDataGenerationGenerateParams) UnmarshalJSON(data []byte) error
type SyntheticDataGenerationGenerateParamsFilteringFunction ¶
type SyntheticDataGenerationGenerateParamsFilteringFunction string
Type of filtering to apply to generated synthetic data samples
const ( SyntheticDataGenerationGenerateParamsFilteringFunctionNone SyntheticDataGenerationGenerateParamsFilteringFunction = "none" SyntheticDataGenerationGenerateParamsFilteringFunctionRandom SyntheticDataGenerationGenerateParamsFilteringFunction = "random" SyntheticDataGenerationGenerateParamsFilteringFunctionTopK SyntheticDataGenerationGenerateParamsFilteringFunction = "top_k" SyntheticDataGenerationGenerateParamsFilteringFunctionTopP SyntheticDataGenerationGenerateParamsFilteringFunction = "top_p" SyntheticDataGenerationGenerateParamsFilteringFunctionTopKTopP SyntheticDataGenerationGenerateParamsFilteringFunction = "top_k_top_p" SyntheticDataGenerationGenerateParamsFilteringFunctionSigmoid SyntheticDataGenerationGenerateParamsFilteringFunction = "sigmoid" )
type SyntheticDataGenerationResponse ¶
type SyntheticDataGenerationResponse struct { // List of generated synthetic data samples that passed the filtering criteria SyntheticData []map[string]SyntheticDataGenerationResponseSyntheticDataUnion `json:"synthetic_data,required"` // (Optional) Statistical information about the generation process and filtering // results Statistics map[string]SyntheticDataGenerationResponseStatisticUnion `json:"statistics"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { SyntheticData respjson.Field Statistics respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold.
func (SyntheticDataGenerationResponse) RawJSON ¶
func (r SyntheticDataGenerationResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SyntheticDataGenerationResponse) UnmarshalJSON ¶
func (r *SyntheticDataGenerationResponse) UnmarshalJSON(data []byte) error
type SyntheticDataGenerationResponseStatisticUnion ¶
type SyntheticDataGenerationResponseStatisticUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
SyntheticDataGenerationResponseStatisticUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (SyntheticDataGenerationResponseStatisticUnion) AsAnyArray ¶
func (u SyntheticDataGenerationResponseStatisticUnion) AsAnyArray() (v []any)
func (SyntheticDataGenerationResponseStatisticUnion) AsBool ¶
func (u SyntheticDataGenerationResponseStatisticUnion) AsBool() (v bool)
func (SyntheticDataGenerationResponseStatisticUnion) AsFloat ¶
func (u SyntheticDataGenerationResponseStatisticUnion) AsFloat() (v float64)
func (SyntheticDataGenerationResponseStatisticUnion) AsString ¶
func (u SyntheticDataGenerationResponseStatisticUnion) AsString() (v string)
func (SyntheticDataGenerationResponseStatisticUnion) RawJSON ¶
func (u SyntheticDataGenerationResponseStatisticUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*SyntheticDataGenerationResponseStatisticUnion) UnmarshalJSON ¶
func (r *SyntheticDataGenerationResponseStatisticUnion) UnmarshalJSON(data []byte) error
type SyntheticDataGenerationResponseSyntheticDataUnion ¶
type SyntheticDataGenerationResponseSyntheticDataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
SyntheticDataGenerationResponseSyntheticDataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (SyntheticDataGenerationResponseSyntheticDataUnion) AsAnyArray ¶
func (u SyntheticDataGenerationResponseSyntheticDataUnion) AsAnyArray() (v []any)
func (SyntheticDataGenerationResponseSyntheticDataUnion) AsBool ¶
func (u SyntheticDataGenerationResponseSyntheticDataUnion) AsBool() (v bool)
func (SyntheticDataGenerationResponseSyntheticDataUnion) AsFloat ¶
func (u SyntheticDataGenerationResponseSyntheticDataUnion) AsFloat() (v float64)
func (SyntheticDataGenerationResponseSyntheticDataUnion) AsString ¶
func (u SyntheticDataGenerationResponseSyntheticDataUnion) AsString() (v string)
func (SyntheticDataGenerationResponseSyntheticDataUnion) RawJSON ¶
func (u SyntheticDataGenerationResponseSyntheticDataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*SyntheticDataGenerationResponseSyntheticDataUnion) UnmarshalJSON ¶
func (r *SyntheticDataGenerationResponseSyntheticDataUnion) UnmarshalJSON(data []byte) error
type SyntheticDataGenerationService ¶
type SyntheticDataGenerationService struct {
Options []option.RequestOption
}
SyntheticDataGenerationService contains methods and other services that help with interacting with the llama-stack-client 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 NewSyntheticDataGenerationService method instead.
func NewSyntheticDataGenerationService ¶
func NewSyntheticDataGenerationService(opts ...option.RequestOption) (r SyntheticDataGenerationService)
NewSyntheticDataGenerationService 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 (*SyntheticDataGenerationService) Generate ¶
func (r *SyntheticDataGenerationService) Generate(ctx context.Context, body SyntheticDataGenerationGenerateParams, opts ...option.RequestOption) (res *SyntheticDataGenerationResponse, err error)
Generate synthetic data based on input dialogs and apply filtering.
type SystemMessageParam ¶
type SystemMessageParam = shared.SystemMessageParam
A system message providing instructions or context to the model.
This is an alias to an internal type.
type TelemetryGetSpanParams ¶
type TelemetryGetSpanParams struct { TraceID string `path:"trace_id,required" json:"-"` // contains filtered or unexported fields }
type TelemetryGetSpanResponse ¶
type TelemetryGetSpanResponse struct { // Human-readable name describing the operation this span represents Name string `json:"name,required"` // Unique identifier for the span SpanID string `json:"span_id,required"` // Timestamp when the operation began StartTime time.Time `json:"start_time,required" format:"date-time"` // Unique identifier for the trace this span belongs to TraceID string `json:"trace_id,required"` // (Optional) Key-value pairs containing additional metadata about the span Attributes map[string]TelemetryGetSpanResponseAttributeUnion `json:"attributes"` // (Optional) Timestamp when the operation finished, if completed EndTime time.Time `json:"end_time" format:"date-time"` // (Optional) Unique identifier for the parent span, if this is a child span ParentSpanID string `json:"parent_span_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Name respjson.Field SpanID respjson.Field StartTime respjson.Field TraceID respjson.Field Attributes respjson.Field EndTime respjson.Field ParentSpanID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A span representing a single operation within a trace.
func (TelemetryGetSpanResponse) RawJSON ¶
func (r TelemetryGetSpanResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*TelemetryGetSpanResponse) UnmarshalJSON ¶
func (r *TelemetryGetSpanResponse) UnmarshalJSON(data []byte) error
type TelemetryGetSpanResponseAttributeUnion ¶
type TelemetryGetSpanResponseAttributeUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
TelemetryGetSpanResponseAttributeUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (TelemetryGetSpanResponseAttributeUnion) AsAnyArray ¶
func (u TelemetryGetSpanResponseAttributeUnion) AsAnyArray() (v []any)
func (TelemetryGetSpanResponseAttributeUnion) AsBool ¶
func (u TelemetryGetSpanResponseAttributeUnion) AsBool() (v bool)
func (TelemetryGetSpanResponseAttributeUnion) AsFloat ¶
func (u TelemetryGetSpanResponseAttributeUnion) AsFloat() (v float64)
func (TelemetryGetSpanResponseAttributeUnion) AsString ¶
func (u TelemetryGetSpanResponseAttributeUnion) AsString() (v string)
func (TelemetryGetSpanResponseAttributeUnion) RawJSON ¶
func (u TelemetryGetSpanResponseAttributeUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TelemetryGetSpanResponseAttributeUnion) UnmarshalJSON ¶
func (r *TelemetryGetSpanResponseAttributeUnion) UnmarshalJSON(data []byte) error
type TelemetryGetSpanTreeParams ¶
type TelemetryGetSpanTreeParams struct { // The maximum depth of the tree. MaxDepth param.Opt[int64] `json:"max_depth,omitzero"` // The attributes to return in the tree. AttributesToReturn []string `json:"attributes_to_return,omitzero"` // contains filtered or unexported fields }
func (TelemetryGetSpanTreeParams) MarshalJSON ¶
func (r TelemetryGetSpanTreeParams) MarshalJSON() (data []byte, err error)
func (*TelemetryGetSpanTreeParams) UnmarshalJSON ¶
func (r *TelemetryGetSpanTreeParams) UnmarshalJSON(data []byte) error
type TelemetryGetSpanTreeResponse ¶
type TelemetryGetSpanTreeResponse map[string]SpanWithStatus
type TelemetryGetSpanTreeResponseEnvelope ¶
type TelemetryGetSpanTreeResponseEnvelope struct { // Dictionary mapping span IDs to spans with status information Data TelemetryGetSpanTreeResponse `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response containing a tree structure of spans.
func (TelemetryGetSpanTreeResponseEnvelope) RawJSON ¶
func (r TelemetryGetSpanTreeResponseEnvelope) RawJSON() string
Returns the unmodified JSON received from the API
func (*TelemetryGetSpanTreeResponseEnvelope) UnmarshalJSON ¶
func (r *TelemetryGetSpanTreeResponseEnvelope) UnmarshalJSON(data []byte) error
type TelemetryLogEventParams ¶
type TelemetryLogEventParams struct { // The event to log. Event EventUnionParam `json:"event,omitzero,required"` // The time to live of the event. TtlSeconds int64 `json:"ttl_seconds,required"` // contains filtered or unexported fields }
func (TelemetryLogEventParams) MarshalJSON ¶
func (r TelemetryLogEventParams) MarshalJSON() (data []byte, err error)
func (*TelemetryLogEventParams) UnmarshalJSON ¶
func (r *TelemetryLogEventParams) UnmarshalJSON(data []byte) error
type TelemetryQuerySpansParams ¶
type TelemetryQuerySpansParams struct { // The attribute filters to apply to the spans. AttributeFilters []QueryConditionParam `json:"attribute_filters,omitzero,required"` // The attributes to return in the spans. AttributesToReturn []string `json:"attributes_to_return,omitzero,required"` // The maximum depth of the tree. MaxDepth param.Opt[int64] `json:"max_depth,omitzero"` // contains filtered or unexported fields }
func (TelemetryQuerySpansParams) MarshalJSON ¶
func (r TelemetryQuerySpansParams) MarshalJSON() (data []byte, err error)
func (*TelemetryQuerySpansParams) UnmarshalJSON ¶
func (r *TelemetryQuerySpansParams) UnmarshalJSON(data []byte) error
type TelemetryQueryTracesParams ¶
type TelemetryQueryTracesParams struct { // The limit of traces to return. Limit param.Opt[int64] `json:"limit,omitzero"` // The offset of the traces to return. Offset param.Opt[int64] `json:"offset,omitzero"` // The attribute filters to apply to the traces. AttributeFilters []QueryConditionParam `json:"attribute_filters,omitzero"` // The order by of the traces to return. OrderBy []string `json:"order_by,omitzero"` // contains filtered or unexported fields }
func (TelemetryQueryTracesParams) MarshalJSON ¶
func (r TelemetryQueryTracesParams) MarshalJSON() (data []byte, err error)
func (*TelemetryQueryTracesParams) UnmarshalJSON ¶
func (r *TelemetryQueryTracesParams) UnmarshalJSON(data []byte) error
type TelemetryQueryTracesResponseEnvelope ¶
type TelemetryQueryTracesResponseEnvelope struct { // List of traces matching the query criteria Data []Trace `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response containing a list of traces.
func (TelemetryQueryTracesResponseEnvelope) RawJSON ¶
func (r TelemetryQueryTracesResponseEnvelope) RawJSON() string
Returns the unmodified JSON received from the API
func (*TelemetryQueryTracesResponseEnvelope) UnmarshalJSON ¶
func (r *TelemetryQueryTracesResponseEnvelope) UnmarshalJSON(data []byte) error
type TelemetrySaveSpansToDatasetParams ¶
type TelemetrySaveSpansToDatasetParams struct { // The attribute filters to apply to the spans. AttributeFilters []QueryConditionParam `json:"attribute_filters,omitzero,required"` // The attributes to save to the dataset. AttributesToSave []string `json:"attributes_to_save,omitzero,required"` // The ID of the dataset to save the spans to. DatasetID string `json:"dataset_id,required"` // The maximum depth of the tree. MaxDepth param.Opt[int64] `json:"max_depth,omitzero"` // contains filtered or unexported fields }
func (TelemetrySaveSpansToDatasetParams) MarshalJSON ¶
func (r TelemetrySaveSpansToDatasetParams) MarshalJSON() (data []byte, err error)
func (*TelemetrySaveSpansToDatasetParams) UnmarshalJSON ¶
func (r *TelemetrySaveSpansToDatasetParams) UnmarshalJSON(data []byte) error
type TelemetryService ¶
type TelemetryService struct {
Options []option.RequestOption
}
TelemetryService contains methods and other services that help with interacting with the llama-stack-client 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 NewTelemetryService method instead.
func NewTelemetryService ¶
func NewTelemetryService(opts ...option.RequestOption) (r TelemetryService)
NewTelemetryService 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 (*TelemetryService) GetSpan ¶
func (r *TelemetryService) GetSpan(ctx context.Context, spanID string, query TelemetryGetSpanParams, opts ...option.RequestOption) (res *TelemetryGetSpanResponse, err error)
Get a span by its ID.
func (*TelemetryService) GetSpanTree ¶
func (r *TelemetryService) GetSpanTree(ctx context.Context, spanID string, body TelemetryGetSpanTreeParams, opts ...option.RequestOption) (res *TelemetryGetSpanTreeResponse, err error)
Get a span tree by its ID.
func (*TelemetryService) GetTrace ¶
func (r *TelemetryService) GetTrace(ctx context.Context, traceID string, opts ...option.RequestOption) (res *Trace, err error)
Get a trace by its ID.
func (*TelemetryService) LogEvent ¶
func (r *TelemetryService) LogEvent(ctx context.Context, body TelemetryLogEventParams, opts ...option.RequestOption) (err error)
Log an event.
func (*TelemetryService) QuerySpans ¶
func (r *TelemetryService) QuerySpans(ctx context.Context, body TelemetryQuerySpansParams, opts ...option.RequestOption) (res *[]QuerySpansResponseData, err error)
Query spans.
func (*TelemetryService) QueryTraces ¶
func (r *TelemetryService) QueryTraces(ctx context.Context, body TelemetryQueryTracesParams, opts ...option.RequestOption) (res *[]Trace, err error)
Query traces.
func (*TelemetryService) SaveSpansToDataset ¶
func (r *TelemetryService) SaveSpansToDataset(ctx context.Context, body TelemetrySaveSpansToDatasetParams, opts ...option.RequestOption) (err error)
Save spans to a dataset.
type Tool ¶
type Tool struct { // Human-readable description of what the tool does Description string `json:"description,required"` Identifier string `json:"identifier,required"` // List of parameters this tool accepts Parameters []ToolParameter `json:"parameters,required"` ProviderID string `json:"provider_id,required"` // ID of the tool group this tool belongs to ToolgroupID string `json:"toolgroup_id,required"` // Type of resource, always 'tool' Type constant.Tool `json:"type,required"` // (Optional) Additional metadata about the tool Metadata map[string]ToolMetadataUnion `json:"metadata"` ProviderResourceID string `json:"provider_resource_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Description respjson.Field Identifier respjson.Field Parameters respjson.Field ProviderID respjson.Field ToolgroupID respjson.Field Type respjson.Field Metadata respjson.Field ProviderResourceID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A tool that can be invoked by agents.
func (*Tool) UnmarshalJSON ¶
type ToolCallArgumentsMapItemArrayItemUnion ¶
type ToolCallArgumentsMapItemArrayItemUnion = shared.ToolCallArgumentsMapItemArrayItemUnion
This is an alias to an internal type.
type ToolCallArgumentsMapItemArrayItemUnionParam ¶
type ToolCallArgumentsMapItemArrayItemUnionParam = shared.ToolCallArgumentsMapItemArrayItemUnionParam
This is an alias to an internal type.
type ToolCallArgumentsMapItemMapItemUnion ¶
type ToolCallArgumentsMapItemMapItemUnion = shared.ToolCallArgumentsMapItemMapItemUnion
This is an alias to an internal type.
type ToolCallArgumentsMapItemMapItemUnionParam ¶
type ToolCallArgumentsMapItemMapItemUnionParam = shared.ToolCallArgumentsMapItemMapItemUnionParam
This is an alias to an internal type.
type ToolCallArgumentsMapItemUnion ¶
type ToolCallArgumentsMapItemUnion = shared.ToolCallArgumentsMapItemUnion
This is an alias to an internal type.
type ToolCallArgumentsMapItemUnionParam ¶
type ToolCallArgumentsMapItemUnionParam = shared.ToolCallArgumentsMapItemUnionParam
This is an alias to an internal type.
type ToolCallArgumentsUnion ¶
type ToolCallArgumentsUnion = shared.ToolCallArgumentsUnion
This is an alias to an internal type.
type ToolCallArgumentsUnionParam ¶
type ToolCallArgumentsUnionParam = shared.ToolCallArgumentsUnionParam
This is an alias to an internal type.
type ToolCallOrStringUnion ¶
type ToolCallOrStringUnion = shared.ToolCallOrStringUnion
Either an in-progress tool call string or the final parsed tool call
This is an alias to an internal type.
type ToolCallParam ¶
type ToolCallParam = shared.ToolCallParam
This is an alias to an internal type.
type ToolCallToolName ¶
type ToolCallToolName = shared.ToolCallToolName
This is an alias to an internal type.
type ToolExecutionStep ¶
type ToolExecutionStep struct { // The ID of the step. StepID string `json:"step_id,required"` // Type of the step in an agent turn. StepType constant.ToolExecution `json:"step_type,required"` // The tool calls to execute. ToolCalls []shared.ToolCall `json:"tool_calls,required"` // The tool responses from the tool calls. ToolResponses []ToolResponse `json:"tool_responses,required"` // The ID of the turn. TurnID string `json:"turn_id,required"` // The time the step completed. CompletedAt time.Time `json:"completed_at" format:"date-time"` // The time the step started. StartedAt time.Time `json:"started_at" format:"date-time"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { StepID respjson.Field StepType respjson.Field ToolCalls respjson.Field ToolResponses respjson.Field TurnID respjson.Field CompletedAt respjson.Field StartedAt respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A tool execution step in an agent turn.
func (ToolExecutionStep) RawJSON ¶
func (r ToolExecutionStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*ToolExecutionStep) UnmarshalJSON ¶
func (r *ToolExecutionStep) UnmarshalJSON(data []byte) error
type ToolGroup ¶
type ToolGroup struct { Identifier string `json:"identifier,required"` ProviderID string `json:"provider_id,required"` // Type of resource, always 'tool_group' Type constant.ToolGroup `json:"type,required"` // (Optional) Additional arguments for the tool group Args map[string]ToolGroupArgUnion `json:"args"` // (Optional) Model Context Protocol endpoint for remote tools McpEndpoint ToolGroupMcpEndpoint `json:"mcp_endpoint"` ProviderResourceID string `json:"provider_resource_id"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Identifier respjson.Field ProviderID respjson.Field Type respjson.Field Args respjson.Field McpEndpoint respjson.Field ProviderResourceID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A group of related tools managed together.
func (*ToolGroup) UnmarshalJSON ¶
type ToolGroupArgUnion ¶
type ToolGroupArgUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ToolGroupArgUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ToolGroupArgUnion) AsAnyArray ¶
func (u ToolGroupArgUnion) AsAnyArray() (v []any)
func (ToolGroupArgUnion) AsBool ¶
func (u ToolGroupArgUnion) AsBool() (v bool)
func (ToolGroupArgUnion) AsFloat ¶
func (u ToolGroupArgUnion) AsFloat() (v float64)
func (ToolGroupArgUnion) AsString ¶
func (u ToolGroupArgUnion) AsString() (v string)
func (ToolGroupArgUnion) RawJSON ¶
func (u ToolGroupArgUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ToolGroupArgUnion) UnmarshalJSON ¶
func (r *ToolGroupArgUnion) UnmarshalJSON(data []byte) error
type ToolGroupMcpEndpoint ¶
type ToolGroupMcpEndpoint struct { // The URL string pointing to the resource Uri string `json:"uri,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Uri respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Model Context Protocol endpoint for remote tools
func (ToolGroupMcpEndpoint) RawJSON ¶
func (r ToolGroupMcpEndpoint) RawJSON() string
Returns the unmodified JSON received from the API
func (*ToolGroupMcpEndpoint) UnmarshalJSON ¶
func (r *ToolGroupMcpEndpoint) UnmarshalJSON(data []byte) error
type ToolInvocationResult ¶
type ToolInvocationResult struct { // (Optional) The output content from the tool execution Content shared.InterleavedContentUnion `json:"content"` // (Optional) Numeric error code if the tool execution failed ErrorCode int64 `json:"error_code"` // (Optional) Error message if the tool execution failed ErrorMessage string `json:"error_message"` // (Optional) Additional metadata about the tool execution Metadata map[string]ToolInvocationResultMetadataUnion `json:"metadata"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field ErrorCode respjson.Field ErrorMessage respjson.Field Metadata respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Result of a tool invocation.
func (ToolInvocationResult) RawJSON ¶
func (r ToolInvocationResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ToolInvocationResult) UnmarshalJSON ¶
func (r *ToolInvocationResult) UnmarshalJSON(data []byte) error
type ToolInvocationResultMetadataUnion ¶
type ToolInvocationResultMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ToolInvocationResultMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ToolInvocationResultMetadataUnion) AsAnyArray ¶
func (u ToolInvocationResultMetadataUnion) AsAnyArray() (v []any)
func (ToolInvocationResultMetadataUnion) AsBool ¶
func (u ToolInvocationResultMetadataUnion) AsBool() (v bool)
func (ToolInvocationResultMetadataUnion) AsFloat ¶
func (u ToolInvocationResultMetadataUnion) AsFloat() (v float64)
func (ToolInvocationResultMetadataUnion) AsString ¶
func (u ToolInvocationResultMetadataUnion) AsString() (v string)
func (ToolInvocationResultMetadataUnion) RawJSON ¶
func (u ToolInvocationResultMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ToolInvocationResultMetadataUnion) UnmarshalJSON ¶
func (r *ToolInvocationResultMetadataUnion) UnmarshalJSON(data []byte) error
type ToolListParams ¶
type ToolListParams struct { // The ID of the tool group to list tools for. ToolgroupID param.Opt[string] `query:"toolgroup_id,omitzero" json:"-"` // contains filtered or unexported fields }
func (ToolListParams) URLQuery ¶
func (r ToolListParams) URLQuery() (v url.Values, err error)
URLQuery serializes ToolListParams's query parameters as `url.Values`.
type ToolMetadataUnion ¶
type ToolMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ToolMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ToolMetadataUnion) AsAnyArray ¶
func (u ToolMetadataUnion) AsAnyArray() (v []any)
func (ToolMetadataUnion) AsBool ¶
func (u ToolMetadataUnion) AsBool() (v bool)
func (ToolMetadataUnion) AsFloat ¶
func (u ToolMetadataUnion) AsFloat() (v float64)
func (ToolMetadataUnion) AsString ¶
func (u ToolMetadataUnion) AsString() (v string)
func (ToolMetadataUnion) RawJSON ¶
func (u ToolMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ToolMetadataUnion) UnmarshalJSON ¶
func (r *ToolMetadataUnion) UnmarshalJSON(data []byte) error
type ToolParamDefinition ¶
type ToolParamDefinition = shared.ToolParamDefinition
This is an alias to an internal type.
type ToolParamDefinitionDefaultUnion ¶
type ToolParamDefinitionDefaultUnion = shared.ToolParamDefinitionDefaultUnion
This is an alias to an internal type.
type ToolParameter ¶
type ToolParameter struct { // Human-readable description of what the parameter does Description string `json:"description,required"` // Name of the parameter Name string `json:"name,required"` // Type of the parameter (e.g., string, integer) ParameterType string `json:"parameter_type,required"` // Whether this parameter is required for tool invocation Required bool `json:"required,required"` // (Optional) Default value for the parameter if not provided Default ToolParameterDefaultUnion `json:"default,nullable"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Description respjson.Field Name respjson.Field ParameterType respjson.Field Required respjson.Field Default respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Parameter definition for a tool.
func (ToolParameter) RawJSON ¶
func (r ToolParameter) RawJSON() string
Returns the unmodified JSON received from the API
func (*ToolParameter) UnmarshalJSON ¶
func (r *ToolParameter) UnmarshalJSON(data []byte) error
type ToolParameterDefaultUnion ¶
type ToolParameterDefaultUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ToolParameterDefaultUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ToolParameterDefaultUnion) AsAnyArray ¶
func (u ToolParameterDefaultUnion) AsAnyArray() (v []any)
func (ToolParameterDefaultUnion) AsBool ¶
func (u ToolParameterDefaultUnion) AsBool() (v bool)
func (ToolParameterDefaultUnion) AsFloat ¶
func (u ToolParameterDefaultUnion) AsFloat() (v float64)
func (ToolParameterDefaultUnion) AsString ¶
func (u ToolParameterDefaultUnion) AsString() (v string)
func (ToolParameterDefaultUnion) RawJSON ¶
func (u ToolParameterDefaultUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ToolParameterDefaultUnion) UnmarshalJSON ¶
func (r *ToolParameterDefaultUnion) UnmarshalJSON(data []byte) error
type ToolResponse ¶
type ToolResponse struct { // Unique identifier for the tool call this response is for CallID string `json:"call_id,required"` // The response content from the tool Content shared.InterleavedContentUnion `json:"content,required"` // Name of the tool that was invoked ToolName ToolResponseToolName `json:"tool_name,required"` // (Optional) Additional metadata about the tool response Metadata map[string]ToolResponseMetadataUnion `json:"metadata"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { CallID respjson.Field Content respjson.Field ToolName respjson.Field Metadata respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from a tool invocation.
func (ToolResponse) RawJSON ¶
func (r ToolResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (ToolResponse) ToParam ¶
func (r ToolResponse) ToParam() ToolResponseParam
ToParam converts this ToolResponse to a ToolResponseParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ToolResponseParam.Overrides()
func (*ToolResponse) UnmarshalJSON ¶
func (r *ToolResponse) UnmarshalJSON(data []byte) error
type ToolResponseMessage ¶
type ToolResponseMessage = shared.ToolResponseMessage
A message representing the result of a tool invocation.
This is an alias to an internal type.
type ToolResponseMessageParam ¶
type ToolResponseMessageParam = shared.ToolResponseMessageParam
A message representing the result of a tool invocation.
This is an alias to an internal type.
type ToolResponseMetadataUnion ¶
type ToolResponseMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
ToolResponseMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (ToolResponseMetadataUnion) AsAnyArray ¶
func (u ToolResponseMetadataUnion) AsAnyArray() (v []any)
func (ToolResponseMetadataUnion) AsBool ¶
func (u ToolResponseMetadataUnion) AsBool() (v bool)
func (ToolResponseMetadataUnion) AsFloat ¶
func (u ToolResponseMetadataUnion) AsFloat() (v float64)
func (ToolResponseMetadataUnion) AsString ¶
func (u ToolResponseMetadataUnion) AsString() (v string)
func (ToolResponseMetadataUnion) RawJSON ¶
func (u ToolResponseMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ToolResponseMetadataUnion) UnmarshalJSON ¶
func (r *ToolResponseMetadataUnion) UnmarshalJSON(data []byte) error
type ToolResponseMetadataUnionParam ¶
type ToolResponseMetadataUnionParam struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ToolResponseMetadataUnionParam) MarshalJSON ¶
func (u ToolResponseMetadataUnionParam) MarshalJSON() ([]byte, error)
func (*ToolResponseMetadataUnionParam) UnmarshalJSON ¶
func (u *ToolResponseMetadataUnionParam) UnmarshalJSON(data []byte) error
type ToolResponseParam ¶
type ToolResponseParam struct { // Unique identifier for the tool call this response is for CallID string `json:"call_id,required"` // The response content from the tool Content shared.InterleavedContentUnionParam `json:"content,omitzero,required"` // Name of the tool that was invoked ToolName ToolResponseToolName `json:"tool_name,omitzero,required"` // (Optional) Additional metadata about the tool response Metadata map[string]ToolResponseMetadataUnionParam `json:"metadata,omitzero"` // contains filtered or unexported fields }
Response from a tool invocation.
The properties CallID, Content, ToolName are required.
func (ToolResponseParam) MarshalJSON ¶
func (r ToolResponseParam) MarshalJSON() (data []byte, err error)
func (*ToolResponseParam) UnmarshalJSON ¶
func (r *ToolResponseParam) UnmarshalJSON(data []byte) error
type ToolResponseToolName ¶
type ToolResponseToolName string
Name of the tool that was invoked
const ( ToolResponseToolNameBraveSearch ToolResponseToolName = "brave_search" ToolResponseToolNameWolframAlpha ToolResponseToolName = "wolfram_alpha" ToolResponseToolNamePhotogen ToolResponseToolName = "photogen" ToolResponseToolNameCodeInterpreter ToolResponseToolName = "code_interpreter" )
type ToolRuntimeInvokeToolParams ¶
type ToolRuntimeInvokeToolParams struct { // A dictionary of arguments to pass to the tool. Kwargs map[string]ToolRuntimeInvokeToolParamsKwargUnion `json:"kwargs,omitzero,required"` // The name of the tool to invoke. ToolName string `json:"tool_name,required"` // contains filtered or unexported fields }
func (ToolRuntimeInvokeToolParams) MarshalJSON ¶
func (r ToolRuntimeInvokeToolParams) MarshalJSON() (data []byte, err error)
func (*ToolRuntimeInvokeToolParams) UnmarshalJSON ¶
func (r *ToolRuntimeInvokeToolParams) UnmarshalJSON(data []byte) error
type ToolRuntimeInvokeToolParamsKwargUnion ¶
type ToolRuntimeInvokeToolParamsKwargUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ToolRuntimeInvokeToolParamsKwargUnion) MarshalJSON ¶
func (u ToolRuntimeInvokeToolParamsKwargUnion) MarshalJSON() ([]byte, error)
func (*ToolRuntimeInvokeToolParamsKwargUnion) UnmarshalJSON ¶
func (u *ToolRuntimeInvokeToolParamsKwargUnion) UnmarshalJSON(data []byte) error
type ToolRuntimeListToolsParams ¶
type ToolRuntimeListToolsParams struct { // The ID of the tool group to list tools for. ToolGroupID param.Opt[string] `query:"tool_group_id,omitzero" json:"-"` // The MCP endpoint to use for the tool group. McpEndpoint ToolRuntimeListToolsParamsMcpEndpoint `query:"mcp_endpoint,omitzero" json:"-"` // contains filtered or unexported fields }
func (ToolRuntimeListToolsParams) URLQuery ¶
func (r ToolRuntimeListToolsParams) URLQuery() (v url.Values, err error)
URLQuery serializes ToolRuntimeListToolsParams's query parameters as `url.Values`.
type ToolRuntimeListToolsParamsMcpEndpoint ¶
type ToolRuntimeListToolsParamsMcpEndpoint struct { // The URL string pointing to the resource Uri string `query:"uri,required" json:"-"` // contains filtered or unexported fields }
The MCP endpoint to use for the tool group.
The property Uri is required.
func (ToolRuntimeListToolsParamsMcpEndpoint) URLQuery ¶
func (r ToolRuntimeListToolsParamsMcpEndpoint) URLQuery() (v url.Values, err error)
URLQuery serializes ToolRuntimeListToolsParamsMcpEndpoint's query parameters as `url.Values`.
type ToolRuntimeListToolsResponseEnvelope ¶
type ToolRuntimeListToolsResponseEnvelope struct { // List of tool definitions Data []shared.SharedToolDef `json:"data,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response containing a list of tool definitions.
func (ToolRuntimeListToolsResponseEnvelope) RawJSON ¶
func (r ToolRuntimeListToolsResponseEnvelope) RawJSON() string
Returns the unmodified JSON received from the API
func (*ToolRuntimeListToolsResponseEnvelope) UnmarshalJSON ¶
func (r *ToolRuntimeListToolsResponseEnvelope) UnmarshalJSON(data []byte) error
type ToolRuntimeRagToolInsertParams ¶
type ToolRuntimeRagToolInsertParams struct { // (Optional) Size in tokens for document chunking during indexing ChunkSizeInTokens int64 `json:"chunk_size_in_tokens,required"` // List of documents to index in the RAG system Documents []shared.DocumentParam `json:"documents,omitzero,required"` // ID of the vector database to store the document embeddings VectorDBID string `json:"vector_db_id,required"` // contains filtered or unexported fields }
func (ToolRuntimeRagToolInsertParams) MarshalJSON ¶
func (r ToolRuntimeRagToolInsertParams) MarshalJSON() (data []byte, err error)
func (*ToolRuntimeRagToolInsertParams) UnmarshalJSON ¶
func (r *ToolRuntimeRagToolInsertParams) UnmarshalJSON(data []byte) error
type ToolRuntimeRagToolQueryParams ¶
type ToolRuntimeRagToolQueryParams struct { // The query content to search for in the indexed documents Content shared.InterleavedContentUnionParam `json:"content,omitzero,required"` // List of vector database IDs to search within VectorDBIDs []string `json:"vector_db_ids,omitzero,required"` // (Optional) Configuration parameters for the query operation QueryConfig shared.QueryConfigParam `json:"query_config,omitzero"` // contains filtered or unexported fields }
func (ToolRuntimeRagToolQueryParams) MarshalJSON ¶
func (r ToolRuntimeRagToolQueryParams) MarshalJSON() (data []byte, err error)
func (*ToolRuntimeRagToolQueryParams) UnmarshalJSON ¶
func (r *ToolRuntimeRagToolQueryParams) UnmarshalJSON(data []byte) error
type ToolRuntimeRagToolService ¶
type ToolRuntimeRagToolService struct {
Options []option.RequestOption
}
ToolRuntimeRagToolService contains methods and other services that help with interacting with the llama-stack-client 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 NewToolRuntimeRagToolService method instead.
func NewToolRuntimeRagToolService ¶
func NewToolRuntimeRagToolService(opts ...option.RequestOption) (r ToolRuntimeRagToolService)
NewToolRuntimeRagToolService 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 (*ToolRuntimeRagToolService) Insert ¶
func (r *ToolRuntimeRagToolService) Insert(ctx context.Context, body ToolRuntimeRagToolInsertParams, opts ...option.RequestOption) (err error)
Index documents so they can be used by the RAG system.
func (*ToolRuntimeRagToolService) Query ¶
func (r *ToolRuntimeRagToolService) Query(ctx context.Context, body ToolRuntimeRagToolQueryParams, opts ...option.RequestOption) (res *shared.QueryResult, err error)
Query the RAG system for context; typically invoked by the agent.
type ToolRuntimeService ¶
type ToolRuntimeService struct { Options []option.RequestOption RagTool ToolRuntimeRagToolService }
ToolRuntimeService contains methods and other services that help with interacting with the llama-stack-client 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 NewToolRuntimeService method instead.
func NewToolRuntimeService ¶
func NewToolRuntimeService(opts ...option.RequestOption) (r ToolRuntimeService)
NewToolRuntimeService 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 (*ToolRuntimeService) InvokeTool ¶
func (r *ToolRuntimeService) InvokeTool(ctx context.Context, body ToolRuntimeInvokeToolParams, opts ...option.RequestOption) (res *ToolInvocationResult, err error)
Run a tool with the given arguments.
func (*ToolRuntimeService) ListTools ¶
func (r *ToolRuntimeService) ListTools(ctx context.Context, query ToolRuntimeListToolsParams, opts ...option.RequestOption) (res *[]shared.SharedToolDef, err error)
List all tools in the runtime.
type ToolService ¶
type ToolService struct {
Options []option.RequestOption
}
ToolService contains methods and other services that help with interacting with the llama-stack-client 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 NewToolService method instead.
func NewToolService ¶
func NewToolService(opts ...option.RequestOption) (r ToolService)
NewToolService 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 (*ToolService) Get ¶
func (r *ToolService) Get(ctx context.Context, toolName string, opts ...option.RequestOption) (res *Tool, err error)
Get a tool by its name.
func (*ToolService) List ¶
func (r *ToolService) List(ctx context.Context, query ToolListParams, opts ...option.RequestOption) (res *[]Tool, err error)
List tools with optional tool group.
type ToolgroupRegisterParams ¶
type ToolgroupRegisterParams struct { // The ID of the provider to use for the tool group. ProviderID string `json:"provider_id,required"` // The ID of the tool group to register. ToolgroupID string `json:"toolgroup_id,required"` // A dictionary of arguments to pass to the tool group. Args map[string]ToolgroupRegisterParamsArgUnion `json:"args,omitzero"` // The MCP endpoint to use for the tool group. McpEndpoint ToolgroupRegisterParamsMcpEndpoint `json:"mcp_endpoint,omitzero"` // contains filtered or unexported fields }
func (ToolgroupRegisterParams) MarshalJSON ¶
func (r ToolgroupRegisterParams) MarshalJSON() (data []byte, err error)
func (*ToolgroupRegisterParams) UnmarshalJSON ¶
func (r *ToolgroupRegisterParams) UnmarshalJSON(data []byte) error
type ToolgroupRegisterParamsArgUnion ¶
type ToolgroupRegisterParamsArgUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ToolgroupRegisterParamsArgUnion) MarshalJSON ¶
func (u ToolgroupRegisterParamsArgUnion) MarshalJSON() ([]byte, error)
func (*ToolgroupRegisterParamsArgUnion) UnmarshalJSON ¶
func (u *ToolgroupRegisterParamsArgUnion) UnmarshalJSON(data []byte) error
type ToolgroupRegisterParamsMcpEndpoint ¶
type ToolgroupRegisterParamsMcpEndpoint struct { // The URL string pointing to the resource Uri string `json:"uri,required"` // contains filtered or unexported fields }
The MCP endpoint to use for the tool group.
The property Uri is required.
func (ToolgroupRegisterParamsMcpEndpoint) MarshalJSON ¶
func (r ToolgroupRegisterParamsMcpEndpoint) MarshalJSON() (data []byte, err error)
func (*ToolgroupRegisterParamsMcpEndpoint) UnmarshalJSON ¶
func (r *ToolgroupRegisterParamsMcpEndpoint) UnmarshalJSON(data []byte) error
type ToolgroupService ¶
type ToolgroupService struct {
Options []option.RequestOption
}
ToolgroupService contains methods and other services that help with interacting with the llama-stack-client 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 NewToolgroupService method instead.
func NewToolgroupService ¶
func NewToolgroupService(opts ...option.RequestOption) (r ToolgroupService)
NewToolgroupService 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 (*ToolgroupService) Get ¶
func (r *ToolgroupService) Get(ctx context.Context, toolgroupID string, opts ...option.RequestOption) (res *ToolGroup, err error)
Get a tool group by its ID.
func (*ToolgroupService) List ¶
func (r *ToolgroupService) List(ctx context.Context, opts ...option.RequestOption) (res *[]ToolGroup, err error)
List tool groups with optional provider.
func (*ToolgroupService) Register ¶
func (r *ToolgroupService) Register(ctx context.Context, body ToolgroupRegisterParams, opts ...option.RequestOption) (err error)
Register a tool group.
func (*ToolgroupService) Unregister ¶
func (r *ToolgroupService) Unregister(ctx context.Context, toolgroupID string, opts ...option.RequestOption) (err error)
Unregister a tool group.
type Trace ¶
type Trace struct { // Unique identifier for the root span that started this trace RootSpanID string `json:"root_span_id,required"` // Timestamp when the trace began StartTime time.Time `json:"start_time,required" format:"date-time"` // Unique identifier for the trace TraceID string `json:"trace_id,required"` // (Optional) Timestamp when the trace finished, if completed EndTime time.Time `json:"end_time" format:"date-time"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { RootSpanID respjson.Field StartTime respjson.Field TraceID respjson.Field EndTime respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A trace representing the complete execution path of a request across multiple operations.
func (*Trace) UnmarshalJSON ¶
type Turn ¶
type Turn struct { // List of messages that initiated this turn InputMessages []TurnInputMessageUnion `json:"input_messages,required"` // The model's generated response containing content and metadata OutputMessage shared.CompletionMessage `json:"output_message,required"` // Unique identifier for the conversation session SessionID string `json:"session_id,required"` // Timestamp when the turn began StartedAt time.Time `json:"started_at,required" format:"date-time"` // Ordered list of processing steps executed during this turn Steps []TurnStepUnion `json:"steps,required"` // Unique identifier for the turn within a session TurnID string `json:"turn_id,required"` // (Optional) Timestamp when the turn finished, if completed CompletedAt time.Time `json:"completed_at" format:"date-time"` // (Optional) Files or media attached to the agent's response OutputAttachments []TurnOutputAttachment `json:"output_attachments"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { InputMessages respjson.Field OutputMessage respjson.Field SessionID respjson.Field StartedAt respjson.Field Steps respjson.Field TurnID respjson.Field CompletedAt respjson.Field OutputAttachments respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A single turn in an interaction with an Agentic System.
func (*Turn) UnmarshalJSON ¶
type TurnInputMessageUnion ¶
type TurnInputMessageUnion struct { // This field is from variant [shared.UserMessage]. Content shared.InterleavedContentUnion `json:"content"` Role string `json:"role"` // This field is from variant [shared.UserMessage]. Context shared.InterleavedContentUnion `json:"context"` // This field is from variant [shared.ToolResponseMessage]. CallID string `json:"call_id"` JSON struct { Content respjson.Field Role respjson.Field Context respjson.Field CallID respjson.Field // contains filtered or unexported fields } `json:"-"` }
TurnInputMessageUnion contains all possible properties and values from shared.UserMessage, shared.ToolResponseMessage.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (TurnInputMessageUnion) AsToolResponseMessage ¶
func (u TurnInputMessageUnion) AsToolResponseMessage() (v shared.ToolResponseMessage)
func (TurnInputMessageUnion) AsUserMessage ¶
func (u TurnInputMessageUnion) AsUserMessage() (v shared.UserMessage)
func (TurnInputMessageUnion) RawJSON ¶
func (u TurnInputMessageUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnInputMessageUnion) UnmarshalJSON ¶
func (r *TurnInputMessageUnion) UnmarshalJSON(data []byte) error
type TurnOutputAttachment ¶
type TurnOutputAttachment struct { // The content of the attachment. Content TurnOutputAttachmentContentUnion `json:"content,required"` // The MIME type of the attachment. MimeType string `json:"mime_type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field MimeType respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
An attachment to an agent turn.
func (TurnOutputAttachment) RawJSON ¶
func (r TurnOutputAttachment) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnOutputAttachment) UnmarshalJSON ¶
func (r *TurnOutputAttachment) UnmarshalJSON(data []byte) error
type TurnOutputAttachmentContentImageContentItem ¶
type TurnOutputAttachmentContentImageContentItem struct { // Image as a base64 encoded string or an URL Image TurnOutputAttachmentContentImageContentItemImage `json:"image,required"` // Discriminator type of the content item. Always "image" Type constant.Image `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Image respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A image content item
func (TurnOutputAttachmentContentImageContentItem) RawJSON ¶
func (r TurnOutputAttachmentContentImageContentItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnOutputAttachmentContentImageContentItem) UnmarshalJSON ¶
func (r *TurnOutputAttachmentContentImageContentItem) UnmarshalJSON(data []byte) error
type TurnOutputAttachmentContentImageContentItemImage ¶
type TurnOutputAttachmentContentImageContentItemImage struct { // base64 encoded image data as string Data string `json:"data"` // A URL of the image or data URL in the format of data:image/{type};base64,{data}. // Note that URL could have length limits. URL TurnOutputAttachmentContentImageContentItemImageURL `json:"url"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field URL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Image as a base64 encoded string or an URL
func (TurnOutputAttachmentContentImageContentItemImage) RawJSON ¶
func (r TurnOutputAttachmentContentImageContentItemImage) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnOutputAttachmentContentImageContentItemImage) UnmarshalJSON ¶
func (r *TurnOutputAttachmentContentImageContentItemImage) UnmarshalJSON(data []byte) error
type TurnOutputAttachmentContentImageContentItemImageURL ¶
type TurnOutputAttachmentContentImageContentItemImageURL struct { // The URL string pointing to the resource Uri string `json:"uri,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Uri respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A URL of the image or data URL in the format of data:image/{type};base64,{data}. Note that URL could have length limits.
func (TurnOutputAttachmentContentImageContentItemImageURL) RawJSON ¶
func (r TurnOutputAttachmentContentImageContentItemImageURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnOutputAttachmentContentImageContentItemImageURL) UnmarshalJSON ¶
func (r *TurnOutputAttachmentContentImageContentItemImageURL) UnmarshalJSON(data []byte) error
type TurnOutputAttachmentContentTextContentItem ¶
type TurnOutputAttachmentContentTextContentItem struct { // Text content Text string `json:"text,required"` // Discriminator type of the content item. Always "text" Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A text content item
func (TurnOutputAttachmentContentTextContentItem) RawJSON ¶
func (r TurnOutputAttachmentContentTextContentItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnOutputAttachmentContentTextContentItem) UnmarshalJSON ¶
func (r *TurnOutputAttachmentContentTextContentItem) UnmarshalJSON(data []byte) error
type TurnOutputAttachmentContentURL ¶
type TurnOutputAttachmentContentURL struct { // The URL string pointing to the resource Uri string `json:"uri,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Uri respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
A URL reference to external content.
func (TurnOutputAttachmentContentURL) RawJSON ¶
func (r TurnOutputAttachmentContentURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnOutputAttachmentContentURL) UnmarshalJSON ¶
func (r *TurnOutputAttachmentContentURL) UnmarshalJSON(data []byte) error
type TurnOutputAttachmentContentUnion ¶
type TurnOutputAttachmentContentUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a // [[]shared.InterleavedContentItemUnion] instead of an object. OfInterleavedContentItemArray []shared.InterleavedContentItemUnion `json:",inline"` // This field is from variant [TurnOutputAttachmentContentImageContentItem]. Image TurnOutputAttachmentContentImageContentItemImage `json:"image"` Type string `json:"type"` // This field is from variant [TurnOutputAttachmentContentTextContentItem]. Text string `json:"text"` // This field is from variant [TurnOutputAttachmentContentURL]. Uri string `json:"uri"` JSON struct { OfString respjson.Field OfInterleavedContentItemArray respjson.Field Image respjson.Field Type respjson.Field Text respjson.Field Uri respjson.Field // contains filtered or unexported fields } `json:"-"` }
TurnOutputAttachmentContentUnion contains all possible properties and values from [string], TurnOutputAttachmentContentImageContentItem, TurnOutputAttachmentContentTextContentItem, [[]shared.InterleavedContentItemUnion], TurnOutputAttachmentContentURL.
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInterleavedContentItemArray]
func (TurnOutputAttachmentContentUnion) AsImageContentItem ¶
func (u TurnOutputAttachmentContentUnion) AsImageContentItem() (v TurnOutputAttachmentContentImageContentItem)
func (TurnOutputAttachmentContentUnion) AsInterleavedContentItemArray ¶
func (u TurnOutputAttachmentContentUnion) AsInterleavedContentItemArray() (v []shared.InterleavedContentItemUnion)
func (TurnOutputAttachmentContentUnion) AsString ¶
func (u TurnOutputAttachmentContentUnion) AsString() (v string)
func (TurnOutputAttachmentContentUnion) AsTextContentItem ¶
func (u TurnOutputAttachmentContentUnion) AsTextContentItem() (v TurnOutputAttachmentContentTextContentItem)
func (TurnOutputAttachmentContentUnion) AsURL ¶
func (u TurnOutputAttachmentContentUnion) AsURL() (v TurnOutputAttachmentContentURL)
func (TurnOutputAttachmentContentUnion) RawJSON ¶
func (u TurnOutputAttachmentContentUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnOutputAttachmentContentUnion) UnmarshalJSON ¶
func (r *TurnOutputAttachmentContentUnion) UnmarshalJSON(data []byte) error
type TurnResponseEvent ¶
type TurnResponseEvent struct { // Event-specific payload containing event data Payload TurnResponseEventPayloadUnion `json:"payload,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Payload respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
An event in an agent turn response stream.
func (TurnResponseEvent) RawJSON ¶
func (r TurnResponseEvent) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnResponseEvent) UnmarshalJSON ¶
func (r *TurnResponseEvent) UnmarshalJSON(data []byte) error
type TurnResponseEventPayloadStepComplete ¶
type TurnResponseEventPayloadStepComplete struct { // Type of event being reported EventType constant.StepComplete `json:"event_type,required"` // Complete details of the executed step StepDetails TurnResponseEventPayloadStepCompleteStepDetailsUnion `json:"step_details,required"` // Unique identifier for the step within a turn StepID string `json:"step_id,required"` // Type of step being executed // // Any of "inference", "tool_execution", "shield_call", "memory_retrieval". StepType string `json:"step_type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EventType respjson.Field StepDetails respjson.Field StepID respjson.Field StepType respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Payload for step completion events in agent turn responses.
func (TurnResponseEventPayloadStepComplete) RawJSON ¶
func (r TurnResponseEventPayloadStepComplete) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnResponseEventPayloadStepComplete) UnmarshalJSON ¶
func (r *TurnResponseEventPayloadStepComplete) UnmarshalJSON(data []byte) error
type TurnResponseEventPayloadStepCompleteStepDetailsUnion ¶
type TurnResponseEventPayloadStepCompleteStepDetailsUnion struct { // This field is from variant [InferenceStep]. ModelResponse shared.CompletionMessage `json:"model_response"` StepID string `json:"step_id"` // Any of "inference", "tool_execution", "shield_call", "memory_retrieval". StepType string `json:"step_type"` TurnID string `json:"turn_id"` CompletedAt time.Time `json:"completed_at"` StartedAt time.Time `json:"started_at"` // This field is from variant [ToolExecutionStep]. ToolCalls []shared.ToolCall `json:"tool_calls"` // This field is from variant [ToolExecutionStep]. ToolResponses []ToolResponse `json:"tool_responses"` // This field is from variant [ShieldCallStep]. Violation shared.SafetyViolation `json:"violation"` // This field is from variant [MemoryRetrievalStep]. InsertedContext shared.InterleavedContentUnion `json:"inserted_context"` // This field is from variant [MemoryRetrievalStep]. VectorDBIDs string `json:"vector_db_ids"` JSON struct { ModelResponse respjson.Field StepID respjson.Field StepType respjson.Field TurnID respjson.Field CompletedAt respjson.Field StartedAt respjson.Field ToolCalls respjson.Field ToolResponses respjson.Field Violation respjson.Field InsertedContext respjson.Field VectorDBIDs respjson.Field // contains filtered or unexported fields } `json:"-"` }
TurnResponseEventPayloadStepCompleteStepDetailsUnion contains all possible properties and values from InferenceStep, ToolExecutionStep, ShieldCallStep, MemoryRetrievalStep.
Use the TurnResponseEventPayloadStepCompleteStepDetailsUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsAny ¶
func (u TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsAny() anyTurnResponseEventPayloadStepCompleteStepDetails
Use the following switch statement to find the correct variant
switch variant := TurnResponseEventPayloadStepCompleteStepDetailsUnion.AsAny().(type) { case llamastackclient.InferenceStep: case llamastackclient.ToolExecutionStep: case llamastackclient.ShieldCallStep: case llamastackclient.MemoryRetrievalStep: default: fmt.Errorf("no variant present") }
func (TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsInference ¶
func (u TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsInference() (v InferenceStep)
func (TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsMemoryRetrieval ¶
func (u TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsMemoryRetrieval() (v MemoryRetrievalStep)
func (TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsShieldCall ¶
func (u TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsShieldCall() (v ShieldCallStep)
func (TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsToolExecution ¶
func (u TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsToolExecution() (v ToolExecutionStep)
func (TurnResponseEventPayloadStepCompleteStepDetailsUnion) RawJSON ¶
func (u TurnResponseEventPayloadStepCompleteStepDetailsUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnResponseEventPayloadStepCompleteStepDetailsUnion) UnmarshalJSON ¶
func (r *TurnResponseEventPayloadStepCompleteStepDetailsUnion) UnmarshalJSON(data []byte) error
type TurnResponseEventPayloadStepProgress ¶
type TurnResponseEventPayloadStepProgress struct { // Incremental content changes during step execution Delta shared.ContentDeltaUnion `json:"delta,required"` // Type of event being reported EventType constant.StepProgress `json:"event_type,required"` // Unique identifier for the step within a turn StepID string `json:"step_id,required"` // Type of step being executed // // Any of "inference", "tool_execution", "shield_call", "memory_retrieval". StepType string `json:"step_type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Delta respjson.Field EventType respjson.Field StepID respjson.Field StepType respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Payload for step progress events in agent turn responses.
func (TurnResponseEventPayloadStepProgress) RawJSON ¶
func (r TurnResponseEventPayloadStepProgress) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnResponseEventPayloadStepProgress) UnmarshalJSON ¶
func (r *TurnResponseEventPayloadStepProgress) UnmarshalJSON(data []byte) error
type TurnResponseEventPayloadStepStart ¶
type TurnResponseEventPayloadStepStart struct { // Type of event being reported EventType constant.StepStart `json:"event_type,required"` // Unique identifier for the step within a turn StepID string `json:"step_id,required"` // Type of step being executed // // Any of "inference", "tool_execution", "shield_call", "memory_retrieval". StepType string `json:"step_type,required"` // (Optional) Additional metadata for the step Metadata map[string]TurnResponseEventPayloadStepStartMetadataUnion `json:"metadata"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EventType respjson.Field StepID respjson.Field StepType respjson.Field Metadata respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Payload for step start events in agent turn responses.
func (TurnResponseEventPayloadStepStart) RawJSON ¶
func (r TurnResponseEventPayloadStepStart) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnResponseEventPayloadStepStart) UnmarshalJSON ¶
func (r *TurnResponseEventPayloadStepStart) UnmarshalJSON(data []byte) error
type TurnResponseEventPayloadStepStartMetadataUnion ¶
type TurnResponseEventPayloadStepStartMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
TurnResponseEventPayloadStepStartMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (TurnResponseEventPayloadStepStartMetadataUnion) AsAnyArray ¶
func (u TurnResponseEventPayloadStepStartMetadataUnion) AsAnyArray() (v []any)
func (TurnResponseEventPayloadStepStartMetadataUnion) AsBool ¶
func (u TurnResponseEventPayloadStepStartMetadataUnion) AsBool() (v bool)
func (TurnResponseEventPayloadStepStartMetadataUnion) AsFloat ¶
func (u TurnResponseEventPayloadStepStartMetadataUnion) AsFloat() (v float64)
func (TurnResponseEventPayloadStepStartMetadataUnion) AsString ¶
func (u TurnResponseEventPayloadStepStartMetadataUnion) AsString() (v string)
func (TurnResponseEventPayloadStepStartMetadataUnion) RawJSON ¶
func (u TurnResponseEventPayloadStepStartMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnResponseEventPayloadStepStartMetadataUnion) UnmarshalJSON ¶
func (r *TurnResponseEventPayloadStepStartMetadataUnion) UnmarshalJSON(data []byte) error
type TurnResponseEventPayloadTurnAwaitingInput ¶
type TurnResponseEventPayloadTurnAwaitingInput struct { // Type of event being reported EventType constant.TurnAwaitingInput `json:"event_type,required"` // Turn data when waiting for external tool responses Turn Turn `json:"turn,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EventType respjson.Field Turn respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Payload for turn awaiting input events in agent turn responses.
func (TurnResponseEventPayloadTurnAwaitingInput) RawJSON ¶
func (r TurnResponseEventPayloadTurnAwaitingInput) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnResponseEventPayloadTurnAwaitingInput) UnmarshalJSON ¶
func (r *TurnResponseEventPayloadTurnAwaitingInput) UnmarshalJSON(data []byte) error
type TurnResponseEventPayloadTurnComplete ¶
type TurnResponseEventPayloadTurnComplete struct { // Type of event being reported EventType constant.TurnComplete `json:"event_type,required"` // Complete turn data including all steps and results Turn Turn `json:"turn,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EventType respjson.Field Turn respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Payload for turn completion events in agent turn responses.
func (TurnResponseEventPayloadTurnComplete) RawJSON ¶
func (r TurnResponseEventPayloadTurnComplete) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnResponseEventPayloadTurnComplete) UnmarshalJSON ¶
func (r *TurnResponseEventPayloadTurnComplete) UnmarshalJSON(data []byte) error
type TurnResponseEventPayloadTurnStart ¶
type TurnResponseEventPayloadTurnStart struct { // Type of event being reported EventType constant.TurnStart `json:"event_type,required"` // Unique identifier for the turn within a session TurnID string `json:"turn_id,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EventType respjson.Field TurnID respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Payload for turn start events in agent turn responses.
func (TurnResponseEventPayloadTurnStart) RawJSON ¶
func (r TurnResponseEventPayloadTurnStart) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnResponseEventPayloadTurnStart) UnmarshalJSON ¶
func (r *TurnResponseEventPayloadTurnStart) UnmarshalJSON(data []byte) error
type TurnResponseEventPayloadUnion ¶
type TurnResponseEventPayloadUnion struct { // Any of "step_start", "step_progress", "step_complete", "turn_start", // "turn_complete", "turn_awaiting_input". EventType string `json:"event_type"` StepID string `json:"step_id"` StepType string `json:"step_type"` // This field is from variant [TurnResponseEventPayloadStepStart]. Metadata map[string]TurnResponseEventPayloadStepStartMetadataUnion `json:"metadata"` // This field is from variant [TurnResponseEventPayloadStepProgress]. Delta shared.ContentDeltaUnion `json:"delta"` // This field is from variant [TurnResponseEventPayloadStepComplete]. StepDetails TurnResponseEventPayloadStepCompleteStepDetailsUnion `json:"step_details"` // This field is from variant [TurnResponseEventPayloadTurnStart]. TurnID string `json:"turn_id"` // This field is from variant [TurnResponseEventPayloadTurnComplete]. Turn Turn `json:"turn"` JSON struct { EventType respjson.Field StepID respjson.Field StepType respjson.Field Metadata respjson.Field Delta respjson.Field StepDetails respjson.Field TurnID respjson.Field Turn respjson.Field // contains filtered or unexported fields } `json:"-"` }
TurnResponseEventPayloadUnion contains all possible properties and values from TurnResponseEventPayloadStepStart, TurnResponseEventPayloadStepProgress, TurnResponseEventPayloadStepComplete, TurnResponseEventPayloadTurnStart, TurnResponseEventPayloadTurnComplete, TurnResponseEventPayloadTurnAwaitingInput.
Use the TurnResponseEventPayloadUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (TurnResponseEventPayloadUnion) AsAny ¶
func (u TurnResponseEventPayloadUnion) AsAny() anyTurnResponseEventPayload
Use the following switch statement to find the correct variant
switch variant := TurnResponseEventPayloadUnion.AsAny().(type) { case llamastackclient.TurnResponseEventPayloadStepStart: case llamastackclient.TurnResponseEventPayloadStepProgress: case llamastackclient.TurnResponseEventPayloadStepComplete: case llamastackclient.TurnResponseEventPayloadTurnStart: case llamastackclient.TurnResponseEventPayloadTurnComplete: case llamastackclient.TurnResponseEventPayloadTurnAwaitingInput: default: fmt.Errorf("no variant present") }
func (TurnResponseEventPayloadUnion) AsStepComplete ¶
func (u TurnResponseEventPayloadUnion) AsStepComplete() (v TurnResponseEventPayloadStepComplete)
func (TurnResponseEventPayloadUnion) AsStepProgress ¶
func (u TurnResponseEventPayloadUnion) AsStepProgress() (v TurnResponseEventPayloadStepProgress)
func (TurnResponseEventPayloadUnion) AsStepStart ¶
func (u TurnResponseEventPayloadUnion) AsStepStart() (v TurnResponseEventPayloadStepStart)
func (TurnResponseEventPayloadUnion) AsTurnAwaitingInput ¶
func (u TurnResponseEventPayloadUnion) AsTurnAwaitingInput() (v TurnResponseEventPayloadTurnAwaitingInput)
func (TurnResponseEventPayloadUnion) AsTurnComplete ¶
func (u TurnResponseEventPayloadUnion) AsTurnComplete() (v TurnResponseEventPayloadTurnComplete)
func (TurnResponseEventPayloadUnion) AsTurnStart ¶
func (u TurnResponseEventPayloadUnion) AsTurnStart() (v TurnResponseEventPayloadTurnStart)
func (TurnResponseEventPayloadUnion) RawJSON ¶
func (u TurnResponseEventPayloadUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnResponseEventPayloadUnion) UnmarshalJSON ¶
func (r *TurnResponseEventPayloadUnion) UnmarshalJSON(data []byte) error
type TurnStepUnion ¶
type TurnStepUnion struct { // This field is from variant [InferenceStep]. ModelResponse shared.CompletionMessage `json:"model_response"` StepID string `json:"step_id"` // Any of "inference", "tool_execution", "shield_call", "memory_retrieval". StepType string `json:"step_type"` TurnID string `json:"turn_id"` CompletedAt time.Time `json:"completed_at"` StartedAt time.Time `json:"started_at"` // This field is from variant [ToolExecutionStep]. ToolCalls []shared.ToolCall `json:"tool_calls"` // This field is from variant [ToolExecutionStep]. ToolResponses []ToolResponse `json:"tool_responses"` // This field is from variant [ShieldCallStep]. Violation shared.SafetyViolation `json:"violation"` // This field is from variant [MemoryRetrievalStep]. InsertedContext shared.InterleavedContentUnion `json:"inserted_context"` // This field is from variant [MemoryRetrievalStep]. VectorDBIDs string `json:"vector_db_ids"` JSON struct { ModelResponse respjson.Field StepID respjson.Field StepType respjson.Field TurnID respjson.Field CompletedAt respjson.Field StartedAt respjson.Field ToolCalls respjson.Field ToolResponses respjson.Field Violation respjson.Field InsertedContext respjson.Field VectorDBIDs respjson.Field // contains filtered or unexported fields } `json:"-"` }
TurnStepUnion contains all possible properties and values from InferenceStep, ToolExecutionStep, ShieldCallStep, MemoryRetrievalStep.
Use the TurnStepUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (TurnStepUnion) AsAny ¶
func (u TurnStepUnion) AsAny() anyTurnStep
Use the following switch statement to find the correct variant
switch variant := TurnStepUnion.AsAny().(type) { case llamastackclient.InferenceStep: case llamastackclient.ToolExecutionStep: case llamastackclient.ShieldCallStep: case llamastackclient.MemoryRetrievalStep: default: fmt.Errorf("no variant present") }
func (TurnStepUnion) AsInference ¶
func (u TurnStepUnion) AsInference() (v InferenceStep)
func (TurnStepUnion) AsMemoryRetrieval ¶
func (u TurnStepUnion) AsMemoryRetrieval() (v MemoryRetrievalStep)
func (TurnStepUnion) AsShieldCall ¶
func (u TurnStepUnion) AsShieldCall() (v ShieldCallStep)
func (TurnStepUnion) AsToolExecution ¶
func (u TurnStepUnion) AsToolExecution() (v ToolExecutionStep)
func (TurnStepUnion) RawJSON ¶
func (u TurnStepUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*TurnStepUnion) UnmarshalJSON ¶
func (r *TurnStepUnion) UnmarshalJSON(data []byte) error
type UserMessage ¶
type UserMessage = shared.UserMessage
A message from the user in a chat conversation.
This is an alias to an internal type.
type UserMessageParam ¶
type UserMessageParam = shared.UserMessageParam
A message from the user in a chat conversation.
This is an alias to an internal type.
type VectorDBGetResponse ¶
type VectorDBGetResponse struct { // Dimension of the embedding vectors EmbeddingDimension int64 `json:"embedding_dimension,required"` // Name of the embedding model to use for vector generation EmbeddingModel string `json:"embedding_model,required"` Identifier string `json:"identifier,required"` ProviderID string `json:"provider_id,required"` // Type of resource, always 'vector_db' for vector databases Type constant.VectorDB `json:"type,required"` ProviderResourceID string `json:"provider_resource_id"` VectorDBName string `json:"vector_db_name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EmbeddingDimension respjson.Field EmbeddingModel respjson.Field Identifier respjson.Field ProviderID respjson.Field Type respjson.Field ProviderResourceID respjson.Field VectorDBName respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Vector database resource for storing and querying vector embeddings.
func (VectorDBGetResponse) RawJSON ¶
func (r VectorDBGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorDBGetResponse) UnmarshalJSON ¶
func (r *VectorDBGetResponse) UnmarshalJSON(data []byte) error
type VectorDBRegisterParams ¶
type VectorDBRegisterParams struct { // The embedding model to use. EmbeddingModel string `json:"embedding_model,required"` // The identifier of the vector database to register. VectorDBID string `json:"vector_db_id,required"` // The dimension of the embedding model. EmbeddingDimension param.Opt[int64] `json:"embedding_dimension,omitzero"` // The identifier of the provider. ProviderID param.Opt[string] `json:"provider_id,omitzero"` // The identifier of the vector database in the provider. ProviderVectorDBID param.Opt[string] `json:"provider_vector_db_id,omitzero"` // The name of the vector database. VectorDBName param.Opt[string] `json:"vector_db_name,omitzero"` // contains filtered or unexported fields }
func (VectorDBRegisterParams) MarshalJSON ¶
func (r VectorDBRegisterParams) MarshalJSON() (data []byte, err error)
func (*VectorDBRegisterParams) UnmarshalJSON ¶
func (r *VectorDBRegisterParams) UnmarshalJSON(data []byte) error
type VectorDBRegisterResponse ¶
type VectorDBRegisterResponse struct { // Dimension of the embedding vectors EmbeddingDimension int64 `json:"embedding_dimension,required"` // Name of the embedding model to use for vector generation EmbeddingModel string `json:"embedding_model,required"` Identifier string `json:"identifier,required"` ProviderID string `json:"provider_id,required"` // Type of resource, always 'vector_db' for vector databases Type constant.VectorDB `json:"type,required"` ProviderResourceID string `json:"provider_resource_id"` VectorDBName string `json:"vector_db_name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { EmbeddingDimension respjson.Field EmbeddingModel respjson.Field Identifier respjson.Field ProviderID respjson.Field Type respjson.Field ProviderResourceID respjson.Field VectorDBName respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Vector database resource for storing and querying vector embeddings.
func (VectorDBRegisterResponse) RawJSON ¶
func (r VectorDBRegisterResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorDBRegisterResponse) UnmarshalJSON ¶
func (r *VectorDBRegisterResponse) UnmarshalJSON(data []byte) error
type VectorDBService ¶
type VectorDBService struct {
Options []option.RequestOption
}
VectorDBService contains methods and other services that help with interacting with the llama-stack-client 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 NewVectorDBService method instead.
func NewVectorDBService ¶
func NewVectorDBService(opts ...option.RequestOption) (r VectorDBService)
NewVectorDBService 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 (*VectorDBService) Get ¶
func (r *VectorDBService) Get(ctx context.Context, vectorDBID string, opts ...option.RequestOption) (res *VectorDBGetResponse, err error)
Get a vector database by its identifier.
func (*VectorDBService) List ¶
func (r *VectorDBService) List(ctx context.Context, opts ...option.RequestOption) (res *[]ListVectorDBsResponseData, err error)
List all vector databases.
func (*VectorDBService) Register ¶
func (r *VectorDBService) Register(ctx context.Context, body VectorDBRegisterParams, opts ...option.RequestOption) (res *VectorDBRegisterResponse, err error)
Register a vector database.
func (*VectorDBService) Unregister ¶
func (r *VectorDBService) Unregister(ctx context.Context, vectorDBID string, opts ...option.RequestOption) (err error)
Unregister a vector database.
type VectorIoInsertParams ¶
type VectorIoInsertParams struct { // The chunks to insert. Each `Chunk` should contain content which can be // interleaved text, images, or other types. `metadata`: `dict[str, Any]` and // `embedding`: `List[float]` are optional. If `metadata` is provided, you // configure how Llama Stack formats the chunk during generation. If `embedding` is // not provided, it will be computed later. Chunks []VectorIoInsertParamsChunk `json:"chunks,omitzero,required"` // The identifier of the vector database to insert the chunks into. VectorDBID string `json:"vector_db_id,required"` // The time to live of the chunks. TtlSeconds param.Opt[int64] `json:"ttl_seconds,omitzero"` // contains filtered or unexported fields }
func (VectorIoInsertParams) MarshalJSON ¶
func (r VectorIoInsertParams) MarshalJSON() (data []byte, err error)
func (*VectorIoInsertParams) UnmarshalJSON ¶
func (r *VectorIoInsertParams) UnmarshalJSON(data []byte) error
type VectorIoInsertParamsChunk ¶
type VectorIoInsertParamsChunk struct { // The content of the chunk, which can be interleaved text, images, or other types. Content shared.InterleavedContentUnionParam `json:"content,omitzero,required"` // Metadata associated with the chunk that will be used in the model context during // inference. Metadata map[string]VectorIoInsertParamsChunkMetadataUnion `json:"metadata,omitzero,required"` // The chunk ID that is stored in the vector database. Used for backend // functionality. StoredChunkID param.Opt[string] `json:"stored_chunk_id,omitzero"` // Metadata for the chunk that will NOT be used in the context during inference. // The `chunk_metadata` is required backend functionality. ChunkMetadata VectorIoInsertParamsChunkChunkMetadata `json:"chunk_metadata,omitzero"` // Optional embedding for the chunk. If not provided, it will be computed later. Embedding []float64 `json:"embedding,omitzero"` // contains filtered or unexported fields }
A chunk of content that can be inserted into a vector database.
The properties Content, Metadata are required.
func (VectorIoInsertParamsChunk) MarshalJSON ¶
func (r VectorIoInsertParamsChunk) MarshalJSON() (data []byte, err error)
func (*VectorIoInsertParamsChunk) UnmarshalJSON ¶
func (r *VectorIoInsertParamsChunk) UnmarshalJSON(data []byte) error
type VectorIoInsertParamsChunkChunkMetadata ¶
type VectorIoInsertParamsChunkChunkMetadata struct { // The dimension of the embedding vector for the chunk. ChunkEmbeddingDimension param.Opt[int64] `json:"chunk_embedding_dimension,omitzero"` // The embedding model used to create the chunk's embedding. ChunkEmbeddingModel param.Opt[string] `json:"chunk_embedding_model,omitzero"` // The ID of the chunk. If not set, it will be generated based on the document ID // and content. ChunkID param.Opt[string] `json:"chunk_id,omitzero"` // The tokenizer used to create the chunk. Default is Tiktoken. ChunkTokenizer param.Opt[string] `json:"chunk_tokenizer,omitzero"` // The window of the chunk, which can be used to group related chunks together. ChunkWindow param.Opt[string] `json:"chunk_window,omitzero"` // The number of tokens in the content of the chunk. ContentTokenCount param.Opt[int64] `json:"content_token_count,omitzero"` // An optional timestamp indicating when the chunk was created. CreatedTimestamp param.Opt[int64] `json:"created_timestamp,omitzero"` // The ID of the document this chunk belongs to. DocumentID param.Opt[string] `json:"document_id,omitzero"` // The number of tokens in the metadata of the chunk. MetadataTokenCount param.Opt[int64] `json:"metadata_token_count,omitzero"` // The source of the content, such as a URL, file path, or other identifier. Source param.Opt[string] `json:"source,omitzero"` // An optional timestamp indicating when the chunk was last updated. UpdatedTimestamp param.Opt[int64] `json:"updated_timestamp,omitzero"` // contains filtered or unexported fields }
Metadata for the chunk that will NOT be used in the context during inference. The `chunk_metadata` is required backend functionality.
func (VectorIoInsertParamsChunkChunkMetadata) MarshalJSON ¶
func (r VectorIoInsertParamsChunkChunkMetadata) MarshalJSON() (data []byte, err error)
func (*VectorIoInsertParamsChunkChunkMetadata) UnmarshalJSON ¶
func (r *VectorIoInsertParamsChunkChunkMetadata) UnmarshalJSON(data []byte) error
type VectorIoInsertParamsChunkMetadataUnion ¶
type VectorIoInsertParamsChunkMetadataUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (VectorIoInsertParamsChunkMetadataUnion) MarshalJSON ¶
func (u VectorIoInsertParamsChunkMetadataUnion) MarshalJSON() ([]byte, error)
func (*VectorIoInsertParamsChunkMetadataUnion) UnmarshalJSON ¶
func (u *VectorIoInsertParamsChunkMetadataUnion) UnmarshalJSON(data []byte) error
type VectorIoQueryParams ¶
type VectorIoQueryParams struct { // The query to search for. Query shared.InterleavedContentUnionParam `json:"query,omitzero,required"` // The identifier of the vector database to query. VectorDBID string `json:"vector_db_id,required"` // The parameters of the query. Params map[string]VectorIoQueryParamsParamUnion `json:"params,omitzero"` // contains filtered or unexported fields }
func (VectorIoQueryParams) MarshalJSON ¶
func (r VectorIoQueryParams) MarshalJSON() (data []byte, err error)
func (*VectorIoQueryParams) UnmarshalJSON ¶
func (r *VectorIoQueryParams) UnmarshalJSON(data []byte) error
type VectorIoQueryParamsParamUnion ¶
type VectorIoQueryParamsParamUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (VectorIoQueryParamsParamUnion) MarshalJSON ¶
func (u VectorIoQueryParamsParamUnion) MarshalJSON() ([]byte, error)
func (*VectorIoQueryParamsParamUnion) UnmarshalJSON ¶
func (u *VectorIoQueryParamsParamUnion) UnmarshalJSON(data []byte) error
type VectorIoService ¶
type VectorIoService struct {
Options []option.RequestOption
}
VectorIoService contains methods and other services that help with interacting with the llama-stack-client 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 NewVectorIoService method instead.
func NewVectorIoService ¶
func NewVectorIoService(opts ...option.RequestOption) (r VectorIoService)
NewVectorIoService 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 (*VectorIoService) Insert ¶
func (r *VectorIoService) Insert(ctx context.Context, body VectorIoInsertParams, opts ...option.RequestOption) (err error)
Insert chunks into a vector database.
func (*VectorIoService) Query ¶
func (r *VectorIoService) Query(ctx context.Context, body VectorIoQueryParams, opts ...option.RequestOption) (res *QueryChunksResponse, err error)
Query chunks from a vector database.
type VectorStore ¶
type VectorStore struct { // Unique identifier for the vector store ID string `json:"id,required"` // Timestamp when the vector store was created CreatedAt int64 `json:"created_at,required"` // File processing status counts for the vector store FileCounts VectorStoreFileCounts `json:"file_counts,required"` // Set of key-value pairs that can be attached to the vector store Metadata map[string]VectorStoreMetadataUnion `json:"metadata,required"` // Object type identifier, always "vector_store" Object string `json:"object,required"` // Current status of the vector store Status string `json:"status,required"` // Storage space used by the vector store in bytes UsageBytes int64 `json:"usage_bytes,required"` // (Optional) Expiration policy for the vector store ExpiresAfter map[string]VectorStoreExpiresAfterUnion `json:"expires_after"` // (Optional) Timestamp when the vector store will expire ExpiresAt int64 `json:"expires_at"` // (Optional) Timestamp of last activity on the vector store LastActiveAt int64 `json:"last_active_at"` // (Optional) Name of the vector store Name string `json:"name"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field CreatedAt respjson.Field FileCounts respjson.Field Metadata respjson.Field Object respjson.Field Status respjson.Field UsageBytes respjson.Field ExpiresAfter respjson.Field ExpiresAt respjson.Field LastActiveAt respjson.Field Name respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
OpenAI Vector Store object.
func (VectorStore) RawJSON ¶
func (r VectorStore) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStore) UnmarshalJSON ¶
func (r *VectorStore) UnmarshalJSON(data []byte) error
type VectorStoreDeleteResponse ¶
type VectorStoreDeleteResponse struct { // Unique identifier of the deleted vector store ID string `json:"id,required"` // Whether the deletion operation was successful Deleted bool `json:"deleted,required"` // Object type identifier for the deletion response Object string `json:"object,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Deleted respjson.Field Object respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from deleting a vector store.
func (VectorStoreDeleteResponse) RawJSON ¶
func (r VectorStoreDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreDeleteResponse) UnmarshalJSON ¶
func (r *VectorStoreDeleteResponse) UnmarshalJSON(data []byte) error
type VectorStoreExpiresAfterUnion ¶
type VectorStoreExpiresAfterUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
VectorStoreExpiresAfterUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (VectorStoreExpiresAfterUnion) AsAnyArray ¶
func (u VectorStoreExpiresAfterUnion) AsAnyArray() (v []any)
func (VectorStoreExpiresAfterUnion) AsBool ¶
func (u VectorStoreExpiresAfterUnion) AsBool() (v bool)
func (VectorStoreExpiresAfterUnion) AsFloat ¶
func (u VectorStoreExpiresAfterUnion) AsFloat() (v float64)
func (VectorStoreExpiresAfterUnion) AsString ¶
func (u VectorStoreExpiresAfterUnion) AsString() (v string)
func (VectorStoreExpiresAfterUnion) RawJSON ¶
func (u VectorStoreExpiresAfterUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreExpiresAfterUnion) UnmarshalJSON ¶
func (r *VectorStoreExpiresAfterUnion) UnmarshalJSON(data []byte) error
type VectorStoreFile ¶
type VectorStoreFile struct { // Unique identifier for the file ID string `json:"id,required"` // Key-value attributes associated with the file Attributes map[string]VectorStoreFileAttributeUnion `json:"attributes,required"` // Strategy used for splitting the file into chunks ChunkingStrategy VectorStoreFileChunkingStrategyUnion `json:"chunking_strategy,required"` // Timestamp when the file was added to the vector store CreatedAt int64 `json:"created_at,required"` // Object type identifier, always "vector_store.file" Object string `json:"object,required"` // Current processing status of the file // // Any of "completed", "in_progress", "cancelled", "failed". Status VectorStoreFileStatus `json:"status,required"` // Storage space used by this file in bytes UsageBytes int64 `json:"usage_bytes,required"` // ID of the vector store containing this file VectorStoreID string `json:"vector_store_id,required"` // (Optional) Error information if file processing failed LastError VectorStoreFileLastError `json:"last_error"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Attributes respjson.Field ChunkingStrategy respjson.Field CreatedAt respjson.Field Object respjson.Field Status respjson.Field UsageBytes respjson.Field VectorStoreID respjson.Field LastError respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
OpenAI Vector Store File object.
func (VectorStoreFile) RawJSON ¶
func (r VectorStoreFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreFile) UnmarshalJSON ¶
func (r *VectorStoreFile) UnmarshalJSON(data []byte) error
type VectorStoreFileAttributeUnion ¶
type VectorStoreFileAttributeUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
VectorStoreFileAttributeUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (VectorStoreFileAttributeUnion) AsAnyArray ¶
func (u VectorStoreFileAttributeUnion) AsAnyArray() (v []any)
func (VectorStoreFileAttributeUnion) AsBool ¶
func (u VectorStoreFileAttributeUnion) AsBool() (v bool)
func (VectorStoreFileAttributeUnion) AsFloat ¶
func (u VectorStoreFileAttributeUnion) AsFloat() (v float64)
func (VectorStoreFileAttributeUnion) AsString ¶
func (u VectorStoreFileAttributeUnion) AsString() (v string)
func (VectorStoreFileAttributeUnion) RawJSON ¶
func (u VectorStoreFileAttributeUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreFileAttributeUnion) UnmarshalJSON ¶
func (r *VectorStoreFileAttributeUnion) UnmarshalJSON(data []byte) error
type VectorStoreFileChunkingStrategyAuto ¶
type VectorStoreFileChunkingStrategyAuto struct { // Strategy type, always "auto" for automatic chunking Type constant.Auto `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Automatic chunking strategy for vector store files.
func (VectorStoreFileChunkingStrategyAuto) RawJSON ¶
func (r VectorStoreFileChunkingStrategyAuto) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreFileChunkingStrategyAuto) UnmarshalJSON ¶
func (r *VectorStoreFileChunkingStrategyAuto) UnmarshalJSON(data []byte) error
type VectorStoreFileChunkingStrategyStatic ¶
type VectorStoreFileChunkingStrategyStatic struct { // Configuration parameters for the static chunking strategy Static VectorStoreFileChunkingStrategyStaticStatic `json:"static,required"` // Strategy type, always "static" for static chunking Type constant.Static `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Static respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Static chunking strategy with configurable parameters.
func (VectorStoreFileChunkingStrategyStatic) RawJSON ¶
func (r VectorStoreFileChunkingStrategyStatic) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreFileChunkingStrategyStatic) UnmarshalJSON ¶
func (r *VectorStoreFileChunkingStrategyStatic) UnmarshalJSON(data []byte) error
type VectorStoreFileChunkingStrategyStaticStatic ¶
type VectorStoreFileChunkingStrategyStaticStatic struct { // Number of tokens to overlap between adjacent chunks ChunkOverlapTokens int64 `json:"chunk_overlap_tokens,required"` // Maximum number of tokens per chunk, must be between 100 and 4096 MaxChunkSizeTokens int64 `json:"max_chunk_size_tokens,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ChunkOverlapTokens respjson.Field MaxChunkSizeTokens respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Configuration parameters for the static chunking strategy
func (VectorStoreFileChunkingStrategyStaticStatic) RawJSON ¶
func (r VectorStoreFileChunkingStrategyStaticStatic) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreFileChunkingStrategyStaticStatic) UnmarshalJSON ¶
func (r *VectorStoreFileChunkingStrategyStaticStatic) UnmarshalJSON(data []byte) error
type VectorStoreFileChunkingStrategyUnion ¶
type VectorStoreFileChunkingStrategyUnion struct { // Any of "auto", "static". Type string `json:"type"` // This field is from variant [VectorStoreFileChunkingStrategyStatic]. Static VectorStoreFileChunkingStrategyStaticStatic `json:"static"` JSON struct { Type respjson.Field Static respjson.Field // contains filtered or unexported fields } `json:"-"` }
VectorStoreFileChunkingStrategyUnion contains all possible properties and values from VectorStoreFileChunkingStrategyAuto, VectorStoreFileChunkingStrategyStatic.
Use the VectorStoreFileChunkingStrategyUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (VectorStoreFileChunkingStrategyUnion) AsAny ¶
func (u VectorStoreFileChunkingStrategyUnion) AsAny() anyVectorStoreFileChunkingStrategy
Use the following switch statement to find the correct variant
switch variant := VectorStoreFileChunkingStrategyUnion.AsAny().(type) { case llamastackclient.VectorStoreFileChunkingStrategyAuto: case llamastackclient.VectorStoreFileChunkingStrategyStatic: default: fmt.Errorf("no variant present") }
func (VectorStoreFileChunkingStrategyUnion) AsAuto ¶
func (u VectorStoreFileChunkingStrategyUnion) AsAuto() (v VectorStoreFileChunkingStrategyAuto)
func (VectorStoreFileChunkingStrategyUnion) AsStatic ¶
func (u VectorStoreFileChunkingStrategyUnion) AsStatic() (v VectorStoreFileChunkingStrategyStatic)
func (VectorStoreFileChunkingStrategyUnion) RawJSON ¶
func (u VectorStoreFileChunkingStrategyUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreFileChunkingStrategyUnion) UnmarshalJSON ¶
func (r *VectorStoreFileChunkingStrategyUnion) UnmarshalJSON(data []byte) error
type VectorStoreFileContentParams ¶
type VectorStoreFileContentParams struct { VectorStoreID string `path:"vector_store_id,required" json:"-"` // contains filtered or unexported fields }
type VectorStoreFileContentResponse ¶
type VectorStoreFileContentResponse struct { // Key-value attributes associated with the file Attributes map[string]VectorStoreFileContentResponseAttributeUnion `json:"attributes,required"` // List of content items from the file Content []VectorStoreFileContentResponseContent `json:"content,required"` // Unique identifier for the file FileID string `json:"file_id,required"` // Name of the file Filename string `json:"filename,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Attributes respjson.Field Content respjson.Field FileID respjson.Field Filename respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from retrieving the contents of a vector store file.
func (VectorStoreFileContentResponse) RawJSON ¶
func (r VectorStoreFileContentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreFileContentResponse) UnmarshalJSON ¶
func (r *VectorStoreFileContentResponse) UnmarshalJSON(data []byte) error
type VectorStoreFileContentResponseAttributeUnion ¶
type VectorStoreFileContentResponseAttributeUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
VectorStoreFileContentResponseAttributeUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (VectorStoreFileContentResponseAttributeUnion) AsAnyArray ¶
func (u VectorStoreFileContentResponseAttributeUnion) AsAnyArray() (v []any)
func (VectorStoreFileContentResponseAttributeUnion) AsBool ¶
func (u VectorStoreFileContentResponseAttributeUnion) AsBool() (v bool)
func (VectorStoreFileContentResponseAttributeUnion) AsFloat ¶
func (u VectorStoreFileContentResponseAttributeUnion) AsFloat() (v float64)
func (VectorStoreFileContentResponseAttributeUnion) AsString ¶
func (u VectorStoreFileContentResponseAttributeUnion) AsString() (v string)
func (VectorStoreFileContentResponseAttributeUnion) RawJSON ¶
func (u VectorStoreFileContentResponseAttributeUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreFileContentResponseAttributeUnion) UnmarshalJSON ¶
func (r *VectorStoreFileContentResponseAttributeUnion) UnmarshalJSON(data []byte) error
type VectorStoreFileContentResponseContent ¶
type VectorStoreFileContentResponseContent struct { // The actual text content Text string `json:"text,required"` // Content type, currently only "text" is supported Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Content item from a vector store file or search result.
func (VectorStoreFileContentResponseContent) RawJSON ¶
func (r VectorStoreFileContentResponseContent) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreFileContentResponseContent) UnmarshalJSON ¶
func (r *VectorStoreFileContentResponseContent) UnmarshalJSON(data []byte) error
type VectorStoreFileCounts ¶
type VectorStoreFileCounts struct { // Number of files that had their processing cancelled Cancelled int64 `json:"cancelled,required"` // Number of files that have been successfully processed Completed int64 `json:"completed,required"` // Number of files that failed to process Failed int64 `json:"failed,required"` // Number of files currently being processed InProgress int64 `json:"in_progress,required"` // Total number of files in the vector store Total int64 `json:"total,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Cancelled respjson.Field Completed respjson.Field Failed respjson.Field InProgress respjson.Field Total respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
File processing status counts for the vector store
func (VectorStoreFileCounts) RawJSON ¶
func (r VectorStoreFileCounts) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreFileCounts) UnmarshalJSON ¶
func (r *VectorStoreFileCounts) UnmarshalJSON(data []byte) error
type VectorStoreFileDeleteParams ¶
type VectorStoreFileDeleteParams struct { VectorStoreID string `path:"vector_store_id,required" json:"-"` // contains filtered or unexported fields }
type VectorStoreFileDeleteResponse ¶
type VectorStoreFileDeleteResponse struct { // Unique identifier of the deleted file ID string `json:"id,required"` // Whether the deletion operation was successful Deleted bool `json:"deleted,required"` // Object type identifier for the deletion response Object string `json:"object,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Deleted respjson.Field Object respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from deleting a vector store file.
func (VectorStoreFileDeleteResponse) RawJSON ¶
func (r VectorStoreFileDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreFileDeleteResponse) UnmarshalJSON ¶
func (r *VectorStoreFileDeleteResponse) UnmarshalJSON(data []byte) error
type VectorStoreFileGetParams ¶
type VectorStoreFileGetParams struct { VectorStoreID string `path:"vector_store_id,required" json:"-"` // contains filtered or unexported fields }
type VectorStoreFileLastError ¶
type VectorStoreFileLastError struct { // Error code indicating the type of failure // // Any of "server_error", "rate_limit_exceeded". Code VectorStoreFileLastErrorCode `json:"code,required"` // Human-readable error message describing the failure Message string `json:"message,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Code respjson.Field Message respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
(Optional) Error information if file processing failed
func (VectorStoreFileLastError) RawJSON ¶
func (r VectorStoreFileLastError) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreFileLastError) UnmarshalJSON ¶
func (r *VectorStoreFileLastError) UnmarshalJSON(data []byte) error
type VectorStoreFileLastErrorCode ¶
type VectorStoreFileLastErrorCode string
Error code indicating the type of failure
const ( VectorStoreFileLastErrorCodeServerError VectorStoreFileLastErrorCode = "server_error" VectorStoreFileLastErrorCodeRateLimitExceeded VectorStoreFileLastErrorCode = "rate_limit_exceeded" )
type VectorStoreFileListParams ¶
type VectorStoreFileListParams struct { // (Optional) A cursor for use in pagination. `after` is an object ID that defines // your place in the list. After param.Opt[string] `query:"after,omitzero" json:"-"` // (Optional) A cursor for use in pagination. `before` is an object ID that defines // your place in the list. Before param.Opt[string] `query:"before,omitzero" json:"-"` // (Optional) A limit on the number of objects to be returned. Limit can range // between 1 and 100, and the default is 20. Limit param.Opt[int64] `query:"limit,omitzero" json:"-"` // (Optional) Sort order by the `created_at` timestamp of the objects. `asc` for // ascending order and `desc` for descending order. Order param.Opt[string] `query:"order,omitzero" json:"-"` // (Optional) Filter by file status to only return files with the specified status. // // Any of "completed", "in_progress", "cancelled", "failed". Filter VectorStoreFileListParamsFilter `query:"filter,omitzero" json:"-"` // contains filtered or unexported fields }
func (VectorStoreFileListParams) URLQuery ¶
func (r VectorStoreFileListParams) URLQuery() (v url.Values, err error)
URLQuery serializes VectorStoreFileListParams's query parameters as `url.Values`.
type VectorStoreFileListParamsFilter ¶
type VectorStoreFileListParamsFilter string
(Optional) Filter by file status to only return files with the specified status.
const ( VectorStoreFileListParamsFilterCompleted VectorStoreFileListParamsFilter = "completed" VectorStoreFileListParamsFilterInProgress VectorStoreFileListParamsFilter = "in_progress" VectorStoreFileListParamsFilterCancelled VectorStoreFileListParamsFilter = "cancelled" VectorStoreFileListParamsFilterFailed VectorStoreFileListParamsFilter = "failed" )
type VectorStoreFileNewParams ¶
type VectorStoreFileNewParams struct { // The ID of the file to attach to the vector store. FileID string `json:"file_id,required"` // The key-value attributes stored with the file, which can be used for filtering. Attributes map[string]VectorStoreFileNewParamsAttributeUnion `json:"attributes,omitzero"` // The chunking strategy to use for the file. ChunkingStrategy VectorStoreFileNewParamsChunkingStrategyUnion `json:"chunking_strategy,omitzero"` // contains filtered or unexported fields }
func (VectorStoreFileNewParams) MarshalJSON ¶
func (r VectorStoreFileNewParams) MarshalJSON() (data []byte, err error)
func (*VectorStoreFileNewParams) UnmarshalJSON ¶
func (r *VectorStoreFileNewParams) UnmarshalJSON(data []byte) error
type VectorStoreFileNewParamsAttributeUnion ¶
type VectorStoreFileNewParamsAttributeUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (VectorStoreFileNewParamsAttributeUnion) MarshalJSON ¶
func (u VectorStoreFileNewParamsAttributeUnion) MarshalJSON() ([]byte, error)
func (*VectorStoreFileNewParamsAttributeUnion) UnmarshalJSON ¶
func (u *VectorStoreFileNewParamsAttributeUnion) UnmarshalJSON(data []byte) error
type VectorStoreFileNewParamsChunkingStrategyAuto ¶
type VectorStoreFileNewParamsChunkingStrategyAuto struct { // Strategy type, always "auto" for automatic chunking Type constant.Auto `json:"type,required"` // contains filtered or unexported fields }
Automatic chunking strategy for vector store files.
This struct has a constant value, construct it with NewVectorStoreFileNewParamsChunkingStrategyAuto.
func NewVectorStoreFileNewParamsChunkingStrategyAuto ¶
func NewVectorStoreFileNewParamsChunkingStrategyAuto() VectorStoreFileNewParamsChunkingStrategyAuto
func (VectorStoreFileNewParamsChunkingStrategyAuto) MarshalJSON ¶
func (r VectorStoreFileNewParamsChunkingStrategyAuto) MarshalJSON() (data []byte, err error)
func (*VectorStoreFileNewParamsChunkingStrategyAuto) UnmarshalJSON ¶
func (r *VectorStoreFileNewParamsChunkingStrategyAuto) UnmarshalJSON(data []byte) error
type VectorStoreFileNewParamsChunkingStrategyStatic ¶
type VectorStoreFileNewParamsChunkingStrategyStatic struct { // Configuration parameters for the static chunking strategy Static VectorStoreFileNewParamsChunkingStrategyStaticStatic `json:"static,omitzero,required"` // Strategy type, always "static" for static chunking // // This field can be elided, and will marshal its zero value as "static". Type constant.Static `json:"type,required"` // contains filtered or unexported fields }
Static chunking strategy with configurable parameters.
The properties Static, Type are required.
func (VectorStoreFileNewParamsChunkingStrategyStatic) MarshalJSON ¶
func (r VectorStoreFileNewParamsChunkingStrategyStatic) MarshalJSON() (data []byte, err error)
func (*VectorStoreFileNewParamsChunkingStrategyStatic) UnmarshalJSON ¶
func (r *VectorStoreFileNewParamsChunkingStrategyStatic) UnmarshalJSON(data []byte) error
type VectorStoreFileNewParamsChunkingStrategyStaticStatic ¶
type VectorStoreFileNewParamsChunkingStrategyStaticStatic struct { // Number of tokens to overlap between adjacent chunks ChunkOverlapTokens int64 `json:"chunk_overlap_tokens,required"` // Maximum number of tokens per chunk, must be between 100 and 4096 MaxChunkSizeTokens int64 `json:"max_chunk_size_tokens,required"` // contains filtered or unexported fields }
Configuration parameters for the static chunking strategy
The properties ChunkOverlapTokens, MaxChunkSizeTokens are required.
func (VectorStoreFileNewParamsChunkingStrategyStaticStatic) MarshalJSON ¶
func (r VectorStoreFileNewParamsChunkingStrategyStaticStatic) MarshalJSON() (data []byte, err error)
func (*VectorStoreFileNewParamsChunkingStrategyStaticStatic) UnmarshalJSON ¶
func (r *VectorStoreFileNewParamsChunkingStrategyStaticStatic) UnmarshalJSON(data []byte) error
type VectorStoreFileNewParamsChunkingStrategyUnion ¶
type VectorStoreFileNewParamsChunkingStrategyUnion struct { OfAuto *VectorStoreFileNewParamsChunkingStrategyAuto `json:",omitzero,inline"` OfStatic *VectorStoreFileNewParamsChunkingStrategyStatic `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (VectorStoreFileNewParamsChunkingStrategyUnion) GetStatic ¶
func (u VectorStoreFileNewParamsChunkingStrategyUnion) GetStatic() *VectorStoreFileNewParamsChunkingStrategyStaticStatic
Returns a pointer to the underlying variant's property, if present.
func (VectorStoreFileNewParamsChunkingStrategyUnion) GetType ¶
func (u VectorStoreFileNewParamsChunkingStrategyUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (VectorStoreFileNewParamsChunkingStrategyUnion) MarshalJSON ¶
func (u VectorStoreFileNewParamsChunkingStrategyUnion) MarshalJSON() ([]byte, error)
func (*VectorStoreFileNewParamsChunkingStrategyUnion) UnmarshalJSON ¶
func (u *VectorStoreFileNewParamsChunkingStrategyUnion) UnmarshalJSON(data []byte) error
type VectorStoreFileService ¶
type VectorStoreFileService struct {
Options []option.RequestOption
}
VectorStoreFileService contains methods and other services that help with interacting with the llama-stack-client 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 NewVectorStoreFileService method instead.
func NewVectorStoreFileService ¶
func NewVectorStoreFileService(opts ...option.RequestOption) (r VectorStoreFileService)
NewVectorStoreFileService 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 (*VectorStoreFileService) Content ¶
func (r *VectorStoreFileService) Content(ctx context.Context, fileID string, query VectorStoreFileContentParams, opts ...option.RequestOption) (res *VectorStoreFileContentResponse, err error)
Retrieves the contents of a vector store file.
func (*VectorStoreFileService) Delete ¶
func (r *VectorStoreFileService) Delete(ctx context.Context, fileID string, body VectorStoreFileDeleteParams, opts ...option.RequestOption) (res *VectorStoreFileDeleteResponse, err error)
Delete a vector store file.
func (*VectorStoreFileService) Get ¶
func (r *VectorStoreFileService) Get(ctx context.Context, fileID string, query VectorStoreFileGetParams, opts ...option.RequestOption) (res *VectorStoreFile, err error)
Retrieves a vector store file.
func (*VectorStoreFileService) List ¶
func (r *VectorStoreFileService) List(ctx context.Context, vectorStoreID string, query VectorStoreFileListParams, opts ...option.RequestOption) (res *pagination.OpenAICursorPage[VectorStoreFile], err error)
List files in a vector store.
func (*VectorStoreFileService) ListAutoPaging ¶
func (r *VectorStoreFileService) ListAutoPaging(ctx context.Context, vectorStoreID string, query VectorStoreFileListParams, opts ...option.RequestOption) *pagination.OpenAICursorPageAutoPager[VectorStoreFile]
List files in a vector store.
func (*VectorStoreFileService) New ¶
func (r *VectorStoreFileService) New(ctx context.Context, vectorStoreID string, body VectorStoreFileNewParams, opts ...option.RequestOption) (res *VectorStoreFile, err error)
Attach a file to a vector store.
func (*VectorStoreFileService) Update ¶
func (r *VectorStoreFileService) Update(ctx context.Context, fileID string, params VectorStoreFileUpdateParams, opts ...option.RequestOption) (res *VectorStoreFile, err error)
Updates a vector store file.
type VectorStoreFileStatus ¶
type VectorStoreFileStatus string
Current processing status of the file
const ( VectorStoreFileStatusCompleted VectorStoreFileStatus = "completed" VectorStoreFileStatusInProgress VectorStoreFileStatus = "in_progress" VectorStoreFileStatusCancelled VectorStoreFileStatus = "cancelled" VectorStoreFileStatusFailed VectorStoreFileStatus = "failed" )
type VectorStoreFileUpdateParams ¶
type VectorStoreFileUpdateParams struct { VectorStoreID string `path:"vector_store_id,required" json:"-"` // The updated key-value attributes to store with the file. Attributes map[string]VectorStoreFileUpdateParamsAttributeUnion `json:"attributes,omitzero,required"` // contains filtered or unexported fields }
func (VectorStoreFileUpdateParams) MarshalJSON ¶
func (r VectorStoreFileUpdateParams) MarshalJSON() (data []byte, err error)
func (*VectorStoreFileUpdateParams) UnmarshalJSON ¶
func (r *VectorStoreFileUpdateParams) UnmarshalJSON(data []byte) error
type VectorStoreFileUpdateParamsAttributeUnion ¶
type VectorStoreFileUpdateParamsAttributeUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (VectorStoreFileUpdateParamsAttributeUnion) MarshalJSON ¶
func (u VectorStoreFileUpdateParamsAttributeUnion) MarshalJSON() ([]byte, error)
func (*VectorStoreFileUpdateParamsAttributeUnion) UnmarshalJSON ¶
func (u *VectorStoreFileUpdateParamsAttributeUnion) UnmarshalJSON(data []byte) error
type VectorStoreListParams ¶
type VectorStoreListParams struct { // A cursor for use in pagination. `after` is an object ID that defines your place // in the list. After param.Opt[string] `query:"after,omitzero" json:"-"` // A cursor for use in pagination. `before` is an object ID that defines your place // in the list. Before param.Opt[string] `query:"before,omitzero" json:"-"` // A limit on the number of objects to be returned. Limit can range between 1 and // 100, and the default is 20. Limit param.Opt[int64] `query:"limit,omitzero" json:"-"` // Sort order by the `created_at` timestamp of the objects. `asc` for ascending // order and `desc` for descending order. Order param.Opt[string] `query:"order,omitzero" json:"-"` // contains filtered or unexported fields }
func (VectorStoreListParams) URLQuery ¶
func (r VectorStoreListParams) URLQuery() (v url.Values, err error)
URLQuery serializes VectorStoreListParams's query parameters as `url.Values`.
type VectorStoreMetadataUnion ¶
type VectorStoreMetadataUnion struct { // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [[]any] instead of an object. OfAnyArray []any `json:",inline"` JSON struct { OfBool respjson.Field OfFloat respjson.Field OfString respjson.Field OfAnyArray respjson.Field // contains filtered or unexported fields } `json:"-"` }
VectorStoreMetadataUnion contains all possible properties and values from [bool], [float64], [string], [[]any].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfBool OfFloat OfString OfAnyArray]
func (VectorStoreMetadataUnion) AsAnyArray ¶
func (u VectorStoreMetadataUnion) AsAnyArray() (v []any)
func (VectorStoreMetadataUnion) AsBool ¶
func (u VectorStoreMetadataUnion) AsBool() (v bool)
func (VectorStoreMetadataUnion) AsFloat ¶
func (u VectorStoreMetadataUnion) AsFloat() (v float64)
func (VectorStoreMetadataUnion) AsString ¶
func (u VectorStoreMetadataUnion) AsString() (v string)
func (VectorStoreMetadataUnion) RawJSON ¶
func (u VectorStoreMetadataUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreMetadataUnion) UnmarshalJSON ¶
func (r *VectorStoreMetadataUnion) UnmarshalJSON(data []byte) error
type VectorStoreNewParams ¶
type VectorStoreNewParams struct { // The dimension of the embedding vectors (default: 384). EmbeddingDimension param.Opt[int64] `json:"embedding_dimension,omitzero"` // The embedding model to use for this vector store. EmbeddingModel param.Opt[string] `json:"embedding_model,omitzero"` // A name for the vector store. Name param.Opt[string] `json:"name,omitzero"` // The ID of the provider to use for this vector store. ProviderID param.Opt[string] `json:"provider_id,omitzero"` // The chunking strategy used to chunk the file(s). If not set, will use the `auto` // strategy. ChunkingStrategy map[string]VectorStoreNewParamsChunkingStrategyUnion `json:"chunking_strategy,omitzero"` // The expiration policy for a vector store. ExpiresAfter map[string]VectorStoreNewParamsExpiresAfterUnion `json:"expires_after,omitzero"` // A list of File IDs that the vector store should use. Useful for tools like // `file_search` that can access files. FileIDs []string `json:"file_ids,omitzero"` // Set of 16 key-value pairs that can be attached to an object. Metadata map[string]VectorStoreNewParamsMetadataUnion `json:"metadata,omitzero"` // contains filtered or unexported fields }
func (VectorStoreNewParams) MarshalJSON ¶
func (r VectorStoreNewParams) MarshalJSON() (data []byte, err error)
func (*VectorStoreNewParams) UnmarshalJSON ¶
func (r *VectorStoreNewParams) UnmarshalJSON(data []byte) error
type VectorStoreNewParamsChunkingStrategyUnion ¶
type VectorStoreNewParamsChunkingStrategyUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (VectorStoreNewParamsChunkingStrategyUnion) MarshalJSON ¶
func (u VectorStoreNewParamsChunkingStrategyUnion) MarshalJSON() ([]byte, error)
func (*VectorStoreNewParamsChunkingStrategyUnion) UnmarshalJSON ¶
func (u *VectorStoreNewParamsChunkingStrategyUnion) UnmarshalJSON(data []byte) error
type VectorStoreNewParamsExpiresAfterUnion ¶
type VectorStoreNewParamsExpiresAfterUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (VectorStoreNewParamsExpiresAfterUnion) MarshalJSON ¶
func (u VectorStoreNewParamsExpiresAfterUnion) MarshalJSON() ([]byte, error)
func (*VectorStoreNewParamsExpiresAfterUnion) UnmarshalJSON ¶
func (u *VectorStoreNewParamsExpiresAfterUnion) UnmarshalJSON(data []byte) error
type VectorStoreNewParamsMetadataUnion ¶
type VectorStoreNewParamsMetadataUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (VectorStoreNewParamsMetadataUnion) MarshalJSON ¶
func (u VectorStoreNewParamsMetadataUnion) MarshalJSON() ([]byte, error)
func (*VectorStoreNewParamsMetadataUnion) UnmarshalJSON ¶
func (u *VectorStoreNewParamsMetadataUnion) UnmarshalJSON(data []byte) error
type VectorStoreSearchParams ¶
type VectorStoreSearchParams struct { // The query string or array for performing the search. Query VectorStoreSearchParamsQueryUnion `json:"query,omitzero,required"` // Maximum number of results to return (1 to 50 inclusive, default 10). MaxNumResults param.Opt[int64] `json:"max_num_results,omitzero"` // Whether to rewrite the natural language query for vector search (default false) RewriteQuery param.Opt[bool] `json:"rewrite_query,omitzero"` // The search mode to use - "keyword", "vector", or "hybrid" (default "vector") SearchMode param.Opt[string] `json:"search_mode,omitzero"` // Filters based on file attributes to narrow the search results. Filters map[string]VectorStoreSearchParamsFilterUnion `json:"filters,omitzero"` // Ranking options for fine-tuning the search results. RankingOptions VectorStoreSearchParamsRankingOptions `json:"ranking_options,omitzero"` // contains filtered or unexported fields }
func (VectorStoreSearchParams) MarshalJSON ¶
func (r VectorStoreSearchParams) MarshalJSON() (data []byte, err error)
func (*VectorStoreSearchParams) UnmarshalJSON ¶
func (r *VectorStoreSearchParams) UnmarshalJSON(data []byte) error
type VectorStoreSearchParamsFilterUnion ¶
type VectorStoreSearchParamsFilterUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (VectorStoreSearchParamsFilterUnion) MarshalJSON ¶
func (u VectorStoreSearchParamsFilterUnion) MarshalJSON() ([]byte, error)
func (*VectorStoreSearchParamsFilterUnion) UnmarshalJSON ¶
func (u *VectorStoreSearchParamsFilterUnion) UnmarshalJSON(data []byte) error
type VectorStoreSearchParamsQueryUnion ¶
type VectorStoreSearchParamsQueryUnion struct { OfString param.Opt[string] `json:",omitzero,inline"` OfStringArray []string `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (VectorStoreSearchParamsQueryUnion) MarshalJSON ¶
func (u VectorStoreSearchParamsQueryUnion) MarshalJSON() ([]byte, error)
func (*VectorStoreSearchParamsQueryUnion) UnmarshalJSON ¶
func (u *VectorStoreSearchParamsQueryUnion) UnmarshalJSON(data []byte) error
type VectorStoreSearchParamsRankingOptions ¶
type VectorStoreSearchParamsRankingOptions struct { // (Optional) Name of the ranking algorithm to use Ranker param.Opt[string] `json:"ranker,omitzero"` // (Optional) Minimum relevance score threshold for results ScoreThreshold param.Opt[float64] `json:"score_threshold,omitzero"` // contains filtered or unexported fields }
Ranking options for fine-tuning the search results.
func (VectorStoreSearchParamsRankingOptions) MarshalJSON ¶
func (r VectorStoreSearchParamsRankingOptions) MarshalJSON() (data []byte, err error)
func (*VectorStoreSearchParamsRankingOptions) UnmarshalJSON ¶
func (r *VectorStoreSearchParamsRankingOptions) UnmarshalJSON(data []byte) error
type VectorStoreSearchResponse ¶
type VectorStoreSearchResponse struct { // List of search result objects Data []VectorStoreSearchResponseData `json:"data,required"` // Whether there are more results available beyond this page HasMore bool `json:"has_more,required"` // Object type identifier for the search results page Object string `json:"object,required"` // The original search query that was executed SearchQuery string `json:"search_query,required"` // (Optional) Token for retrieving the next page of results NextPage string `json:"next_page"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field HasMore respjson.Field Object respjson.Field SearchQuery respjson.Field NextPage respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Paginated response from searching a vector store.
func (VectorStoreSearchResponse) RawJSON ¶
func (r VectorStoreSearchResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreSearchResponse) UnmarshalJSON ¶
func (r *VectorStoreSearchResponse) UnmarshalJSON(data []byte) error
type VectorStoreSearchResponseData ¶
type VectorStoreSearchResponseData struct { // List of content items matching the search query Content []VectorStoreSearchResponseDataContent `json:"content,required"` // Unique identifier of the file containing the result FileID string `json:"file_id,required"` // Name of the file containing the result Filename string `json:"filename,required"` // Relevance score for this search result Score float64 `json:"score,required"` // (Optional) Key-value attributes associated with the file Attributes map[string]VectorStoreSearchResponseDataAttributeUnion `json:"attributes"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Content respjson.Field FileID respjson.Field Filename respjson.Field Score respjson.Field Attributes respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Response from searching a vector store.
func (VectorStoreSearchResponseData) RawJSON ¶
func (r VectorStoreSearchResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreSearchResponseData) UnmarshalJSON ¶
func (r *VectorStoreSearchResponseData) UnmarshalJSON(data []byte) error
type VectorStoreSearchResponseDataAttributeUnion ¶
type VectorStoreSearchResponseDataAttributeUnion struct { // This field will be present if the value is a [string] instead of an object. OfString string `json:",inline"` // This field will be present if the value is a [float64] instead of an object. OfFloat float64 `json:",inline"` // This field will be present if the value is a [bool] instead of an object. OfBool bool `json:",inline"` JSON struct { OfString respjson.Field OfFloat respjson.Field OfBool respjson.Field // contains filtered or unexported fields } `json:"-"` }
VectorStoreSearchResponseDataAttributeUnion contains all possible properties and values from [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool]
func (VectorStoreSearchResponseDataAttributeUnion) AsBool ¶
func (u VectorStoreSearchResponseDataAttributeUnion) AsBool() (v bool)
func (VectorStoreSearchResponseDataAttributeUnion) AsFloat ¶
func (u VectorStoreSearchResponseDataAttributeUnion) AsFloat() (v float64)
func (VectorStoreSearchResponseDataAttributeUnion) AsString ¶
func (u VectorStoreSearchResponseDataAttributeUnion) AsString() (v string)
func (VectorStoreSearchResponseDataAttributeUnion) RawJSON ¶
func (u VectorStoreSearchResponseDataAttributeUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreSearchResponseDataAttributeUnion) UnmarshalJSON ¶
func (r *VectorStoreSearchResponseDataAttributeUnion) UnmarshalJSON(data []byte) error
type VectorStoreSearchResponseDataContent ¶
type VectorStoreSearchResponseDataContent struct { // The actual text content Text string `json:"text,required"` // Content type, currently only "text" is supported Type constant.Text `json:"type,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Text respjson.Field Type respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Content item from a vector store file or search result.
func (VectorStoreSearchResponseDataContent) RawJSON ¶
func (r VectorStoreSearchResponseDataContent) RawJSON() string
Returns the unmodified JSON received from the API
func (*VectorStoreSearchResponseDataContent) UnmarshalJSON ¶
func (r *VectorStoreSearchResponseDataContent) UnmarshalJSON(data []byte) error
type VectorStoreService ¶
type VectorStoreService struct { Options []option.RequestOption Files VectorStoreFileService }
VectorStoreService contains methods and other services that help with interacting with the llama-stack-client 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 NewVectorStoreService method instead.
func NewVectorStoreService ¶
func NewVectorStoreService(opts ...option.RequestOption) (r VectorStoreService)
NewVectorStoreService 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 (*VectorStoreService) Delete ¶
func (r *VectorStoreService) Delete(ctx context.Context, vectorStoreID string, opts ...option.RequestOption) (res *VectorStoreDeleteResponse, err error)
Delete a vector store.
func (*VectorStoreService) Get ¶
func (r *VectorStoreService) Get(ctx context.Context, vectorStoreID string, opts ...option.RequestOption) (res *VectorStore, err error)
Retrieves a vector store.
func (*VectorStoreService) List ¶
func (r *VectorStoreService) List(ctx context.Context, query VectorStoreListParams, opts ...option.RequestOption) (res *pagination.OpenAICursorPage[VectorStore], err error)
Returns a list of vector stores.
func (*VectorStoreService) ListAutoPaging ¶
func (r *VectorStoreService) ListAutoPaging(ctx context.Context, query VectorStoreListParams, opts ...option.RequestOption) *pagination.OpenAICursorPageAutoPager[VectorStore]
Returns a list of vector stores.
func (*VectorStoreService) New ¶
func (r *VectorStoreService) New(ctx context.Context, body VectorStoreNewParams, opts ...option.RequestOption) (res *VectorStore, err error)
Creates a vector store.
func (*VectorStoreService) Search ¶
func (r *VectorStoreService) Search(ctx context.Context, vectorStoreID string, body VectorStoreSearchParams, opts ...option.RequestOption) (res *VectorStoreSearchResponse, err error)
Search for chunks in a vector store. Searches a vector store for relevant chunks based on a query and optional file attribute filters.
func (*VectorStoreService) Update ¶
func (r *VectorStoreService) Update(ctx context.Context, vectorStoreID string, body VectorStoreUpdateParams, opts ...option.RequestOption) (res *VectorStore, err error)
Updates a vector store.
type VectorStoreUpdateParams ¶
type VectorStoreUpdateParams struct { // The name of the vector store. Name param.Opt[string] `json:"name,omitzero"` // The expiration policy for a vector store. ExpiresAfter map[string]VectorStoreUpdateParamsExpiresAfterUnion `json:"expires_after,omitzero"` // Set of 16 key-value pairs that can be attached to an object. Metadata map[string]VectorStoreUpdateParamsMetadataUnion `json:"metadata,omitzero"` // contains filtered or unexported fields }
func (VectorStoreUpdateParams) MarshalJSON ¶
func (r VectorStoreUpdateParams) MarshalJSON() (data []byte, err error)
func (*VectorStoreUpdateParams) UnmarshalJSON ¶
func (r *VectorStoreUpdateParams) UnmarshalJSON(data []byte) error
type VectorStoreUpdateParamsExpiresAfterUnion ¶
type VectorStoreUpdateParamsExpiresAfterUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (VectorStoreUpdateParamsExpiresAfterUnion) MarshalJSON ¶
func (u VectorStoreUpdateParamsExpiresAfterUnion) MarshalJSON() ([]byte, error)
func (*VectorStoreUpdateParamsExpiresAfterUnion) UnmarshalJSON ¶
func (u *VectorStoreUpdateParamsExpiresAfterUnion) UnmarshalJSON(data []byte) error
type VectorStoreUpdateParamsMetadataUnion ¶
type VectorStoreUpdateParamsMetadataUnion struct { OfBool param.Opt[bool] `json:",omitzero,inline"` OfFloat param.Opt[float64] `json:",omitzero,inline"` OfString param.Opt[string] `json:",omitzero,inline"` OfAnyArray []any `json:",omitzero,inline"` // contains filtered or unexported fields }
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (VectorStoreUpdateParamsMetadataUnion) MarshalJSON ¶
func (u VectorStoreUpdateParamsMetadataUnion) MarshalJSON() ([]byte, error)
func (*VectorStoreUpdateParamsMetadataUnion) UnmarshalJSON ¶
func (u *VectorStoreUpdateParamsMetadataUnion) UnmarshalJSON(data []byte) error
type VersionInfo ¶
type VersionInfo struct { // Version number of the service Version string `json:"version,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Version respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Version information for the service.
func (VersionInfo) RawJSON ¶
func (r VersionInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*VersionInfo) UnmarshalJSON ¶
func (r *VersionInfo) UnmarshalJSON(data []byte) error
Source Files
¶
- agent.go
- agentsession.go
- agentstep.go
- agentturn.go
- aliases.go
- benchmark.go
- chat.go
- chatcompletion.go
- client.go
- completion.go
- dataset.go
- embedding.go
- eval.go
- evaljob.go
- field.go
- file.go
- inference.go
- inspect.go
- model.go
- moderation.go
- posttraining.go
- posttrainingjob.go
- provider.go
- response.go
- responseinputitem.go
- route.go
- safety.go
- scoring.go
- scoringfunction.go
- shield.go
- syntheticdatageneration.go
- telemetry.go
- tool.go
- toolgroup.go
- toolruntime.go
- toolruntimeragtool.go
- vectordb.go
- vectorio.go
- vectorstore.go
- vectorstorefile.go
Directories
¶
Path | Synopsis |
---|---|
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
|
Package json implements encoding and decoding of JSON as defined in RFC 7159. |
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.21, and used by the Go 1.24 encoding/json package.
|
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.21, and used by the Go 1.24 encoding/json package. |
packages
|
|