llamastackclient

package module
v0.1.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 23 Imported by: 0

README

Llama Stack Client Go API Library

Go Reference

The Llama Stack Client Go library provides convenient access to the Llama Stack Client REST API from applications written in Go.

It is generated with Stainless.

Installation

import (
	"github.com/llamastack/llama-stack-client-go" // imported as llamastackclient
)

Or to pin the version:

go get -u 'github.com/llamastack/llama-stack-client-go@v0.1.0-alpha.1'

Requirements

This library requires Go 1.18+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/llamastack/llama-stack-client-go"
)

func main() {
	client := llamastackclient.NewClient()
	model, err := client.Models.Register(context.TODO(), llamastackclient.ModelRegisterParams{
		ModelID: "model_id",
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", model.Identifier)
}

Request fields

The llamastackclient library uses the omitzero semantics from the Go 1.24+ encoding/json release for request fields.

Required primitive fields (int64, string, etc.) feature the tag `json:"...,required"`. These fields are always serialized, even their zero values.

Optional primitive types are wrapped in a param.Opt[T]. These fields can be set with the provided constructors, llamastackclient.String(string), llamastackclient.Int(int64), etc.

Any param.Opt[T], map, slice, struct or string enum uses the tag `json:"...,omitzero"`. Its zero value is considered omitted.

The param.IsOmitted(any) function can confirm the presence of any omitzero field.

p := llamastackclient.ExampleParams{
	ID:   "id_xxx",                       // required property
	Name: llamastackclient.String("..."), // optional property

	Point: llamastackclient.Point{
		X: 0,                       // required field will serialize as 0
		Y: llamastackclient.Int(1), // optional field will serialize as 1
		// ... omitted non-required fields will not be serialized
	},

	Origin: llamastackclient.Origin{}, // the zero value of [Origin] is considered omitted
}

To send null instead of a param.Opt[T], use param.Null[T](). To send null instead of a struct T, use param.NullStruct[T]().

p.Name = param.Null[string]()       // 'null' instead of string
p.Point = param.NullStruct[Point]() // 'null' instead of struct

param.IsNull(p.Name)  // true
param.IsNull(p.Point) // true

Request structs contain a .SetExtraFields(map[string]any) method which can send non-conforming fields in the request body. Extra fields overwrite any struct fields with a matching key. For security reasons, only use SetExtraFields with trusted data.

To send a custom value instead of a struct, use param.Override[T](value).

// In cases where the API specifies a given type,
// but you want to send something else, use [SetExtraFields]:
p.SetExtraFields(map[string]any{
	"x": 0.01, // send "x" as a float instead of int
})

// Send a number instead of an object
custom := param.Override[llamastackclient.FooParams](12)
Request unions

Unions are represented as a struct with fields prefixed by "Of" for each of it's variants, only one field can be non-zero. The non-zero field will be serialized.

Sub-properties of the union can be accessed via methods on the union struct. These methods return a mutable pointer to the underlying data, if present.

// Only one field can be non-zero, use param.IsOmitted() to check if a field is set
type AnimalUnionParam struct {
	OfCat *Cat `json:",omitzero,inline`
	OfDog *Dog `json:",omitzero,inline`
}

animal := AnimalUnionParam{
	OfCat: &Cat{
		Name: "Whiskers",
		Owner: PersonParam{
			Address: AddressParam{Street: "3333 Coyote Hill Rd", Zip: 0},
		},
	},
}

// Mutating a field
if address := animal.GetOwner().GetAddress(); address != nil {
	address.ZipCode = 94304
}
Response objects

All fields in response structs are ordinary value types (not pointers or wrappers). Response structs also include a special JSON field containing metadata about each property.

type Animal struct {
	Name   string `json:"name,nullable"`
	Owners int    `json:"owners"`
	Age    int    `json:"age"`
	JSON   struct {
		Name        respjson.Field
		Owner       respjson.Field
		Age         respjson.Field
		ExtraFields map[string]respjson.Field
	} `json:"-"`
}

To handle optional data, use the .Valid() method on the JSON field. .Valid() returns true if a field is not null, not present, or couldn't be marshaled.

If .Valid() is false, the corresponding field will simply be its zero value.

raw := `{"owners": 1, "name": null}`

var res Animal
json.Unmarshal([]byte(raw), &res)

// Accessing regular fields

res.Owners // 1
res.Name   // ""
res.Age    // 0

// Optional field checks

res.JSON.Owners.Valid() // true
res.JSON.Name.Valid()   // false
res.JSON.Age.Valid()    // false

// Raw JSON values

res.JSON.Owners.Raw()                  // "1"
res.JSON.Name.Raw() == "null"          // true
res.JSON.Name.Raw() == respjson.Null   // true
res.JSON.Age.Raw() == ""               // true
res.JSON.Age.Raw() == respjson.Omitted // true

These .JSON structs also include an ExtraFields map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
Response Unions

In responses, unions are represented by a flattened struct containing all possible fields from each of the object variants. To convert it to a variant use the .AsFooVariant() method or the .AsAny() method if present.

If a response value union contains primitive values, primitive fields will be alongside the properties but prefixed with Of and feature the tag json:"...,inline".

type AnimalUnion struct {
	// From variants [Dog], [Cat]
	Owner Person `json:"owner"`
	// From variant [Dog]
	DogBreed string `json:"dog_breed"`
	// From variant [Cat]
	CatBreed string `json:"cat_breed"`
	// ...

	JSON struct {
		Owner respjson.Field
		// ...
	} `json:"-"`
}

// If animal variant
if animal.Owner.Address.ZipCode == "" {
	panic("missing zip code")
}

// Switch on the variant
switch variant := animal.AsAny().(type) {
case Dog:
case Cat:
default:
	panic("unexpected type")
}
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := llamastackclient.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Inference.ChatCompletion(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

The request option option.WithDebugLog(nil) may be helpful while debugging.

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

Errors

When the API returns a non-success status code, we return an error with type *llamastackclient.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Inference.ChatCompletion(context.TODO(), llamastackclient.InferenceChatCompletionParams{
	Messages: []shared.MessageUnionParam{{
		OfUser: &shared.UserMessageParam{
			Content: shared.InterleavedContentUnionParam{
				OfString: llamastackclient.String("string"),
			},
		},
	}},
	ModelID: "model_id",
})
if err != nil {
	var apierr *llamastackclient.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/v1/inference/chat-completion": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Inference.ChatCompletion(
	ctx,
	llamastackclient.InferenceChatCompletionParams{
		Messages: []shared.MessageUnionParam{{
			OfUser: &shared.UserMessageParam{
				Content: shared.InterleavedContentUnionParam{
					OfString: llamastackclient.String("string"),
				},
			},
		}},
		ModelID: "model_id",
	},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as io.Reader. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper llamastackclient.NewFile(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

// A file from the file system
file, err := os.Open("/path/to/file")
llamastackclient.FileNewParams{
	File:    file,
	Purpose: llamastackclient.FileNewParamsPurposeAssistants,
}

// A file from a string
llamastackclient.FileNewParams{
	File:    strings.NewReader("my file contents"),
	Purpose: llamastackclient.FileNewParamsPurposeAssistants,
}

// With a custom filename and contentType
llamastackclient.FileNewParams{
	File:    llamastackclient.NewFile(strings.NewReader(`{"hello": "foo"}`), "file.go", "application/json"),
	Purpose: llamastackclient.FileNewParamsPurposeAssistants,
}
Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := llamastackclient.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Inference.ChatCompletion(
	context.TODO(),
	llamastackclient.InferenceChatCompletionParams{
		Messages: []shared.MessageUnionParam{{
			OfUser: &shared.UserMessageParam{
				Content: shared.InterleavedContentUnionParam{
					OfString: llamastackclient.String("string"),
				},
			},
		}},
		ModelID: "model_id",
	},
	option.WithMaxRetries(5),
)
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
chatCompletionResponse, err := client.Inference.ChatCompletion(
	context.TODO(),
	llamastackclient.InferenceChatCompletionParams{
		Messages: []shared.MessageUnionParam{{
			OfUser: &shared.UserMessageParam{
				Content: shared.InterleavedContentUnionParam{
					OfString: llamastackclient.String("string"),
				},
			},
		}},
		ModelID: "model_id",
	},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", chatCompletionResponse)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]any

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   "id_xxxx",
    Data: FooNewParamsData{
        FirstName: llamastackclient.String("John"),
    },
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := llamastackclient.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

View Source
const AgentConfigToolChoiceAuto = shared.AgentConfigToolChoiceAuto

Equals "auto"

View Source
const AgentConfigToolChoiceNone = shared.AgentConfigToolChoiceNone

Equals "none"

View Source
const AgentConfigToolChoiceRequired = shared.AgentConfigToolChoiceRequired

Equals "required"

View Source
const AgentConfigToolPromptFormatFunctionTag = shared.AgentConfigToolPromptFormatFunctionTag

Equals "function_tag"

View Source
const AgentConfigToolPromptFormatJson = shared.AgentConfigToolPromptFormatJson

Equals "json"

View Source
const AgentConfigToolPromptFormatPythonList = shared.AgentConfigToolPromptFormatPythonList

Equals "python_list"

View Source
const CompletionMessageStopReasonEndOfMessage = shared.CompletionMessageStopReasonEndOfMessage

Equals "end_of_message"

View Source
const CompletionMessageStopReasonEndOfTurn = shared.CompletionMessageStopReasonEndOfTurn

Equals "end_of_turn"

View Source
const CompletionMessageStopReasonOutOfTokens = shared.CompletionMessageStopReasonOutOfTokens

Equals "out_of_tokens"

View Source
const QueryConfigModeHybrid = shared.QueryConfigModeHybrid

Equals "hybrid"

View Source
const QueryConfigModeKeyword = shared.QueryConfigModeKeyword

Equals "keyword"

View Source
const QueryConfigModeVector = shared.QueryConfigModeVector

Equals "vector"

View Source
const ReturnTypeTypeAgentTurnInput = shared.ReturnTypeTypeAgentTurnInput

Equals "agent_turn_input"

View Source
const ReturnTypeTypeArray = shared.ReturnTypeTypeArray

Equals "array"

View Source
const ReturnTypeTypeBoolean = shared.ReturnTypeTypeBoolean

Equals "boolean"

View Source
const ReturnTypeTypeChatCompletionInput = shared.ReturnTypeTypeChatCompletionInput

Equals "chat_completion_input"

View Source
const ReturnTypeTypeCompletionInput = shared.ReturnTypeTypeCompletionInput

Equals "completion_input"

View Source
const ReturnTypeTypeJson = shared.ReturnTypeTypeJson

Equals "json"

View Source
const ReturnTypeTypeNumber = shared.ReturnTypeTypeNumber

Equals "number"

View Source
const ReturnTypeTypeObject = shared.ReturnTypeTypeObject

Equals "object"

View Source
const ReturnTypeTypeString = shared.ReturnTypeTypeString

Equals "string"

View Source
const ReturnTypeTypeUnion = shared.ReturnTypeTypeUnion

Equals "union"

View Source
const SafetyViolationViolationLevelError = shared.SafetyViolationViolationLevelError

Equals "error"

View Source
const SafetyViolationViolationLevelInfo = shared.SafetyViolationViolationLevelInfo

Equals "info"

View Source
const SafetyViolationViolationLevelWarn = shared.SafetyViolationViolationLevelWarn

Equals "warn"

View Source
const SharedCompletionResponseStopReasonEndOfMessage = shared.SharedCompletionResponseStopReasonEndOfMessage

Equals "end_of_message"

View Source
const SharedCompletionResponseStopReasonEndOfTurn = shared.SharedCompletionResponseStopReasonEndOfTurn

Equals "end_of_turn"

View Source
const SharedCompletionResponseStopReasonOutOfTokens = shared.SharedCompletionResponseStopReasonOutOfTokens

Equals "out_of_tokens"

View Source
const ToolCallToolNameBraveSearch = shared.ToolCallToolNameBraveSearch

Equals "brave_search"

View Source
const ToolCallToolNameCodeInterpreter = shared.ToolCallToolNameCodeInterpreter

Equals "code_interpreter"

View Source
const ToolCallToolNamePhotogen = shared.ToolCallToolNamePhotogen

Equals "photogen"

View Source
const ToolCallToolNameWolframAlpha = shared.ToolCallToolNameWolframAlpha

Equals "wolfram_alpha"

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) param.Opt[bool]

func BoolPtr

func BoolPtr(v bool) *bool

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 Float

func Float(f float64) param.Opt[float64]

func FloatPtr

func FloatPtr(v float64) *float64

func Int

func Int(i int64) param.Opt[int64]

func IntPtr

func IntPtr(v int64) *int64

func NewFile

func NewFile(rdr io.Reader, filename string, contentType string) file

func Opt

func Opt[T comparable](v T) param.Opt[T]

func Ptr

func Ptr[T any](v T) *T

func String

func String(s string) param.Opt[string]

func StringPtr

func StringPtr(v string) *string

func Time

func Time(t time.Time) param.Opt[time.Time]

func TimePtr

func TimePtr(v time.Time) *time.Time

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 (AgentSessionListResponseDataUnion) AsString

func (u AgentSessionListResponseDataUnion) AsString() (v string)

func (AgentSessionListResponseDataUnion) RawJSON

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

List all session(s) of a given agent.

func (*AgentSessionService) New

Create a new session for an agent.

type AgentStepGetParams

type AgentStepGetParams struct {
	AgentID   string `path:"agent_id,required" json:"-"`
	SessionID string `path:"session_id,required" json:"-"`
	TurnID    string `path:"turn_id,required" json:"-"`
	// contains filtered or unexported fields
}

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

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

Retrieve an agent step by its ID.

type AgentTurnGetParams

type AgentTurnGetParams struct {
	AgentID   string `path:"agent_id,required" json:"-"`
	SessionID string `path:"session_id,required" json:"-"`
	// contains filtered or unexported fields
}

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

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 (*AgentTurnNewParamsDocumentContentImageContentItemImage) UnmarshalJSON

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 (*AgentTurnNewParamsDocumentContentImageContentItemImageURL) UnmarshalJSON

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

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

Returns a pointer to the underlying variant's property, if present.

func (AgentTurnNewParamsDocumentContentUnion) GetText

Returns a pointer to the underlying variant's property, if present.

func (AgentTurnNewParamsDocumentContentUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (AgentTurnNewParamsDocumentContentUnion) GetUri

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

Returns a pointer to the underlying variant's Content property, if present.

func (AgentTurnNewParamsMessageUnion) GetContext

Returns a pointer to the underlying variant's property, if present.

func (AgentTurnNewParamsMessageUnion) GetRole

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

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 (*AgentTurnNewParamsToolgroupAgentToolGroupWithArgsArgUnion) UnmarshalJSON

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

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

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) RawJSON

func (r Benchmark) RawJSON() string

Returns the unmodified JSON received from the API

func (*Benchmark) UnmarshalJSON

func (r *Benchmark) UnmarshalJSON(data []byte) error

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

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionChunkChoiceDeltaToolCallFunction) UnmarshalJSON

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

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionChunkChoiceLogprobsContentTopLogprob) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionChunkChoiceLogprobsRefusalTopLogprob) UnmarshalJSON

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

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceLogprobsContent) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceLogprobsContentTopLogprob) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceLogprobsRefusal) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceLogprobsRefusalTopLogprob) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageAssistant) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageAssistantContentArrayItem) UnmarshalJSON

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 (ChatCompletionGetResponseChoiceMessageAssistantContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageAssistantContentUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageAssistantToolCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageAssistantToolCallFunction) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageDeveloper) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageDeveloperContentArrayItem) UnmarshalJSON

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 (ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageDeveloperContentUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageSystemContentArrayItem) UnmarshalJSON

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 (ChatCompletionGetResponseChoiceMessageSystemContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageSystemContentUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageToolContentArrayItem) UnmarshalJSON

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 (ChatCompletionGetResponseChoiceMessageToolContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageToolContentUnion) UnmarshalJSON

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 (ChatCompletionGetResponseChoiceMessageUnion) AsDeveloper

func (ChatCompletionGetResponseChoiceMessageUnion) AsSystem

func (ChatCompletionGetResponseChoiceMessageUnion) AsTool

func (ChatCompletionGetResponseChoiceMessageUnion) AsUser

func (ChatCompletionGetResponseChoiceMessageUnion) RawJSON

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

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageUserContentArrayItemFile) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageUserContentArrayItemFileFile) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURL) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageUserContentArrayItemText) UnmarshalJSON

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) AsFile

func (ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) AsImageURL

func (ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) AsText

func (ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageUserContentArrayItemUnion) UnmarshalJSON

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 (ChatCompletionGetResponseChoiceMessageUserContentUnion) AsString

func (ChatCompletionGetResponseChoiceMessageUserContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseChoiceMessageUserContentUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageAssistant) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageAssistantContentArrayItem) UnmarshalJSON

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 (ChatCompletionGetResponseInputMessageAssistantContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageAssistantContentUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageAssistantToolCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageAssistantToolCallFunction) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageDeveloper) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageDeveloperContentArrayItem) UnmarshalJSON

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 (ChatCompletionGetResponseInputMessageDeveloperContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageDeveloperContentUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageSystemContentArrayItem) UnmarshalJSON

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 (ChatCompletionGetResponseInputMessageSystemContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageSystemContentUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageToolContentArrayItem) UnmarshalJSON

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 (ChatCompletionGetResponseInputMessageToolContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageToolContentUnion) UnmarshalJSON

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 (ChatCompletionGetResponseInputMessageUnion) AsDeveloper

func (ChatCompletionGetResponseInputMessageUnion) AsSystem

func (ChatCompletionGetResponseInputMessageUnion) AsTool

func (ChatCompletionGetResponseInputMessageUnion) AsUser

func (ChatCompletionGetResponseInputMessageUnion) RawJSON

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

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageUserContentArrayItemFile) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageUserContentArrayItemFileFile) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageUserContentArrayItemImageURL) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageUserContentArrayItemText) UnmarshalJSON

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) AsFile

func (ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) AsImageURL

func (ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) AsText

func (ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageUserContentArrayItemUnion) UnmarshalJSON

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 (ChatCompletionGetResponseInputMessageUserContentUnion) AsString

func (ChatCompletionGetResponseInputMessageUserContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseInputMessageUserContentUnion) UnmarshalJSON

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

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceLogprobsContent) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceLogprobsContentTopLogprob) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceLogprobsRefusal) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceLogprobsRefusalTopLogprob) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageAssistant) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageAssistantContentArrayItem) UnmarshalJSON

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 (ChatCompletionListResponseChoiceMessageAssistantContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageAssistantContentUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageAssistantToolCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageAssistantToolCallFunction) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageDeveloper) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageDeveloperContentArrayItem) UnmarshalJSON

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 (ChatCompletionListResponseChoiceMessageDeveloperContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageDeveloperContentUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageSystemContentArrayItem) UnmarshalJSON

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 (ChatCompletionListResponseChoiceMessageSystemContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageSystemContentUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageToolContentArrayItem) UnmarshalJSON

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 (ChatCompletionListResponseChoiceMessageToolContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageToolContentUnion) UnmarshalJSON

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 (ChatCompletionListResponseChoiceMessageUnion) AsDeveloper

func (ChatCompletionListResponseChoiceMessageUnion) AsSystem

func (ChatCompletionListResponseChoiceMessageUnion) AsTool

func (ChatCompletionListResponseChoiceMessageUnion) AsUser

func (ChatCompletionListResponseChoiceMessageUnion) RawJSON

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

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageUserContentArrayItemFile) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageUserContentArrayItemFileFile) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURL) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageUserContentArrayItemText) UnmarshalJSON

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) AsFile

func (ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) AsImageURL

func (ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) AsText

func (ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageUserContentArrayItemUnion) UnmarshalJSON

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 (ChatCompletionListResponseChoiceMessageUserContentUnion) AsString

func (ChatCompletionListResponseChoiceMessageUserContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseChoiceMessageUserContentUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageAssistant) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageAssistantContentArrayItem) UnmarshalJSON

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 (ChatCompletionListResponseInputMessageAssistantContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageAssistantContentUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageAssistantToolCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageAssistantToolCallFunction) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageDeveloper) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageDeveloperContentArrayItem) UnmarshalJSON

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 (ChatCompletionListResponseInputMessageDeveloperContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageDeveloperContentUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageSystemContentArrayItem) UnmarshalJSON

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 (ChatCompletionListResponseInputMessageSystemContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageSystemContentUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageToolContentArrayItem) UnmarshalJSON

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 (ChatCompletionListResponseInputMessageToolContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageToolContentUnion) UnmarshalJSON

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 (ChatCompletionListResponseInputMessageUnion) AsDeveloper

func (ChatCompletionListResponseInputMessageUnion) AsSystem

func (ChatCompletionListResponseInputMessageUnion) AsTool

func (ChatCompletionListResponseInputMessageUnion) AsUser

func (ChatCompletionListResponseInputMessageUnion) RawJSON

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

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageUserContentArrayItemFile) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageUserContentArrayItemFileFile) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageUserContentArrayItemImageURL) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageUserContentArrayItemText) UnmarshalJSON

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) AsFile

func (ChatCompletionListResponseInputMessageUserContentArrayItemUnion) AsImageURL

func (ChatCompletionListResponseInputMessageUserContentArrayItemUnion) AsText

func (ChatCompletionListResponseInputMessageUserContentArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageUserContentArrayItemUnion) UnmarshalJSON

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 (ChatCompletionListResponseInputMessageUserContentUnion) AsString

func (ChatCompletionListResponseInputMessageUserContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseInputMessageUserContentUnion) UnmarshalJSON

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 (*ChatCompletionNewParamsFunctionCallMapItemUnion) UnmarshalJSON

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 (*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 (*ChatCompletionNewParamsMessageAssistantContentArrayItem) UnmarshalJSON

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 (*ChatCompletionNewParamsMessageAssistantContentUnion) UnmarshalJSON

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

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 (*ChatCompletionNewParamsMessageAssistantToolCallFunction) UnmarshalJSON

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 (*ChatCompletionNewParamsMessageDeveloperContentArrayItem) UnmarshalJSON

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 (*ChatCompletionNewParamsMessageDeveloperContentUnion) UnmarshalJSON

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

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 (*ChatCompletionNewParamsMessageSystemContentUnion) UnmarshalJSON

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

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 (*ChatCompletionNewParamsMessageToolContentUnion) UnmarshalJSON

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

Returns a pointer to the underlying variant's property, if present.

func (ChatCompletionNewParamsMessageUnion) GetRole

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

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 (*ChatCompletionNewParamsMessageUserContentArrayItemFile) UnmarshalJSON

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 (*ChatCompletionNewParamsMessageUserContentArrayItemFileFile) UnmarshalJSON

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 (*ChatCompletionNewParamsMessageUserContentArrayItemImageURL) UnmarshalJSON

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 (*ChatCompletionNewParamsMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON

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 (*ChatCompletionNewParamsMessageUserContentArrayItemText) UnmarshalJSON

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

Returns a pointer to the underlying variant's property, if present.

func (ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetImageURL

Returns a pointer to the underlying variant's property, if present.

func (ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetText

Returns a pointer to the underlying variant's property, if present.

func (ChatCompletionNewParamsMessageUserContentArrayItemUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ChatCompletionNewParamsMessageUserContentArrayItemUnion) MarshalJSON

func (*ChatCompletionNewParamsMessageUserContentArrayItemUnion) UnmarshalJSON

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 (*ChatCompletionNewParamsMessageUserContentUnion) UnmarshalJSON

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

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

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 (*ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchema) UnmarshalJSON

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 (*ChatCompletionNewParamsResponseFormatJsonSchemaJsonSchemaSchemaUnion) UnmarshalJSON

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

Returns a pointer to the underlying variant's property, if present.

func (ChatCompletionNewParamsResponseFormatUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ChatCompletionNewParamsResponseFormatUnion) MarshalJSON

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 (*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 (*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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoice) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobs) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContent) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsContentTopLogprob) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusal) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceLogprobsRefusalTopLogprob) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistant) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentArrayItem) UnmarshalJSON

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 (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) AsString

func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantContentUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageAssistantToolCallFunction) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloper) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentArrayItem) UnmarshalJSON

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 (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) AsString

func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageDeveloperContentUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystem) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentArrayItem) UnmarshalJSON

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 (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) AsString

func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageSystemContentUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageTool) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentArrayItem) UnmarshalJSON

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 (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) AsString

func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageToolContentUnion) UnmarshalJSON

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) AsSystem

func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) AsTool

func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) AsUser

func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUser) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFile) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemFileFile) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURL) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemText) UnmarshalJSON

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) AsFile

func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) AsImageURL

func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) AsText

func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentArrayItemUnion) UnmarshalJSON

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 (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) AsString

func (ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionChoiceMessageUserContentUnion) UnmarshalJSON

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 (ChatCompletionNewResponseUnion) AsOpenAIChatCompletionChunk

func (u ChatCompletionNewResponseUnion) AsOpenAIChatCompletionChunk() (v ChatCompletionChunk)

func (ChatCompletionNewResponseUnion) RawJSON

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

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

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

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

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

List all chat completions.

func (*ChatCompletionService) ListAutoPaging

List all chat completions.

func (*ChatCompletionService) New

Generate an OpenAI-compatible chat completion for the given messages using the specified model.

func (*ChatCompletionService) NewStreaming

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.

func (*Client) Post

func (r *Client) Post(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Put makes a PUT 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

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

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

Returns the unmodified JSON received from the API

func (*CompletionNewResponseChoiceLogprobsContentTopLogprob) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*CompletionNewResponseChoiceLogprobsRefusalTopLogprob) UnmarshalJSON

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

Generate an OpenAI-compatible completion for the given prompt using the specified model.

func (*CompletionService) NewStreaming

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

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 (CreateEmbeddingsResponseDataEmbeddingUnion) RawJSON

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

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 (CreateResponseResultMetadataUnion) AsString

func (u CreateResponseResultMetadataUnion) AsString() (v string)

func (CreateResponseResultMetadataUnion) RawJSON

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

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

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 (DatasetGetResponseSourceRowsRowUnion) AsFloat

func (DatasetGetResponseSourceRowsRowUnion) AsString

func (DatasetGetResponseSourceRowsRowUnion) RawJSON

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 (DatasetGetResponseSourceUnion) AsUri

func (DatasetGetResponseSourceUnion) RawJSON

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

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

Returns a pointer to the underlying variant's property, if present.

func (DatasetRegisterParamsSourceUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (DatasetRegisterParamsSourceUnion) GetUri

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 (DatasetRegisterResponseMetadataUnion) AsFloat

func (DatasetRegisterResponseMetadataUnion) AsString

func (DatasetRegisterResponseMetadataUnion) RawJSON

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

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 (DatasetRegisterResponseSourceRowsRowUnion) AsFloat

func (DatasetRegisterResponseSourceRowsRowUnion) AsString

func (DatasetRegisterResponseSourceRowsRowUnion) RawJSON

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 (DatasetRegisterResponseSourceUnion) AsUri

func (DatasetRegisterResponseSourceUnion) RawJSON

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

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

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

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 Error

type Error = apierror.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

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 (*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

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

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

Returns a pointer to the underlying variant's property, if present.

func (EventStructuredLogPayloadUnionParam) GetType

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

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) RawJSON

func (r File) RawJSON() string

Returns the unmodified JSON received from the API

func (*File) UnmarshalJSON

func (r *File) UnmarshalJSON(data []byte) error

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

Returns a list of files that belong to the user's organization.

func (*FileService) ListAutoPaging

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

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

Generate chat completions for a batch of messages using the specified model.

func (*InferenceService) BatchCompletion

Generate completions for a batch of content using the specified model.

func (*InferenceService) ChatCompletion deprecated

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

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

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

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

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) RawJSON

func (r Job) RawJSON() string

Returns the unmodified JSON received from the API

func (*Job) UnmarshalJSON

func (r *Job) UnmarshalJSON(data []byte) error

type JobStatus

type JobStatus string

Current execution status of the job

const (
	JobStatusCompleted  JobStatus = "completed"
	JobStatusInProgress JobStatus = "in_progress"
	JobStatusFailed     JobStatus = "failed"
	JobStatusScheduled  JobStatus = "scheduled"
	JobStatusCancelled  JobStatus = "cancelled"
)

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 (ListDatasetsResponseDataMetadataUnion) AsFloat

func (ListDatasetsResponseDataMetadataUnion) AsString

func (ListDatasetsResponseDataMetadataUnion) RawJSON

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

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 (ListDatasetsResponseDataSourceRowsRowUnion) AsFloat

func (ListDatasetsResponseDataSourceRowsRowUnion) AsString

func (ListDatasetsResponseDataSourceRowsRowUnion) RawJSON

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 (ListDatasetsResponseDataSourceUnion) AsUri

func (ListDatasetsResponseDataSourceUnion) RawJSON

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

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

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

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

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) RawJSON

func (r Model) RawJSON() string

Returns the unmodified JSON received from the API

func (*Model) UnmarshalJSON

func (r *Model) UnmarshalJSON(data []byte) error

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

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

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

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

Returns the unmodified JSON received from the API

func (*PostTrainingJobArtifactsResponseCheckpointTrainingMetrics) UnmarshalJSON

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

Get the artifacts of a training job.

func (*PostTrainingJobService) Cancel

Cancel a training job.

func (*PostTrainingJobService) List

Get all training jobs.

func (*PostTrainingJobService) Status

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

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

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

Returns the unmodified JSON received from the API

func (*PostTrainingJobStatusResponseCheckpointTrainingMetrics) UnmarshalJSON

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 (PostTrainingJobStatusResponseResourcesAllocatedUnion) AsBool

func (PostTrainingJobStatusResponseResourcesAllocatedUnion) AsFloat

func (PostTrainingJobStatusResponseResourcesAllocatedUnion) AsString

func (PostTrainingJobStatusResponseResourcesAllocatedUnion) RawJSON

Returns the unmodified JSON received from the API

func (*PostTrainingJobStatusResponseResourcesAllocatedUnion) UnmarshalJSON

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

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 (*PostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion) UnmarshalJSON

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 (*PostTrainingPreferenceOptimizeParamsLoggerConfigUnion) UnmarshalJSON

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

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 (*PostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig) UnmarshalJSON

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 (*PostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig) UnmarshalJSON

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 (*PostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig) UnmarshalJSON

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

Run preference optimization of a model.

func (*PostTrainingService) SupervisedFineTune

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 (*PostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion) UnmarshalJSON

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 (*PostTrainingSupervisedFineTuneParamsLoggerConfigUnion) UnmarshalJSON

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

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 (*PostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig) UnmarshalJSON

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 (*PostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig) UnmarshalJSON

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 (*PostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig) UnmarshalJSON

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

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 (QueryChunksResponseChunkMetadataUnion) AsFloat

func (QueryChunksResponseChunkMetadataUnion) AsString

func (QueryChunksResponseChunkMetadataUnion) RawJSON

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 (QuerySpansResponseDataAttributeUnion) AsFloat

func (QuerySpansResponseDataAttributeUnion) AsString

func (QuerySpansResponseDataAttributeUnion) RawJSON

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

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMessage) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItem) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationFilePath) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON

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) AsFilePath

func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemAnnotationUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputText) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) UnmarshalJSON

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 (ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) AsString

func (ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) AsVariant2

func (ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResult) UnmarshalJSON

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 (ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsBool

func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsFloat

func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsString

func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageWebSearchToolCall) UnmarshalJSON

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 (ResponseInputItemListResponseDataUnion) AsOpenAIResponseMessage

func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageFileSearchToolCall

func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageFunctionToolCall

func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageWebSearchToolCall

func (ResponseInputItemListResponseDataUnion) RawJSON

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

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMessage) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItem) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationFilePath) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON

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) AsFileCitation

func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsFilePath

func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) AsURLCitation

func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemAnnotationUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) UnmarshalJSON

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 (ResponseListResponseInputOpenAIResponseMessageContentUnion) AsString

func (ResponseListResponseInputOpenAIResponseMessageContentUnion) AsVariant2

func (ResponseListResponseInputOpenAIResponseMessageContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMessageContentUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResult) UnmarshalJSON

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 (ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsBool

func (ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsFloat

func (ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) AsString

func (ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseOutputMessageWebSearchToolCall) UnmarshalJSON

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 (ResponseListResponseInputUnion) AsOpenAIResponseMessage

func (ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageFileSearchToolCall

func (ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageFunctionToolCall

func (ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageWebSearchToolCall

func (ResponseListResponseInputUnion) RawJSON

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

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputFileSearchCallResult) UnmarshalJSON

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 (ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsBool

func (ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsFloat

func (ResponseListResponseOutputFileSearchCallResultAttributeUnion) AsString

func (ResponseListResponseOutputFileSearchCallResultAttributeUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputFileSearchCallResultAttributeUnion) UnmarshalJSON

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

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

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

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

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 (ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsBool

func (ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsFloat

func (ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) AsString

func (ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputMcpListToolsToolInputSchemaUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputMessageContentArrayItem) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputMessageContentArrayItemAnnotationFilePath) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON

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 (ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsFileCitation

func (ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsFilePath

func (ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) AsURLCitation

func (ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputMessageContentArrayItemAnnotationUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputMessageContentArrayItemInputImage) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputMessageContentArrayItemInputText) UnmarshalJSON

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 (ResponseListResponseOutputMessageContentArrayItemUnion) AsInputText

func (ResponseListResponseOutputMessageContentArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputMessageContentArrayItemUnion) UnmarshalJSON

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 (ResponseListResponseOutputMessageContentUnion) AsVariant2

func (ResponseListResponseOutputMessageContentUnion) RawJSON

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 (ResponseListResponseOutputUnion) AsFunctionCall

func (ResponseListResponseOutputUnion) AsMcpCall

func (ResponseListResponseOutputUnion) AsMcpListTools

func (ResponseListResponseOutputUnion) AsMessage

func (ResponseListResponseOutputUnion) AsWebSearchCall

func (ResponseListResponseOutputUnion) RawJSON

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

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

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 (ResponseListResponseTextFormatSchemaUnion) AsFloat

func (ResponseListResponseTextFormatSchemaUnion) AsString

func (ResponseListResponseTextFormatSchemaUnion) RawJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseInputFunctionToolCallOutput) UnmarshalJSON

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

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 (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItem) UnmarshalJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationFilePath) UnmarshalJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON

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

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetEndIndex

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetFileID

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetFilename

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetIndex

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetStartIndex

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetTitle

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) GetURL

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) MarshalJSON

func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemAnnotationUnion) UnmarshalJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputImage) UnmarshalJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputText) UnmarshalJSON

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

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetImageURL

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetText

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) MarshalJSON

func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) UnmarshalJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentUnion) UnmarshalJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCall) UnmarshalJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResult) UnmarshalJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCallResultAttributeUnion) UnmarshalJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFunctionToolCall) UnmarshalJSON

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 (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageWebSearchToolCall) UnmarshalJSON

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

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemUnion) GetContent

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemUnion) GetID

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemUnion) GetName

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemUnion) GetOutput

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemUnion) GetQueries

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemUnion) GetResults

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemUnion) GetRole

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemUnion) GetStatus

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsInputArrayItemUnion) GetType

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 (*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 (*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 (*ResponseNewParamsToolMcpAllowedToolsAllowedToolsFilter) UnmarshalJSON

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 (*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 (*ResponseNewParamsToolMcpRequireApprovalApprovalFilter) UnmarshalJSON

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 (*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 (*ResponseNewParamsToolOpenAIResponseInputToolWebSearch) UnmarshalJSON

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

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

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsToolUnion) GetHeaders

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

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsToolUnion) GetRankingOptions

Returns a pointer to the underlying variant's property, if present.

func (ResponseNewParamsToolUnion) GetRequireApproval

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

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

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 (ResponseObjectOutputFileSearchCallResultAttributeUnion) AsBool

func (ResponseObjectOutputFileSearchCallResultAttributeUnion) AsFloat

func (ResponseObjectOutputFileSearchCallResultAttributeUnion) AsString

func (ResponseObjectOutputFileSearchCallResultAttributeUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectOutputFileSearchCallResultAttributeUnion) UnmarshalJSON

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

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

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

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 (ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsBool

func (ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsFloat

func (ResponseObjectOutputMcpListToolsToolInputSchemaUnion) AsString

func (ResponseObjectOutputMcpListToolsToolInputSchemaUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectOutputMcpListToolsToolInputSchemaUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ResponseObjectOutputMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectOutputMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectOutputMessageContentArrayItemAnnotationFilePath) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectOutputMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON

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 (ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsFileCitation

func (ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsFilePath

func (ResponseObjectOutputMessageContentArrayItemAnnotationUnion) AsURLCitation

func (ResponseObjectOutputMessageContentArrayItemAnnotationUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectOutputMessageContentArrayItemAnnotationUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectOutputMessageContentArrayItemInputImage) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectOutputMessageContentArrayItemInputText) UnmarshalJSON

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 (ResponseObjectOutputMessageContentArrayItemUnion) AsInputText

func (ResponseObjectOutputMessageContentArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectOutputMessageContentArrayItemUnion) UnmarshalJSON

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 (ResponseObjectOutputMessageContentUnion) AsVariant2

func (ResponseObjectOutputMessageContentUnion) RawJSON

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 (ResponseObjectOutputUnion) AsFunctionCall

func (ResponseObjectOutputUnion) AsMcpCall

func (ResponseObjectOutputUnion) AsMcpListTools

func (ResponseObjectOutputUnion) AsMessage

func (ResponseObjectOutputUnion) AsWebSearchCall

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

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

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

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartAddedPartOutputText) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartAddedPartRefusal) UnmarshalJSON

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 (ResponseObjectStreamResponseContentPartAddedPartUnion) AsRefusal

func (ResponseObjectStreamResponseContentPartAddedPartUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartAddedPartUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartDonePartOutputText) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartDonePartRefusal) UnmarshalJSON

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 (ResponseObjectStreamResponseContentPartDonePartUnion) AsRefusal

func (ResponseObjectStreamResponseContentPartDonePartUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartDonePartUnion) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseFunctionCallArgumentsDelta) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseFunctionCallArgumentsDone) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseMcpCallArgumentsDelta) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseMcpCallArgumentsDone) UnmarshalJSON

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

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

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

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseMcpListToolsCompleted) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseMcpListToolsFailed) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseMcpListToolsInProgress) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemFileSearchCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResult) UnmarshalJSON

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 (ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsBool

func (ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsFloat

func (ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) AsString

func (ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemFileSearchCallResultAttributeUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemFunctionCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMcpCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMcpListTools) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsTool) UnmarshalJSON

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 (ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsBool

func (ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsFloat

func (ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) AsString

func (ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMcpListToolsToolInputSchemaUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMessage) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItem) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationFilePath) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON

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) AsFilePath

func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemAnnotationUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputText) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) UnmarshalJSON

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 (ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) AsString

func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) AsVariant2

func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion) UnmarshalJSON

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 (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsFunctionCall

func (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsMcpCall

func (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsMcpListTools

func (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsMessage

func (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsWebSearchCall

func (ResponseObjectStreamResponseOutputItemAddedItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemWebSearchCall) UnmarshalJSON

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

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemFileSearchCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResult) UnmarshalJSON

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 (ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsBool

func (ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsFloat

func (ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) AsString

func (ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemFileSearchCallResultAttributeUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemFunctionCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMcpCall) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMcpListTools) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsTool) UnmarshalJSON

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 (ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsBool

func (ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsFloat

func (ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) AsString

func (ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMcpListToolsToolInputSchemaUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMessage) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItem) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationContainerFileCitation) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFileCitation) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationFilePath) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationURLCitation) UnmarshalJSON

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) AsFilePath

func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) AsURLCitation

func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemAnnotationUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputText) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) UnmarshalJSON

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 (ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) AsString

func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) AsVariant2

func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion) UnmarshalJSON

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 (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsFunctionCall

func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMcpCall

func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMcpListTools

func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMessage

func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsWebSearchCall

func (ResponseObjectStreamResponseOutputItemDoneItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemUnion) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemWebSearchCall) UnmarshalJSON

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

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

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseWebSearchCallCompleted) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseWebSearchCallInProgress) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseWebSearchCallSearching) UnmarshalJSON

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 (ResponseObjectStreamUnion) AsResponseContentPartAdded

func (ResponseObjectStreamUnion) AsResponseContentPartDone

func (ResponseObjectStreamUnion) AsResponseCreated

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 (ResponseObjectStreamUnion) AsResponseMcpCallFailed

func (ResponseObjectStreamUnion) AsResponseMcpCallInProgress

func (ResponseObjectStreamUnion) AsResponseMcpListToolsCompleted

func (u ResponseObjectStreamUnion) AsResponseMcpListToolsCompleted() (v ResponseObjectStreamResponseMcpListToolsCompleted)

func (ResponseObjectStreamUnion) AsResponseMcpListToolsFailed

func (ResponseObjectStreamUnion) AsResponseMcpListToolsInProgress

func (u ResponseObjectStreamUnion) AsResponseMcpListToolsInProgress() (v ResponseObjectStreamResponseMcpListToolsInProgress)

func (ResponseObjectStreamUnion) AsResponseOutputItemAdded

func (ResponseObjectStreamUnion) AsResponseOutputItemDone

func (ResponseObjectStreamUnion) AsResponseOutputTextDelta

func (ResponseObjectStreamUnion) AsResponseOutputTextDone

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 (ResponseObjectTextFormatSchemaUnion) AsFloat

func (ResponseObjectTextFormatSchemaUnion) AsString

func (ResponseObjectTextFormatSchemaUnion) RawJSON

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

List all OpenAI responses.

func (*ResponseService) ListAutoPaging

List all OpenAI responses.

func (*ResponseService) New

Create a new OpenAI response.

func (*ResponseService) NewStreaming

Create a new OpenAI response.

type ReturnType

type ReturnType = shared.ReturnType

This is an alias to an internal type.

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) RawJSON

func (r RouteInfo) RawJSON() string

Returns the unmodified JSON received from the API

func (*RouteInfo) UnmarshalJSON

func (r *RouteInfo) UnmarshalJSON(data []byte) error

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) RawJSON

func (r ScoringFn) RawJSON() string

Returns the unmodified JSON received from the API

func (*ScoringFn) UnmarshalJSON

func (r *ScoringFn) UnmarshalJSON(data []byte) error

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

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

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 (ScoringFnParamsUnionResp) AsLlmAsJudge

func (ScoringFnParamsUnionResp) AsRegexParser

func (ScoringFnParamsUnionResp) RawJSON

func (u ScoringFnParamsUnionResp) RawJSON() string

Returns the unmodified JSON received from the API

func (ScoringFnParamsUnionResp) ToParam

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

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

Score a list of rows.

func (*ScoringService) ScoreBatch

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) RawJSON

func (r Session) RawJSON() string

Returns the unmodified JSON received from the API

func (*Session) UnmarshalJSON

func (r *Session) UnmarshalJSON(data []byte) error

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) RawJSON

func (r Shield) RawJSON() string

Returns the unmodified JSON received from the API

func (*Shield) UnmarshalJSON

func (r *Shield) UnmarshalJSON(data []byte) error

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

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

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 (SyntheticDataGenerationResponseStatisticUnion) AsBool

func (SyntheticDataGenerationResponseStatisticUnion) AsFloat

func (SyntheticDataGenerationResponseStatisticUnion) AsString

func (SyntheticDataGenerationResponseStatisticUnion) RawJSON

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 (SyntheticDataGenerationResponseSyntheticDataUnion) AsBool

func (SyntheticDataGenerationResponseSyntheticDataUnion) AsFloat

func (SyntheticDataGenerationResponseSyntheticDataUnion) AsString

func (SyntheticDataGenerationResponseSyntheticDataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*SyntheticDataGenerationResponseSyntheticDataUnion) UnmarshalJSON

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

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 (TelemetryGetSpanResponseAttributeUnion) AsFloat

func (TelemetryGetSpanResponseAttributeUnion) AsString

func (TelemetryGetSpanResponseAttributeUnion) RawJSON

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

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

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

Get a span by its ID.

func (*TelemetryService) GetSpanTree

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

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) RawJSON

func (r Tool) RawJSON() string

Returns the unmodified JSON received from the API

func (*Tool) UnmarshalJSON

func (r *Tool) UnmarshalJSON(data []byte) error

type ToolCall

type ToolCall = shared.ToolCall

This is an alias to an internal type.

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) RawJSON

func (r ToolGroup) RawJSON() string

Returns the unmodified JSON received from the API

func (*ToolGroup) UnmarshalJSON

func (r *ToolGroup) UnmarshalJSON(data []byte) error

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 (ToolInvocationResultMetadataUnion) AsString

func (u ToolInvocationResultMetadataUnion) AsString() (v string)

func (ToolInvocationResultMetadataUnion) RawJSON

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

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

Index documents so they can be used by the RAG system.

func (*ToolRuntimeRagToolService) Query

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

Run a tool with the given arguments.

func (*ToolRuntimeService) ListTools

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) RawJSON

func (r Trace) RawJSON() string

Returns the unmodified JSON received from the API

func (*Trace) UnmarshalJSON

func (r *Trace) UnmarshalJSON(data []byte) error

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) RawJSON

func (r Turn) RawJSON() string

Returns the unmodified JSON received from the API

func (*Turn) UnmarshalJSON

func (r *Turn) UnmarshalJSON(data []byte) error

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

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

Returns the unmodified JSON received from the API

func (*TurnOutputAttachmentContentImageContentItemImage) UnmarshalJSON

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

Returns the unmodified JSON received from the API

func (*TurnOutputAttachmentContentImageContentItemImageURL) UnmarshalJSON

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

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

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 (TurnOutputAttachmentContentUnion) AsInterleavedContentItemArray

func (u TurnOutputAttachmentContentUnion) AsInterleavedContentItemArray() (v []shared.InterleavedContentItemUnion)

func (TurnOutputAttachmentContentUnion) AsString

func (u TurnOutputAttachmentContentUnion) AsString() (v string)

func (TurnOutputAttachmentContentUnion) AsTextContentItem

func (TurnOutputAttachmentContentUnion) AsURL

func (TurnOutputAttachmentContentUnion) RawJSON

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

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 (TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsMemoryRetrieval

func (TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsShieldCall

func (TurnResponseEventPayloadStepCompleteStepDetailsUnion) AsToolExecution

func (TurnResponseEventPayloadStepCompleteStepDetailsUnion) RawJSON

Returns the unmodified JSON received from the API

func (*TurnResponseEventPayloadStepCompleteStepDetailsUnion) UnmarshalJSON

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

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

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 (TurnResponseEventPayloadStepStartMetadataUnion) AsBool

func (TurnResponseEventPayloadStepStartMetadataUnion) AsFloat

func (TurnResponseEventPayloadStepStartMetadataUnion) AsString

func (TurnResponseEventPayloadStepStartMetadataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*TurnResponseEventPayloadStepStartMetadataUnion) UnmarshalJSON

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

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

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

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 (TurnResponseEventPayloadUnion) AsStepProgress

func (TurnResponseEventPayloadUnion) AsStepStart

func (TurnResponseEventPayloadUnion) AsTurnAwaitingInput

func (TurnResponseEventPayloadUnion) AsTurnComplete

func (TurnResponseEventPayloadUnion) AsTurnStart

func (TurnResponseEventPayloadUnion) RawJSON

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

List all vector databases.

func (*VectorDBService) Register

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

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

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

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

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

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

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 (VectorStoreFileChunkingStrategyUnion) AsStatic

func (VectorStoreFileChunkingStrategyUnion) RawJSON

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

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 (VectorStoreFileContentResponseAttributeUnion) AsBool

func (VectorStoreFileContentResponseAttributeUnion) AsFloat

func (VectorStoreFileContentResponseAttributeUnion) AsString

func (VectorStoreFileContentResponseAttributeUnion) RawJSON

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

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

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

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

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

Returns a pointer to the underlying variant's property, if present.

func (VectorStoreFileNewParamsChunkingStrategyUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (VectorStoreFileNewParamsChunkingStrategyUnion) MarshalJSON

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

Retrieves the contents of a vector store file.

func (*VectorStoreFileService) Delete

Delete a vector store file.

func (*VectorStoreFileService) Get

Retrieves a vector store file.

func (*VectorStoreFileService) List

List files in a vector store.

func (*VectorStoreFileService) ListAutoPaging

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

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 (*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 (*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

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 (VectorStoreSearchResponseDataAttributeUnion) AsFloat

func (VectorStoreSearchResponseDataAttributeUnion) AsString

func (VectorStoreSearchResponseDataAttributeUnion) RawJSON

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

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

Returns a list of vector stores.

func (*VectorStoreService) ListAutoPaging

Returns a list of vector stores.

func (*VectorStoreService) New

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 (*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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL