llamastackclient

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

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

Go to latest
Published: Nov 14, 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.4.0-alpha.1'

Requirements

This library requires Go 1.22+.

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()
	response, err := client.Models.Register(context.TODO(), llamastackclient.ModelRegisterParams{
		ModelID: "model_id",
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", response.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 its 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.Chat.Completions.New(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.Chat.Completions.New(context.TODO(), llamastackclient.ChatCompletionNewParams{
	Messages: []llamastackclient.ChatCompletionNewParamsMessageUnion{{
		OfUser: &llamastackclient.ChatCompletionNewParamsMessageUser{
			Content: llamastackclient.ChatCompletionNewParamsMessageUserContentUnion{
				OfString: llamastackclient.String("string"),
			},
		},
	}},
	Model: "model",
})
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/chat/completions": 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.Chat.Completions.New(
	ctx,
	llamastackclient.ChatCompletionNewParams{
		Messages: []llamastackclient.ChatCompletionNewParamsMessageUnion{{
			OfUser: &llamastackclient.ChatCompletionNewParamsMessageUser{
				Content: llamastackclient.ChatCompletionNewParamsMessageUserContentUnion{
					OfString: llamastackclient.String("string"),
				},
			},
		}},
		Model: "model",
	},
	// 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.Chat.Completions.New(
	context.TODO(),
	llamastackclient.ChatCompletionNewParams{
		Messages: []llamastackclient.ChatCompletionNewParamsMessageUnion{{
			OfUser: &llamastackclient.ChatCompletionNewParamsMessageUser{
				Content: llamastackclient.ChatCompletionNewParamsMessageUserContentUnion{
					OfString: llamastackclient.String("string"),
				},
			},
		}},
		Model: "model",
	},
	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
completion, err := client.Chat.Completions.New(
	context.TODO(),
	llamastackclient.ChatCompletionNewParams{
		Messages: []llamastackclient.ChatCompletionNewParamsMessageUnion{{
			OfUser: &llamastackclient.ChatCompletionNewParamsMessageUser{
				Content: llamastackclient.ChatCompletionNewParamsMessageUserContentUnion{
					OfString: llamastackclient.String("string"),
				},
			},
		}},
		Model: "model",
	},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", completion)

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

This section is empty.

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 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 AlphaBenchmarkRegisterParams

type AlphaBenchmarkRegisterParams 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]AlphaBenchmarkRegisterParamsMetadataUnion `json:"metadata,omitzero"`
	// contains filtered or unexported fields
}

func (AlphaBenchmarkRegisterParams) MarshalJSON

func (r AlphaBenchmarkRegisterParams) MarshalJSON() (data []byte, err error)

func (*AlphaBenchmarkRegisterParams) UnmarshalJSON

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

type AlphaBenchmarkRegisterParamsMetadataUnion

type AlphaBenchmarkRegisterParamsMetadataUnion 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 (AlphaBenchmarkRegisterParamsMetadataUnion) MarshalJSON

func (*AlphaBenchmarkRegisterParamsMetadataUnion) UnmarshalJSON

func (u *AlphaBenchmarkRegisterParamsMetadataUnion) UnmarshalJSON(data []byte) error

type AlphaBenchmarkService

type AlphaBenchmarkService struct {
	Options []option.RequestOption
}

AlphaBenchmarkService 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 NewAlphaBenchmarkService method instead.

func NewAlphaBenchmarkService

func NewAlphaBenchmarkService(opts ...option.RequestOption) (r AlphaBenchmarkService)

NewAlphaBenchmarkService 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 (*AlphaBenchmarkService) Get

func (r *AlphaBenchmarkService) Get(ctx context.Context, benchmarkID string, opts ...option.RequestOption) (res *Benchmark, err error)

Get a benchmark by its ID.

func (*AlphaBenchmarkService) List

func (r *AlphaBenchmarkService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Benchmark, err error)

List all benchmarks.

func (*AlphaBenchmarkService) Register deprecated

Register a benchmark.

Deprecated: deprecated

type AlphaEvalEvaluateRowsAlphaParams

type AlphaEvalEvaluateRowsAlphaParams struct {
	// The configuration for the benchmark.
	BenchmarkConfig BenchmarkConfigParam `json:"benchmark_config,omitzero,required"`
	// The rows to evaluate.
	InputRows []map[string]AlphaEvalEvaluateRowsAlphaParamsInputRowUnion `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 (AlphaEvalEvaluateRowsAlphaParams) MarshalJSON

func (r AlphaEvalEvaluateRowsAlphaParams) MarshalJSON() (data []byte, err error)

func (*AlphaEvalEvaluateRowsAlphaParams) UnmarshalJSON

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

type AlphaEvalEvaluateRowsAlphaParamsInputRowUnion

type AlphaEvalEvaluateRowsAlphaParamsInputRowUnion 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 (AlphaEvalEvaluateRowsAlphaParamsInputRowUnion) MarshalJSON

func (*AlphaEvalEvaluateRowsAlphaParamsInputRowUnion) UnmarshalJSON

func (u *AlphaEvalEvaluateRowsAlphaParamsInputRowUnion) UnmarshalJSON(data []byte) error

type AlphaEvalEvaluateRowsParams

type AlphaEvalEvaluateRowsParams struct {
	// The configuration for the benchmark.
	BenchmarkConfig BenchmarkConfigParam `json:"benchmark_config,omitzero,required"`
	// The rows to evaluate.
	InputRows []map[string]AlphaEvalEvaluateRowsParamsInputRowUnion `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 (AlphaEvalEvaluateRowsParams) MarshalJSON

func (r AlphaEvalEvaluateRowsParams) MarshalJSON() (data []byte, err error)

func (*AlphaEvalEvaluateRowsParams) UnmarshalJSON

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

type AlphaEvalEvaluateRowsParamsInputRowUnion

type AlphaEvalEvaluateRowsParamsInputRowUnion 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 (AlphaEvalEvaluateRowsParamsInputRowUnion) MarshalJSON

func (*AlphaEvalEvaluateRowsParamsInputRowUnion) UnmarshalJSON

func (u *AlphaEvalEvaluateRowsParamsInputRowUnion) UnmarshalJSON(data []byte) error

type AlphaEvalJobCancelParams

type AlphaEvalJobCancelParams struct {
	BenchmarkID string `path:"benchmark_id,required" json:"-"`
	// contains filtered or unexported fields
}

type AlphaEvalJobGetParams

type AlphaEvalJobGetParams struct {
	BenchmarkID string `path:"benchmark_id,required" json:"-"`
	// contains filtered or unexported fields
}

type AlphaEvalJobService

type AlphaEvalJobService struct {
	Options []option.RequestOption
}

AlphaEvalJobService 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 NewAlphaEvalJobService method instead.

func NewAlphaEvalJobService

func NewAlphaEvalJobService(opts ...option.RequestOption) (r AlphaEvalJobService)

NewAlphaEvalJobService 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 (*AlphaEvalJobService) Cancel

func (r *AlphaEvalJobService) Cancel(ctx context.Context, jobID string, body AlphaEvalJobCancelParams, opts ...option.RequestOption) (err error)

Cancel a job.

func (*AlphaEvalJobService) Get

Get the result of a job.

func (*AlphaEvalJobService) Status

func (r *AlphaEvalJobService) Status(ctx context.Context, jobID string, query AlphaEvalJobStatusParams, opts ...option.RequestOption) (res *Job, err error)

Get the status of a job.

type AlphaEvalJobStatusParams

type AlphaEvalJobStatusParams struct {
	BenchmarkID string `path:"benchmark_id,required" json:"-"`
	// contains filtered or unexported fields
}

type AlphaEvalRunEvalAlphaParams

type AlphaEvalRunEvalAlphaParams struct {
	// The configuration for the benchmark.
	BenchmarkConfig BenchmarkConfigParam `json:"benchmark_config,omitzero,required"`
	// contains filtered or unexported fields
}

func (AlphaEvalRunEvalAlphaParams) MarshalJSON

func (r AlphaEvalRunEvalAlphaParams) MarshalJSON() (data []byte, err error)

func (*AlphaEvalRunEvalAlphaParams) UnmarshalJSON

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

type AlphaEvalRunEvalParams

type AlphaEvalRunEvalParams struct {
	// The configuration for the benchmark.
	BenchmarkConfig BenchmarkConfigParam `json:"benchmark_config,omitzero,required"`
	// contains filtered or unexported fields
}

func (AlphaEvalRunEvalParams) MarshalJSON

func (r AlphaEvalRunEvalParams) MarshalJSON() (data []byte, err error)

func (*AlphaEvalRunEvalParams) UnmarshalJSON

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

type AlphaEvalService

type AlphaEvalService struct {
	Options []option.RequestOption
	Jobs    AlphaEvalJobService
}

AlphaEvalService 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 NewAlphaEvalService method instead.

func NewAlphaEvalService

func NewAlphaEvalService(opts ...option.RequestOption) (r AlphaEvalService)

NewAlphaEvalService 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 (*AlphaEvalService) EvaluateRows

func (r *AlphaEvalService) EvaluateRows(ctx context.Context, benchmarkID string, body AlphaEvalEvaluateRowsParams, opts ...option.RequestOption) (res *EvaluateResponse, err error)

Evaluate a list of rows on a benchmark.

func (*AlphaEvalService) EvaluateRowsAlpha

func (r *AlphaEvalService) EvaluateRowsAlpha(ctx context.Context, benchmarkID string, body AlphaEvalEvaluateRowsAlphaParams, opts ...option.RequestOption) (res *EvaluateResponse, err error)

Evaluate a list of rows on a benchmark.

func (*AlphaEvalService) RunEval

func (r *AlphaEvalService) RunEval(ctx context.Context, benchmarkID string, body AlphaEvalRunEvalParams, opts ...option.RequestOption) (res *Job, err error)

Run an evaluation on a benchmark.

func (*AlphaEvalService) RunEvalAlpha

func (r *AlphaEvalService) RunEvalAlpha(ctx context.Context, benchmarkID string, body AlphaEvalRunEvalAlphaParams, opts ...option.RequestOption) (res *Job, err error)

Run an evaluation on a benchmark.

type AlphaInferenceRerankParams

type AlphaInferenceRerankParams struct {
	// List of items to rerank. Each item can be a string, text content part, or image
	// content part. Each input must not exceed the model's max input token length.
	Items []AlphaInferenceRerankParamsItemUnion `json:"items,omitzero,required"`
	// The identifier of the reranking model to use.
	Model string `json:"model,required"`
	// The search query to rank items against. Can be a string, text content part, or
	// image content part. The input must not exceed the model's max input token
	// length.
	Query AlphaInferenceRerankParamsQueryUnion `json:"query,omitzero,required"`
	// (Optional) Maximum number of results to return. Default: returns all.
	MaxNumResults param.Opt[int64] `json:"max_num_results,omitzero"`
	// contains filtered or unexported fields
}

func (AlphaInferenceRerankParams) MarshalJSON

func (r AlphaInferenceRerankParams) MarshalJSON() (data []byte, err error)

func (*AlphaInferenceRerankParams) UnmarshalJSON

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

type AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartImageParam

type AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartImageParam struct {
	// Image URL specification and processing details
	ImageURL AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartImageParamImageURL `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 (AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartImageParam) MarshalJSON

func (*AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartImageParam) UnmarshalJSON

type AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartImageParamImageURL

type AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartImageParamImageURL 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 (AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartImageParamImageURL) MarshalJSON

func (*AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartImageParamImageURL) UnmarshalJSON

type AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartTextParam

type AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartTextParam 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 (AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartTextParam) MarshalJSON

func (*AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartTextParam) UnmarshalJSON

type AlphaInferenceRerankParamsItemUnion

type AlphaInferenceRerankParamsItemUnion struct {
	OfString                               param.Opt[string]                                                        `json:",omitzero,inline"`
	OfOpenAIChatCompletionContentPartText  *AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartTextParam  `json:",omitzero,inline"`
	OfOpenAIChatCompletionContentPartImage *AlphaInferenceRerankParamsItemOpenAIChatCompletionContentPartImageParam `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 (AlphaInferenceRerankParamsItemUnion) GetImageURL

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

func (AlphaInferenceRerankParamsItemUnion) GetText

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

func (AlphaInferenceRerankParamsItemUnion) GetType

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

func (AlphaInferenceRerankParamsItemUnion) MarshalJSON

func (u AlphaInferenceRerankParamsItemUnion) MarshalJSON() ([]byte, error)

func (*AlphaInferenceRerankParamsItemUnion) UnmarshalJSON

func (u *AlphaInferenceRerankParamsItemUnion) UnmarshalJSON(data []byte) error

type AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartImageParam

type AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartImageParam struct {
	// Image URL specification and processing details
	ImageURL AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartImageParamImageURL `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 (AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartImageParam) MarshalJSON

func (*AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartImageParam) UnmarshalJSON

type AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartImageParamImageURL

type AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartImageParamImageURL 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 (AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartImageParamImageURL) MarshalJSON

func (*AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartImageParamImageURL) UnmarshalJSON

type AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartTextParam

type AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartTextParam 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 (AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartTextParam) MarshalJSON

func (*AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartTextParam) UnmarshalJSON

type AlphaInferenceRerankParamsQueryUnion

type AlphaInferenceRerankParamsQueryUnion struct {
	OfString                               param.Opt[string]                                                         `json:",omitzero,inline"`
	OfOpenAIChatCompletionContentPartText  *AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartTextParam  `json:",omitzero,inline"`
	OfOpenAIChatCompletionContentPartImage *AlphaInferenceRerankParamsQueryOpenAIChatCompletionContentPartImageParam `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 (AlphaInferenceRerankParamsQueryUnion) GetImageURL

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

func (AlphaInferenceRerankParamsQueryUnion) GetText

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

func (AlphaInferenceRerankParamsQueryUnion) GetType

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

func (AlphaInferenceRerankParamsQueryUnion) MarshalJSON

func (u AlphaInferenceRerankParamsQueryUnion) MarshalJSON() ([]byte, error)

func (*AlphaInferenceRerankParamsQueryUnion) UnmarshalJSON

func (u *AlphaInferenceRerankParamsQueryUnion) UnmarshalJSON(data []byte) error

type AlphaInferenceRerankResponse

type AlphaInferenceRerankResponse struct {
	// The original index of the document in the input list
	Index int64 `json:"index,required"`
	// The relevance score from the model output. Values are inverted when applicable
	// so that higher scores indicate greater relevance.
	RelevanceScore float64 `json:"relevance_score,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Index          respjson.Field
		RelevanceScore respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A single rerank result from a reranking response.

func (AlphaInferenceRerankResponse) RawJSON

Returns the unmodified JSON received from the API

func (*AlphaInferenceRerankResponse) UnmarshalJSON

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

type AlphaInferenceRerankResponseEnvelope

type AlphaInferenceRerankResponseEnvelope struct {
	// List of rerank result objects, sorted by relevance score (descending)
	Data []AlphaInferenceRerankResponse `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 a reranking request.

func (AlphaInferenceRerankResponseEnvelope) RawJSON

Returns the unmodified JSON received from the API

func (*AlphaInferenceRerankResponseEnvelope) UnmarshalJSON

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

type AlphaInferenceService

type AlphaInferenceService struct {
	Options []option.RequestOption
}

AlphaInferenceService 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 NewAlphaInferenceService method instead.

func NewAlphaInferenceService

func NewAlphaInferenceService(opts ...option.RequestOption) (r AlphaInferenceService)

NewAlphaInferenceService 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 (*AlphaInferenceService) Rerank

Rerank a list of documents based on their relevance to a query.

type AlphaPostTrainingJobArtifactsParams

type AlphaPostTrainingJobArtifactsParams struct {
	// The UUID of the job to get the artifacts of.
	JobUuid string `query:"job_uuid,required" json:"-"`
	// contains filtered or unexported fields
}

func (AlphaPostTrainingJobArtifactsParams) URLQuery

func (r AlphaPostTrainingJobArtifactsParams) URLQuery() (v url.Values, err error)

URLQuery serializes AlphaPostTrainingJobArtifactsParams's query parameters as `url.Values`.

type AlphaPostTrainingJobArtifactsResponse

type AlphaPostTrainingJobArtifactsResponse struct {
	// List of model checkpoints created during training
	Checkpoints []AlphaPostTrainingJobArtifactsResponseCheckpoint `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 (AlphaPostTrainingJobArtifactsResponse) RawJSON

Returns the unmodified JSON received from the API

func (*AlphaPostTrainingJobArtifactsResponse) UnmarshalJSON

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

type AlphaPostTrainingJobArtifactsResponseCheckpoint

type AlphaPostTrainingJobArtifactsResponseCheckpoint 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 AlphaPostTrainingJobArtifactsResponseCheckpointTrainingMetrics `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 (AlphaPostTrainingJobArtifactsResponseCheckpoint) RawJSON

Returns the unmodified JSON received from the API

func (*AlphaPostTrainingJobArtifactsResponseCheckpoint) UnmarshalJSON

type AlphaPostTrainingJobArtifactsResponseCheckpointTrainingMetrics

type AlphaPostTrainingJobArtifactsResponseCheckpointTrainingMetrics 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 (AlphaPostTrainingJobArtifactsResponseCheckpointTrainingMetrics) RawJSON

Returns the unmodified JSON received from the API

func (*AlphaPostTrainingJobArtifactsResponseCheckpointTrainingMetrics) UnmarshalJSON

type AlphaPostTrainingJobCancelParams

type AlphaPostTrainingJobCancelParams struct {
	// The UUID of the job to cancel.
	JobUuid string `json:"job_uuid,required"`
	// contains filtered or unexported fields
}

func (AlphaPostTrainingJobCancelParams) MarshalJSON

func (r AlphaPostTrainingJobCancelParams) MarshalJSON() (data []byte, err error)

func (*AlphaPostTrainingJobCancelParams) UnmarshalJSON

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

type AlphaPostTrainingJobService

type AlphaPostTrainingJobService struct {
	Options []option.RequestOption
}

AlphaPostTrainingJobService 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 NewAlphaPostTrainingJobService method instead.

func NewAlphaPostTrainingJobService

func NewAlphaPostTrainingJobService(opts ...option.RequestOption) (r AlphaPostTrainingJobService)

NewAlphaPostTrainingJobService 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 (*AlphaPostTrainingJobService) Artifacts

Get the artifacts of a training job.

func (*AlphaPostTrainingJobService) Cancel

Cancel a training job.

func (*AlphaPostTrainingJobService) List

Get all training jobs.

func (*AlphaPostTrainingJobService) Status

Get the status of a training job.

type AlphaPostTrainingJobStatusParams

type AlphaPostTrainingJobStatusParams struct {
	// The UUID of the job to get the status of.
	JobUuid string `query:"job_uuid,required" json:"-"`
	// contains filtered or unexported fields
}

func (AlphaPostTrainingJobStatusParams) URLQuery

func (r AlphaPostTrainingJobStatusParams) URLQuery() (v url.Values, err error)

URLQuery serializes AlphaPostTrainingJobStatusParams's query parameters as `url.Values`.

type AlphaPostTrainingJobStatusResponse

type AlphaPostTrainingJobStatusResponse struct {
	// List of model checkpoints created during training
	Checkpoints []AlphaPostTrainingJobStatusResponseCheckpoint `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 AlphaPostTrainingJobStatusResponseStatus `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]AlphaPostTrainingJobStatusResponseResourcesAllocatedUnion `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 (AlphaPostTrainingJobStatusResponse) RawJSON

Returns the unmodified JSON received from the API

func (*AlphaPostTrainingJobStatusResponse) UnmarshalJSON

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

type AlphaPostTrainingJobStatusResponseCheckpoint

type AlphaPostTrainingJobStatusResponseCheckpoint 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 AlphaPostTrainingJobStatusResponseCheckpointTrainingMetrics `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 (AlphaPostTrainingJobStatusResponseCheckpoint) RawJSON

Returns the unmodified JSON received from the API

func (*AlphaPostTrainingJobStatusResponseCheckpoint) UnmarshalJSON

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

type AlphaPostTrainingJobStatusResponseCheckpointTrainingMetrics

type AlphaPostTrainingJobStatusResponseCheckpointTrainingMetrics 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 (AlphaPostTrainingJobStatusResponseCheckpointTrainingMetrics) RawJSON

Returns the unmodified JSON received from the API

func (*AlphaPostTrainingJobStatusResponseCheckpointTrainingMetrics) UnmarshalJSON

type AlphaPostTrainingJobStatusResponseResourcesAllocatedUnion

type AlphaPostTrainingJobStatusResponseResourcesAllocatedUnion 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:"-"`
}

AlphaPostTrainingJobStatusResponseResourcesAllocatedUnion 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 (AlphaPostTrainingJobStatusResponseResourcesAllocatedUnion) AsAnyArray

func (AlphaPostTrainingJobStatusResponseResourcesAllocatedUnion) AsBool

func (AlphaPostTrainingJobStatusResponseResourcesAllocatedUnion) AsFloat

func (AlphaPostTrainingJobStatusResponseResourcesAllocatedUnion) AsString

func (AlphaPostTrainingJobStatusResponseResourcesAllocatedUnion) RawJSON

Returns the unmodified JSON received from the API

func (*AlphaPostTrainingJobStatusResponseResourcesAllocatedUnion) UnmarshalJSON

type AlphaPostTrainingJobStatusResponseStatus

type AlphaPostTrainingJobStatusResponseStatus string

Current status of the training job

const (
	AlphaPostTrainingJobStatusResponseStatusCompleted  AlphaPostTrainingJobStatusResponseStatus = "completed"
	AlphaPostTrainingJobStatusResponseStatusInProgress AlphaPostTrainingJobStatusResponseStatus = "in_progress"
	AlphaPostTrainingJobStatusResponseStatusFailed     AlphaPostTrainingJobStatusResponseStatus = "failed"
	AlphaPostTrainingJobStatusResponseStatusScheduled  AlphaPostTrainingJobStatusResponseStatus = "scheduled"
	AlphaPostTrainingJobStatusResponseStatusCancelled  AlphaPostTrainingJobStatusResponseStatus = "cancelled"
)

type AlphaPostTrainingPreferenceOptimizeParams

type AlphaPostTrainingPreferenceOptimizeParams struct {
	// The algorithm configuration.
	AlgorithmConfig AlphaPostTrainingPreferenceOptimizeParamsAlgorithmConfig `json:"algorithm_config,omitzero,required"`
	// The model to fine-tune.
	FinetunedModel string `json:"finetuned_model,required"`
	// The hyperparam search configuration.
	HyperparamSearchConfig map[string]AlphaPostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion `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]AlphaPostTrainingPreferenceOptimizeParamsLoggerConfigUnion `json:"logger_config,omitzero,required"`
	// The training configuration.
	TrainingConfig AlphaPostTrainingPreferenceOptimizeParamsTrainingConfig `json:"training_config,omitzero,required"`
	// contains filtered or unexported fields
}

func (AlphaPostTrainingPreferenceOptimizeParams) MarshalJSON

func (r AlphaPostTrainingPreferenceOptimizeParams) MarshalJSON() (data []byte, err error)

func (*AlphaPostTrainingPreferenceOptimizeParams) UnmarshalJSON

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

type AlphaPostTrainingPreferenceOptimizeParamsAlgorithmConfig

type AlphaPostTrainingPreferenceOptimizeParamsAlgorithmConfig 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 (AlphaPostTrainingPreferenceOptimizeParamsAlgorithmConfig) MarshalJSON

func (*AlphaPostTrainingPreferenceOptimizeParamsAlgorithmConfig) UnmarshalJSON

type AlphaPostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion

type AlphaPostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion 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 (AlphaPostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion) MarshalJSON

func (*AlphaPostTrainingPreferenceOptimizeParamsHyperparamSearchConfigUnion) UnmarshalJSON

type AlphaPostTrainingPreferenceOptimizeParamsLoggerConfigUnion

type AlphaPostTrainingPreferenceOptimizeParamsLoggerConfigUnion 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 (AlphaPostTrainingPreferenceOptimizeParamsLoggerConfigUnion) MarshalJSON

func (*AlphaPostTrainingPreferenceOptimizeParamsLoggerConfigUnion) UnmarshalJSON

type AlphaPostTrainingPreferenceOptimizeParamsTrainingConfig

type AlphaPostTrainingPreferenceOptimizeParamsTrainingConfig 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 AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig `json:"data_config,omitzero"`
	// (Optional) Configuration for memory and compute optimizations
	EfficiencyConfig AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig `json:"efficiency_config,omitzero"`
	// (Optional) Configuration for the optimization algorithm
	OptimizerConfig AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig `json:"optimizer_config,omitzero"`
	// contains filtered or unexported fields
}

The training configuration.

The properties GradientAccumulationSteps, MaxStepsPerEpoch, NEpochs are required.

func (AlphaPostTrainingPreferenceOptimizeParamsTrainingConfig) MarshalJSON

func (*AlphaPostTrainingPreferenceOptimizeParamsTrainingConfig) UnmarshalJSON

type AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig

type AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig 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 (AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig) MarshalJSON

func (*AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigDataConfig) UnmarshalJSON

type AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig

type AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig 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 (AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig) MarshalJSON

func (*AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigEfficiencyConfig) UnmarshalJSON

type AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig

type AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig 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 (AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig) MarshalJSON

func (*AlphaPostTrainingPreferenceOptimizeParamsTrainingConfigOptimizerConfig) UnmarshalJSON

type AlphaPostTrainingService

type AlphaPostTrainingService struct {
	Options []option.RequestOption
	Job     AlphaPostTrainingJobService
}

AlphaPostTrainingService 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 NewAlphaPostTrainingService method instead.

func NewAlphaPostTrainingService

func NewAlphaPostTrainingService(opts ...option.RequestOption) (r AlphaPostTrainingService)

NewAlphaPostTrainingService 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 (*AlphaPostTrainingService) PreferenceOptimize

Run preference optimization of a model.

func (*AlphaPostTrainingService) SupervisedFineTune

Run supervised fine-tuning of a model.

type AlphaPostTrainingSupervisedFineTuneParams

type AlphaPostTrainingSupervisedFineTuneParams struct {
	// The hyperparam search configuration.
	HyperparamSearchConfig map[string]AlphaPostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion `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]AlphaPostTrainingSupervisedFineTuneParamsLoggerConfigUnion `json:"logger_config,omitzero,required"`
	// The training configuration.
	TrainingConfig AlphaPostTrainingSupervisedFineTuneParamsTrainingConfig `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 (AlphaPostTrainingSupervisedFineTuneParams) MarshalJSON

func (r AlphaPostTrainingSupervisedFineTuneParams) MarshalJSON() (data []byte, err error)

func (*AlphaPostTrainingSupervisedFineTuneParams) UnmarshalJSON

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

type AlphaPostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion

type AlphaPostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion 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 (AlphaPostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion) MarshalJSON

func (*AlphaPostTrainingSupervisedFineTuneParamsHyperparamSearchConfigUnion) UnmarshalJSON

type AlphaPostTrainingSupervisedFineTuneParamsLoggerConfigUnion

type AlphaPostTrainingSupervisedFineTuneParamsLoggerConfigUnion 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 (AlphaPostTrainingSupervisedFineTuneParamsLoggerConfigUnion) MarshalJSON

func (*AlphaPostTrainingSupervisedFineTuneParamsLoggerConfigUnion) UnmarshalJSON

type AlphaPostTrainingSupervisedFineTuneParamsTrainingConfig

type AlphaPostTrainingSupervisedFineTuneParamsTrainingConfig 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 AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig `json:"data_config,omitzero"`
	// (Optional) Configuration for memory and compute optimizations
	EfficiencyConfig AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig `json:"efficiency_config,omitzero"`
	// (Optional) Configuration for the optimization algorithm
	OptimizerConfig AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig `json:"optimizer_config,omitzero"`
	// contains filtered or unexported fields
}

The training configuration.

The properties GradientAccumulationSteps, MaxStepsPerEpoch, NEpochs are required.

func (AlphaPostTrainingSupervisedFineTuneParamsTrainingConfig) MarshalJSON

func (*AlphaPostTrainingSupervisedFineTuneParamsTrainingConfig) UnmarshalJSON

type AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig

type AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig 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 (AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig) MarshalJSON

func (*AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigDataConfig) UnmarshalJSON

type AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig

type AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig 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 (AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig) MarshalJSON

func (*AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigEfficiencyConfig) UnmarshalJSON

type AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig

type AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig 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 (AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig) MarshalJSON

func (*AlphaPostTrainingSupervisedFineTuneParamsTrainingConfigOptimizerConfig) UnmarshalJSON

type AlphaService

type AlphaService struct {
	Options      []option.RequestOption
	Inference    AlphaInferenceService
	PostTraining AlphaPostTrainingService
	Benchmarks   AlphaBenchmarkService
	Eval         AlphaEvalService
}

AlphaService 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 NewAlphaService method instead.

func NewAlphaService

func NewAlphaService(opts ...option.RequestOption) (r AlphaService)

NewAlphaService 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 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 BenchmarkConfigEvalCandidateParam

type BenchmarkConfigEvalCandidateParam struct {
	// The model ID to evaluate.
	Model string `json:"model,required"`
	// The sampling parameters for the model.
	SamplingParams SamplingParams `json:"sampling_params,omitzero,required"`
	// (Optional) The system message providing instructions or context to the model.
	SystemMessage 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
}

The candidate to evaluate.

The properties Model, SamplingParams, Type are required.

func (BenchmarkConfigEvalCandidateParam) MarshalJSON

func (r BenchmarkConfigEvalCandidateParam) MarshalJSON() (data []byte, err error)

func (*BenchmarkConfigEvalCandidateParam) UnmarshalJSON

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

type BenchmarkConfigParam

type BenchmarkConfigParam struct {
	// The candidate to evaluate.
	EvalCandidate BenchmarkConfigEvalCandidateParam `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 BetaDatasetAppendrowsParams

type BetaDatasetAppendrowsParams struct {
	// The rows to append to the dataset.
	Rows []map[string]BetaDatasetAppendrowsParamsRowUnion `json:"rows,omitzero,required"`
	// contains filtered or unexported fields
}

func (BetaDatasetAppendrowsParams) MarshalJSON

func (r BetaDatasetAppendrowsParams) MarshalJSON() (data []byte, err error)

func (*BetaDatasetAppendrowsParams) UnmarshalJSON

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

type BetaDatasetAppendrowsParamsRowUnion

type BetaDatasetAppendrowsParamsRowUnion 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 (BetaDatasetAppendrowsParamsRowUnion) MarshalJSON

func (u BetaDatasetAppendrowsParamsRowUnion) MarshalJSON() ([]byte, error)

func (*BetaDatasetAppendrowsParamsRowUnion) UnmarshalJSON

func (u *BetaDatasetAppendrowsParamsRowUnion) UnmarshalJSON(data []byte) error

type BetaDatasetGetResponse

type BetaDatasetGetResponse struct {
	Identifier string `json:"identifier,required"`
	// Additional metadata for the dataset
	Metadata   map[string]BetaDatasetGetResponseMetadataUnion `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 BetaDatasetGetResponsePurpose `json:"purpose,required"`
	// Data source configuration for the dataset
	Source BetaDatasetGetResponseSourceUnion `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 (BetaDatasetGetResponse) RawJSON

func (r BetaDatasetGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BetaDatasetGetResponse) UnmarshalJSON

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

type BetaDatasetGetResponseMetadataUnion

type BetaDatasetGetResponseMetadataUnion 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:"-"`
}

BetaDatasetGetResponseMetadataUnion 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 (BetaDatasetGetResponseMetadataUnion) AsAnyArray

func (u BetaDatasetGetResponseMetadataUnion) AsAnyArray() (v []any)

func (BetaDatasetGetResponseMetadataUnion) AsBool

func (BetaDatasetGetResponseMetadataUnion) AsFloat

func (BetaDatasetGetResponseMetadataUnion) AsString

func (BetaDatasetGetResponseMetadataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*BetaDatasetGetResponseMetadataUnion) UnmarshalJSON

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

type BetaDatasetGetResponsePurpose

type BetaDatasetGetResponsePurpose string

Purpose of the dataset indicating its intended use

const (
	BetaDatasetGetResponsePurposePostTrainingMessages BetaDatasetGetResponsePurpose = "post-training/messages"
	BetaDatasetGetResponsePurposeEvalQuestionAnswer   BetaDatasetGetResponsePurpose = "eval/question-answer"
	BetaDatasetGetResponsePurposeEvalMessagesAnswer   BetaDatasetGetResponsePurpose = "eval/messages-answer"
)

type BetaDatasetGetResponseSourceRows

type BetaDatasetGetResponseSourceRows struct {
	// The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user",
	// "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]}
	// ]
	Rows []map[string]BetaDatasetGetResponseSourceRowsRowUnion `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 (BetaDatasetGetResponseSourceRows) RawJSON

Returns the unmodified JSON received from the API

func (*BetaDatasetGetResponseSourceRows) UnmarshalJSON

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

type BetaDatasetGetResponseSourceRowsRowUnion

type BetaDatasetGetResponseSourceRowsRowUnion 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:"-"`
}

BetaDatasetGetResponseSourceRowsRowUnion 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 (BetaDatasetGetResponseSourceRowsRowUnion) AsAnyArray

func (u BetaDatasetGetResponseSourceRowsRowUnion) AsAnyArray() (v []any)

func (BetaDatasetGetResponseSourceRowsRowUnion) AsBool

func (BetaDatasetGetResponseSourceRowsRowUnion) AsFloat

func (BetaDatasetGetResponseSourceRowsRowUnion) AsString

func (BetaDatasetGetResponseSourceRowsRowUnion) RawJSON

Returns the unmodified JSON received from the API

func (*BetaDatasetGetResponseSourceRowsRowUnion) UnmarshalJSON

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

type BetaDatasetGetResponseSourceUnion

type BetaDatasetGetResponseSourceUnion struct {
	// Any of "uri", "rows".
	Type string `json:"type"`
	// This field is from variant [BetaDatasetGetResponseSourceUri].
	Uri string `json:"uri"`
	// This field is from variant [BetaDatasetGetResponseSourceRows].
	Rows []map[string]BetaDatasetGetResponseSourceRowsRowUnion `json:"rows"`
	JSON struct {
		Type respjson.Field
		Uri  respjson.Field
		Rows respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

BetaDatasetGetResponseSourceUnion contains all possible properties and values from BetaDatasetGetResponseSourceUri, BetaDatasetGetResponseSourceRows.

Use the BetaDatasetGetResponseSourceUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (BetaDatasetGetResponseSourceUnion) AsAny

func (u BetaDatasetGetResponseSourceUnion) AsAny() anyBetaDatasetGetResponseSource

Use the following switch statement to find the correct variant

switch variant := BetaDatasetGetResponseSourceUnion.AsAny().(type) {
case llamastackclient.BetaDatasetGetResponseSourceUri:
case llamastackclient.BetaDatasetGetResponseSourceRows:
default:
  fmt.Errorf("no variant present")
}

func (BetaDatasetGetResponseSourceUnion) AsRows

func (BetaDatasetGetResponseSourceUnion) AsUri

func (BetaDatasetGetResponseSourceUnion) RawJSON

Returns the unmodified JSON received from the API

func (*BetaDatasetGetResponseSourceUnion) UnmarshalJSON

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

type BetaDatasetGetResponseSourceUri

type BetaDatasetGetResponseSourceUri 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 (BetaDatasetGetResponseSourceUri) RawJSON

Returns the unmodified JSON received from the API

func (*BetaDatasetGetResponseSourceUri) UnmarshalJSON

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

type BetaDatasetIterrowsParams

type BetaDatasetIterrowsParams 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 (BetaDatasetIterrowsParams) URLQuery

func (r BetaDatasetIterrowsParams) URLQuery() (v url.Values, err error)

URLQuery serializes BetaDatasetIterrowsParams's query parameters as `url.Values`.

type BetaDatasetIterrowsResponse

type BetaDatasetIterrowsResponse struct {
	// The list of items for the current page
	Data []map[string]BetaDatasetIterrowsResponseDataUnion `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 (BetaDatasetIterrowsResponse) RawJSON

func (r BetaDatasetIterrowsResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BetaDatasetIterrowsResponse) UnmarshalJSON

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

type BetaDatasetIterrowsResponseDataUnion

type BetaDatasetIterrowsResponseDataUnion 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:"-"`
}

BetaDatasetIterrowsResponseDataUnion 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 (BetaDatasetIterrowsResponseDataUnion) AsAnyArray

func (u BetaDatasetIterrowsResponseDataUnion) AsAnyArray() (v []any)

func (BetaDatasetIterrowsResponseDataUnion) AsBool

func (BetaDatasetIterrowsResponseDataUnion) AsFloat

func (BetaDatasetIterrowsResponseDataUnion) AsString

func (BetaDatasetIterrowsResponseDataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*BetaDatasetIterrowsResponseDataUnion) UnmarshalJSON

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

type BetaDatasetRegisterParams

type BetaDatasetRegisterParams 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 BetaDatasetRegisterParamsPurpose `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 BetaDatasetRegisterParamsSourceUnion `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]BetaDatasetRegisterParamsMetadataUnion `json:"metadata,omitzero"`
	// contains filtered or unexported fields
}

func (BetaDatasetRegisterParams) MarshalJSON

func (r BetaDatasetRegisterParams) MarshalJSON() (data []byte, err error)

func (*BetaDatasetRegisterParams) UnmarshalJSON

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

type BetaDatasetRegisterParamsMetadataUnion

type BetaDatasetRegisterParamsMetadataUnion 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 (BetaDatasetRegisterParamsMetadataUnion) MarshalJSON

func (u BetaDatasetRegisterParamsMetadataUnion) MarshalJSON() ([]byte, error)

func (*BetaDatasetRegisterParamsMetadataUnion) UnmarshalJSON

func (u *BetaDatasetRegisterParamsMetadataUnion) UnmarshalJSON(data []byte) error

type BetaDatasetRegisterParamsPurpose

type BetaDatasetRegisterParamsPurpose 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 (
	BetaDatasetRegisterParamsPurposePostTrainingMessages BetaDatasetRegisterParamsPurpose = "post-training/messages"
	BetaDatasetRegisterParamsPurposeEvalQuestionAnswer   BetaDatasetRegisterParamsPurpose = "eval/question-answer"
	BetaDatasetRegisterParamsPurposeEvalMessagesAnswer   BetaDatasetRegisterParamsPurpose = "eval/messages-answer"
)

type BetaDatasetRegisterParamsSourceRows

type BetaDatasetRegisterParamsSourceRows struct {
	// The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user",
	// "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]}
	// ]
	Rows []map[string]BetaDatasetRegisterParamsSourceRowsRowUnion `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 (BetaDatasetRegisterParamsSourceRows) MarshalJSON

func (r BetaDatasetRegisterParamsSourceRows) MarshalJSON() (data []byte, err error)

func (*BetaDatasetRegisterParamsSourceRows) UnmarshalJSON

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

type BetaDatasetRegisterParamsSourceRowsRowUnion

type BetaDatasetRegisterParamsSourceRowsRowUnion 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 (BetaDatasetRegisterParamsSourceRowsRowUnion) MarshalJSON

func (*BetaDatasetRegisterParamsSourceRowsRowUnion) UnmarshalJSON

func (u *BetaDatasetRegisterParamsSourceRowsRowUnion) UnmarshalJSON(data []byte) error

type BetaDatasetRegisterParamsSourceUnion

type BetaDatasetRegisterParamsSourceUnion struct {
	OfUri  *BetaDatasetRegisterParamsSourceUri  `json:",omitzero,inline"`
	OfRows *BetaDatasetRegisterParamsSourceRows `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 (BetaDatasetRegisterParamsSourceUnion) GetRows

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

func (BetaDatasetRegisterParamsSourceUnion) GetType

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

func (BetaDatasetRegisterParamsSourceUnion) GetUri

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

func (BetaDatasetRegisterParamsSourceUnion) MarshalJSON

func (u BetaDatasetRegisterParamsSourceUnion) MarshalJSON() ([]byte, error)

func (*BetaDatasetRegisterParamsSourceUnion) UnmarshalJSON

func (u *BetaDatasetRegisterParamsSourceUnion) UnmarshalJSON(data []byte) error

type BetaDatasetRegisterParamsSourceUri

type BetaDatasetRegisterParamsSourceUri 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 (BetaDatasetRegisterParamsSourceUri) MarshalJSON

func (r BetaDatasetRegisterParamsSourceUri) MarshalJSON() (data []byte, err error)

func (*BetaDatasetRegisterParamsSourceUri) UnmarshalJSON

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

type BetaDatasetRegisterResponse

type BetaDatasetRegisterResponse struct {
	Identifier string `json:"identifier,required"`
	// Additional metadata for the dataset
	Metadata   map[string]BetaDatasetRegisterResponseMetadataUnion `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 BetaDatasetRegisterResponsePurpose `json:"purpose,required"`
	// Data source configuration for the dataset
	Source BetaDatasetRegisterResponseSourceUnion `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 (BetaDatasetRegisterResponse) RawJSON

func (r BetaDatasetRegisterResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BetaDatasetRegisterResponse) UnmarshalJSON

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

type BetaDatasetRegisterResponseMetadataUnion

type BetaDatasetRegisterResponseMetadataUnion 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:"-"`
}

BetaDatasetRegisterResponseMetadataUnion 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 (BetaDatasetRegisterResponseMetadataUnion) AsAnyArray

func (u BetaDatasetRegisterResponseMetadataUnion) AsAnyArray() (v []any)

func (BetaDatasetRegisterResponseMetadataUnion) AsBool

func (BetaDatasetRegisterResponseMetadataUnion) AsFloat

func (BetaDatasetRegisterResponseMetadataUnion) AsString

func (BetaDatasetRegisterResponseMetadataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*BetaDatasetRegisterResponseMetadataUnion) UnmarshalJSON

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

type BetaDatasetRegisterResponsePurpose

type BetaDatasetRegisterResponsePurpose string

Purpose of the dataset indicating its intended use

const (
	BetaDatasetRegisterResponsePurposePostTrainingMessages BetaDatasetRegisterResponsePurpose = "post-training/messages"
	BetaDatasetRegisterResponsePurposeEvalQuestionAnswer   BetaDatasetRegisterResponsePurpose = "eval/question-answer"
	BetaDatasetRegisterResponsePurposeEvalMessagesAnswer   BetaDatasetRegisterResponsePurpose = "eval/messages-answer"
)

type BetaDatasetRegisterResponseSourceRows

type BetaDatasetRegisterResponseSourceRows struct {
	// The dataset is stored in rows. E.g. - [ {"messages": [{"role": "user",
	// "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]}
	// ]
	Rows []map[string]BetaDatasetRegisterResponseSourceRowsRowUnion `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 (BetaDatasetRegisterResponseSourceRows) RawJSON

Returns the unmodified JSON received from the API

func (*BetaDatasetRegisterResponseSourceRows) UnmarshalJSON

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

type BetaDatasetRegisterResponseSourceRowsRowUnion

type BetaDatasetRegisterResponseSourceRowsRowUnion 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:"-"`
}

BetaDatasetRegisterResponseSourceRowsRowUnion 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 (BetaDatasetRegisterResponseSourceRowsRowUnion) AsAnyArray

func (BetaDatasetRegisterResponseSourceRowsRowUnion) AsBool

func (BetaDatasetRegisterResponseSourceRowsRowUnion) AsFloat

func (BetaDatasetRegisterResponseSourceRowsRowUnion) AsString

func (BetaDatasetRegisterResponseSourceRowsRowUnion) RawJSON

Returns the unmodified JSON received from the API

func (*BetaDatasetRegisterResponseSourceRowsRowUnion) UnmarshalJSON

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

type BetaDatasetRegisterResponseSourceUnion

type BetaDatasetRegisterResponseSourceUnion struct {
	// Any of "uri", "rows".
	Type string `json:"type"`
	// This field is from variant [BetaDatasetRegisterResponseSourceUri].
	Uri string `json:"uri"`
	// This field is from variant [BetaDatasetRegisterResponseSourceRows].
	Rows []map[string]BetaDatasetRegisterResponseSourceRowsRowUnion `json:"rows"`
	JSON struct {
		Type respjson.Field
		Uri  respjson.Field
		Rows respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

BetaDatasetRegisterResponseSourceUnion contains all possible properties and values from BetaDatasetRegisterResponseSourceUri, BetaDatasetRegisterResponseSourceRows.

Use the BetaDatasetRegisterResponseSourceUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (BetaDatasetRegisterResponseSourceUnion) AsAny

func (u BetaDatasetRegisterResponseSourceUnion) AsAny() anyBetaDatasetRegisterResponseSource

Use the following switch statement to find the correct variant

switch variant := BetaDatasetRegisterResponseSourceUnion.AsAny().(type) {
case llamastackclient.BetaDatasetRegisterResponseSourceUri:
case llamastackclient.BetaDatasetRegisterResponseSourceRows:
default:
  fmt.Errorf("no variant present")
}

func (BetaDatasetRegisterResponseSourceUnion) AsRows

func (BetaDatasetRegisterResponseSourceUnion) AsUri

func (BetaDatasetRegisterResponseSourceUnion) RawJSON

Returns the unmodified JSON received from the API

func (*BetaDatasetRegisterResponseSourceUnion) UnmarshalJSON

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

type BetaDatasetRegisterResponseSourceUri

type BetaDatasetRegisterResponseSourceUri 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 (BetaDatasetRegisterResponseSourceUri) RawJSON

Returns the unmodified JSON received from the API

func (*BetaDatasetRegisterResponseSourceUri) UnmarshalJSON

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

type BetaDatasetService

type BetaDatasetService struct {
	Options []option.RequestOption
}

BetaDatasetService 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 NewBetaDatasetService method instead.

func NewBetaDatasetService

func NewBetaDatasetService(opts ...option.RequestOption) (r BetaDatasetService)

NewBetaDatasetService 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 (*BetaDatasetService) Appendrows

func (r *BetaDatasetService) Appendrows(ctx context.Context, datasetID string, body BetaDatasetAppendrowsParams, opts ...option.RequestOption) (err error)

Append rows to a dataset.

func (*BetaDatasetService) Get

func (r *BetaDatasetService) Get(ctx context.Context, datasetID string, opts ...option.RequestOption) (res *BetaDatasetGetResponse, err error)

Get a dataset by its ID.

func (*BetaDatasetService) Iterrows

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 (*BetaDatasetService) List

List all datasets.

func (*BetaDatasetService) Register deprecated

Register a new dataset.

Deprecated: deprecated

func (*BetaDatasetService) Unregister deprecated

func (r *BetaDatasetService) Unregister(ctx context.Context, datasetID string, opts ...option.RequestOption) (err error)

Unregister a dataset by its ID.

Deprecated: deprecated

type BetaService

type BetaService struct {
	Options  []option.RequestOption
	Datasets BetaDatasetService
}

BetaService 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 NewBetaService method instead.

func NewBetaService

func NewBetaService(opts ...option.RequestOption) (r BetaService)

NewBetaService 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 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"`
	// Token usage information (typically included in final chunk with stream_options)
	Usage ChatCompletionChunkUsage `json:"usage"`
	// 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
		Usage       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 reasoning content from the model (non-standard, for o1/o3 models)
	ReasoningContent string `json:"reasoning_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
		ReasoningContent 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 ChatCompletionChunkUsage

type ChatCompletionChunkUsage struct {
	// Number of tokens in the completion
	CompletionTokens int64 `json:"completion_tokens,required"`
	// Number of tokens in the prompt
	PromptTokens int64 `json:"prompt_tokens,required"`
	// Total tokens used (prompt + completion)
	TotalTokens int64 `json:"total_tokens,required"`
	// Token details for output tokens in OpenAI chat completion usage.
	CompletionTokensDetails ChatCompletionChunkUsageCompletionTokensDetails `json:"completion_tokens_details"`
	// Token details for prompt tokens in OpenAI chat completion usage.
	PromptTokensDetails ChatCompletionChunkUsagePromptTokensDetails `json:"prompt_tokens_details"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CompletionTokens        respjson.Field
		PromptTokens            respjson.Field
		TotalTokens             respjson.Field
		CompletionTokensDetails respjson.Field
		PromptTokensDetails     respjson.Field
		ExtraFields             map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token usage information (typically included in final chunk with stream_options)

func (ChatCompletionChunkUsage) RawJSON

func (r ChatCompletionChunkUsage) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChatCompletionChunkUsage) UnmarshalJSON

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

type ChatCompletionChunkUsageCompletionTokensDetails

type ChatCompletionChunkUsageCompletionTokensDetails struct {
	// Number of tokens used for reasoning (o1/o3 models)
	ReasoningTokens int64 `json:"reasoning_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ReasoningTokens respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token details for output tokens in OpenAI chat completion usage.

func (ChatCompletionChunkUsageCompletionTokensDetails) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionChunkUsageCompletionTokensDetails) UnmarshalJSON

type ChatCompletionChunkUsagePromptTokensDetails

type ChatCompletionChunkUsagePromptTokensDetails struct {
	// Number of tokens retrieved from cache
	CachedTokens int64 `json:"cached_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CachedTokens respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token details for prompt tokens in OpenAI chat completion usage.

func (ChatCompletionChunkUsagePromptTokensDetails) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionChunkUsagePromptTokensDetails) UnmarshalJSON

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

type ChatCompletionGetResponse

type ChatCompletionGetResponse struct {
	// The ID of the chat completion
	ID string `json:"id,required"`
	// List of choices
	Choices []ChatCompletionGetResponseChoice `json:"choices,required"`
	// The Unix timestamp in seconds when the chat completion was created
	Created       int64                                        `json:"created,required"`
	InputMessages []ChatCompletionGetResponseInputMessageUnion `json:"input_messages,required"`
	// The model that was used to generate the chat completion
	Model string `json:"model,required"`
	// The object type, which will be "chat.completion"
	Object constant.ChatCompletion `json:"object,required"`
	// Token usage information for the completion
	Usage ChatCompletionGetResponseUsage `json:"usage"`
	// 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
		Usage         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 ChatCompletionGetResponseUsage

type ChatCompletionGetResponseUsage struct {
	// Number of tokens in the completion
	CompletionTokens int64 `json:"completion_tokens,required"`
	// Number of tokens in the prompt
	PromptTokens int64 `json:"prompt_tokens,required"`
	// Total tokens used (prompt + completion)
	TotalTokens int64 `json:"total_tokens,required"`
	// Token details for output tokens in OpenAI chat completion usage.
	CompletionTokensDetails ChatCompletionGetResponseUsageCompletionTokensDetails `json:"completion_tokens_details"`
	// Token details for prompt tokens in OpenAI chat completion usage.
	PromptTokensDetails ChatCompletionGetResponseUsagePromptTokensDetails `json:"prompt_tokens_details"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CompletionTokens        respjson.Field
		PromptTokens            respjson.Field
		TotalTokens             respjson.Field
		CompletionTokensDetails respjson.Field
		PromptTokensDetails     respjson.Field
		ExtraFields             map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token usage information for the completion

func (ChatCompletionGetResponseUsage) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseUsage) UnmarshalJSON

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

type ChatCompletionGetResponseUsageCompletionTokensDetails

type ChatCompletionGetResponseUsageCompletionTokensDetails struct {
	// Number of tokens used for reasoning (o1/o3 models)
	ReasoningTokens int64 `json:"reasoning_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ReasoningTokens respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token details for output tokens in OpenAI chat completion usage.

func (ChatCompletionGetResponseUsageCompletionTokensDetails) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseUsageCompletionTokensDetails) UnmarshalJSON

type ChatCompletionGetResponseUsagePromptTokensDetails

type ChatCompletionGetResponseUsagePromptTokensDetails struct {
	// Number of tokens retrieved from cache
	CachedTokens int64 `json:"cached_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CachedTokens respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token details for prompt tokens in OpenAI chat completion usage.

func (ChatCompletionGetResponseUsagePromptTokensDetails) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionGetResponseUsagePromptTokensDetails) 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"`
	// Token usage information for the completion
	Usage ChatCompletionListResponseUsage `json:"usage"`
	// 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
		Usage         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 ChatCompletionListResponseUsage

type ChatCompletionListResponseUsage struct {
	// Number of tokens in the completion
	CompletionTokens int64 `json:"completion_tokens,required"`
	// Number of tokens in the prompt
	PromptTokens int64 `json:"prompt_tokens,required"`
	// Total tokens used (prompt + completion)
	TotalTokens int64 `json:"total_tokens,required"`
	// Token details for output tokens in OpenAI chat completion usage.
	CompletionTokensDetails ChatCompletionListResponseUsageCompletionTokensDetails `json:"completion_tokens_details"`
	// Token details for prompt tokens in OpenAI chat completion usage.
	PromptTokensDetails ChatCompletionListResponseUsagePromptTokensDetails `json:"prompt_tokens_details"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CompletionTokens        respjson.Field
		PromptTokens            respjson.Field
		TotalTokens             respjson.Field
		CompletionTokensDetails respjson.Field
		PromptTokensDetails     respjson.Field
		ExtraFields             map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token usage information for the completion

func (ChatCompletionListResponseUsage) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseUsage) UnmarshalJSON

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

type ChatCompletionListResponseUsageCompletionTokensDetails

type ChatCompletionListResponseUsageCompletionTokensDetails struct {
	// Number of tokens used for reasoning (o1/o3 models)
	ReasoningTokens int64 `json:"reasoning_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ReasoningTokens respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token details for output tokens in OpenAI chat completion usage.

func (ChatCompletionListResponseUsageCompletionTokensDetails) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseUsageCompletionTokensDetails) UnmarshalJSON

type ChatCompletionListResponseUsagePromptTokensDetails

type ChatCompletionListResponseUsagePromptTokensDetails struct {
	// Number of tokens retrieved from cache
	CachedTokens int64 `json:"cached_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CachedTokens respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token details for prompt tokens in OpenAI chat completion usage.

func (ChatCompletionListResponseUsagePromptTokensDetails) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionListResponseUsagePromptTokensDetails) 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"`
	// Token usage information for the completion
	Usage ChatCompletionNewResponseOpenAIChatCompletionUsage `json:"usage"`
	// 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
		Usage       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 ChatCompletionNewResponseOpenAIChatCompletionUsage

type ChatCompletionNewResponseOpenAIChatCompletionUsage struct {
	// Number of tokens in the completion
	CompletionTokens int64 `json:"completion_tokens,required"`
	// Number of tokens in the prompt
	PromptTokens int64 `json:"prompt_tokens,required"`
	// Total tokens used (prompt + completion)
	TotalTokens int64 `json:"total_tokens,required"`
	// Token details for output tokens in OpenAI chat completion usage.
	CompletionTokensDetails ChatCompletionNewResponseOpenAIChatCompletionUsageCompletionTokensDetails `json:"completion_tokens_details"`
	// Token details for prompt tokens in OpenAI chat completion usage.
	PromptTokensDetails ChatCompletionNewResponseOpenAIChatCompletionUsagePromptTokensDetails `json:"prompt_tokens_details"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CompletionTokens        respjson.Field
		PromptTokens            respjson.Field
		TotalTokens             respjson.Field
		CompletionTokensDetails respjson.Field
		PromptTokensDetails     respjson.Field
		ExtraFields             map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token usage information for the completion

func (ChatCompletionNewResponseOpenAIChatCompletionUsage) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionUsage) UnmarshalJSON

type ChatCompletionNewResponseOpenAIChatCompletionUsageCompletionTokensDetails

type ChatCompletionNewResponseOpenAIChatCompletionUsageCompletionTokensDetails struct {
	// Number of tokens used for reasoning (o1/o3 models)
	ReasoningTokens int64 `json:"reasoning_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ReasoningTokens respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token details for output tokens in OpenAI chat completion usage.

func (ChatCompletionNewResponseOpenAIChatCompletionUsageCompletionTokensDetails) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionUsageCompletionTokensDetails) UnmarshalJSON

type ChatCompletionNewResponseOpenAIChatCompletionUsagePromptTokensDetails

type ChatCompletionNewResponseOpenAIChatCompletionUsagePromptTokensDetails struct {
	// Number of tokens retrieved from cache
	CachedTokens int64 `json:"cached_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CachedTokens respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Token details for prompt tokens in OpenAI chat completion usage.

func (ChatCompletionNewResponseOpenAIChatCompletionUsagePromptTokensDetails) RawJSON

Returns the unmodified JSON received from the API

func (*ChatCompletionNewResponseOpenAIChatCompletionUsagePromptTokensDetails) 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"`
	// This field is a union of [ChatCompletionNewResponseOpenAIChatCompletionUsage],
	// [ChatCompletionChunkUsage]
	Usage ChatCompletionNewResponseUnionUsage `json:"usage"`
	JSON  struct {
		ID      respjson.Field
		Choices respjson.Field
		Created respjson.Field
		Model   respjson.Field
		Object  respjson.Field
		Usage   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 ChatCompletionNewResponseUnionUsage

type ChatCompletionNewResponseUnionUsage struct {
	CompletionTokens int64 `json:"completion_tokens"`
	PromptTokens     int64 `json:"prompt_tokens"`
	TotalTokens      int64 `json:"total_tokens"`
	// This field is a union of
	// [ChatCompletionNewResponseOpenAIChatCompletionUsageCompletionTokensDetails],
	// [ChatCompletionChunkUsageCompletionTokensDetails]
	CompletionTokensDetails ChatCompletionNewResponseUnionUsageCompletionTokensDetails `json:"completion_tokens_details"`
	// This field is a union of
	// [ChatCompletionNewResponseOpenAIChatCompletionUsagePromptTokensDetails],
	// [ChatCompletionChunkUsagePromptTokensDetails]
	PromptTokensDetails ChatCompletionNewResponseUnionUsagePromptTokensDetails `json:"prompt_tokens_details"`
	JSON                struct {
		CompletionTokens        respjson.Field
		PromptTokens            respjson.Field
		TotalTokens             respjson.Field
		CompletionTokensDetails respjson.Field
		PromptTokensDetails     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ChatCompletionNewResponseUnionUsage is an implicit subunion of ChatCompletionNewResponseUnion. ChatCompletionNewResponseUnionUsage provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ChatCompletionNewResponseUnion.

func (*ChatCompletionNewResponseUnionUsage) UnmarshalJSON

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

type ChatCompletionNewResponseUnionUsageCompletionTokensDetails

type ChatCompletionNewResponseUnionUsageCompletionTokensDetails struct {
	ReasoningTokens int64 `json:"reasoning_tokens"`
	JSON            struct {
		ReasoningTokens respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ChatCompletionNewResponseUnionUsageCompletionTokensDetails is an implicit subunion of ChatCompletionNewResponseUnion. ChatCompletionNewResponseUnionUsageCompletionTokensDetails provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ChatCompletionNewResponseUnion.

func (*ChatCompletionNewResponseUnionUsageCompletionTokensDetails) UnmarshalJSON

type ChatCompletionNewResponseUnionUsagePromptTokensDetails

type ChatCompletionNewResponseUnionUsagePromptTokensDetails struct {
	CachedTokens int64 `json:"cached_tokens"`
	JSON         struct {
		CachedTokens respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ChatCompletionNewResponseUnionUsagePromptTokensDetails is an implicit subunion of ChatCompletionNewResponseUnion. ChatCompletionNewResponseUnionUsagePromptTokensDetails provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the ChatCompletionNewResponseUnion.

func (*ChatCompletionNewResponseUnionUsagePromptTokensDetails) UnmarshalJSON

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)

Get chat completion. Describe a chat completion by its ID.

func (*ChatCompletionService) List

List chat completions.

func (*ChatCompletionService) ListAutoPaging

List chat completions.

func (*ChatCompletionService) New

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

func (*ChatCompletionService) NewStreaming

Create chat completions. 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
	Prompts          PromptService
	Conversations    ConversationService
	Inspect          InspectService
	Embeddings       EmbeddingService
	Chat             ChatService
	Completions      CompletionService
	VectorIo         VectorIoService
	VectorStores     VectorStoreService
	Models           ModelService
	Providers        ProviderService
	Routes           RouteService
	Moderations      ModerationService
	Safety           SafetyService
	Shields          ShieldService
	Scoring          ScoringService
	ScoringFunctions ScoringFunctionService
	Files            FileService
	Alpha            AlphaService
	Beta             BetaService
}

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 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"`
	// (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"`
	// (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

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

func (*CompletionService) NewStreaming

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

type ConversationDeleteResponse

type ConversationDeleteResponse struct {
	ID      string `json:"id,required"`
	Deleted bool   `json:"deleted,required"`
	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 for deleted conversation.

func (ConversationDeleteResponse) RawJSON

func (r ConversationDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ConversationDeleteResponse) UnmarshalJSON

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

type ConversationItemGetParams

type ConversationItemGetParams struct {
	ConversationID string `path:"conversation_id,required" json:"-"`
	// contains filtered or unexported fields
}

type ConversationItemGetResponseFileSearchCall

type ConversationItemGetResponseFileSearchCall 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 []ConversationItemGetResponseFileSearchCallResult `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 (ConversationItemGetResponseFileSearchCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseFileSearchCall) UnmarshalJSON

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

type ConversationItemGetResponseFileSearchCallResult

type ConversationItemGetResponseFileSearchCallResult struct {
	// (Optional) Key-value attributes associated with the file
	Attributes map[string]ConversationItemGetResponseFileSearchCallResultAttributeUnion `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 (ConversationItemGetResponseFileSearchCallResult) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseFileSearchCallResult) UnmarshalJSON

type ConversationItemGetResponseFileSearchCallResultAttributeUnion

type ConversationItemGetResponseFileSearchCallResultAttributeUnion 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:"-"`
}

ConversationItemGetResponseFileSearchCallResultAttributeUnion 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 (ConversationItemGetResponseFileSearchCallResultAttributeUnion) AsAnyArray

func (ConversationItemGetResponseFileSearchCallResultAttributeUnion) AsBool

func (ConversationItemGetResponseFileSearchCallResultAttributeUnion) AsFloat

func (ConversationItemGetResponseFileSearchCallResultAttributeUnion) AsString

func (ConversationItemGetResponseFileSearchCallResultAttributeUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseFileSearchCallResultAttributeUnion) UnmarshalJSON

type ConversationItemGetResponseFunctionCall

type ConversationItemGetResponseFunctionCall 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 (ConversationItemGetResponseFunctionCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseFunctionCall) UnmarshalJSON

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

type ConversationItemGetResponseFunctionCallOutput

type ConversationItemGetResponseFunctionCallOutput 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 (ConversationItemGetResponseFunctionCallOutput) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseFunctionCallOutput) UnmarshalJSON

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

type ConversationItemGetResponseMcpApprovalRequest

type ConversationItemGetResponseMcpApprovalRequest struct {
	ID          string                      `json:"id,required"`
	Arguments   string                      `json:"arguments,required"`
	Name        string                      `json:"name,required"`
	ServerLabel string                      `json:"server_label,required"`
	Type        constant.McpApprovalRequest `json:"type,required"`
	// 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
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request for human approval of a tool invocation.

func (ConversationItemGetResponseMcpApprovalRequest) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseMcpApprovalRequest) UnmarshalJSON

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

type ConversationItemGetResponseMcpApprovalResponse

type ConversationItemGetResponseMcpApprovalResponse struct {
	ApprovalRequestID string                       `json:"approval_request_id,required"`
	Approve           bool                         `json:"approve,required"`
	Type              constant.McpApprovalResponse `json:"type,required"`
	ID                string                       `json:"id"`
	Reason            string                       `json:"reason"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ApprovalRequestID respjson.Field
		Approve           respjson.Field
		Type              respjson.Field
		ID                respjson.Field
		Reason            respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A response to an MCP approval request.

func (ConversationItemGetResponseMcpApprovalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseMcpApprovalResponse) UnmarshalJSON

type ConversationItemGetResponseMcpCall

type ConversationItemGetResponseMcpCall 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 (ConversationItemGetResponseMcpCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseMcpCall) UnmarshalJSON

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

type ConversationItemGetResponseMcpListTools

type ConversationItemGetResponseMcpListTools 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 []ConversationItemGetResponseMcpListToolsTool `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 (ConversationItemGetResponseMcpListTools) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseMcpListTools) UnmarshalJSON

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

type ConversationItemGetResponseMcpListToolsTool

type ConversationItemGetResponseMcpListToolsTool struct {
	// JSON schema defining the tool's input parameters
	InputSchema map[string]ConversationItemGetResponseMcpListToolsToolInputSchemaUnion `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 (ConversationItemGetResponseMcpListToolsTool) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseMcpListToolsTool) UnmarshalJSON

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

type ConversationItemGetResponseMcpListToolsToolInputSchemaUnion

type ConversationItemGetResponseMcpListToolsToolInputSchemaUnion 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:"-"`
}

ConversationItemGetResponseMcpListToolsToolInputSchemaUnion 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 (ConversationItemGetResponseMcpListToolsToolInputSchemaUnion) AsAnyArray

func (ConversationItemGetResponseMcpListToolsToolInputSchemaUnion) AsBool

func (ConversationItemGetResponseMcpListToolsToolInputSchemaUnion) AsFloat

func (ConversationItemGetResponseMcpListToolsToolInputSchemaUnion) AsString

func (ConversationItemGetResponseMcpListToolsToolInputSchemaUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseMcpListToolsToolInputSchemaUnion) UnmarshalJSON

type ConversationItemGetResponseMessage

type ConversationItemGetResponseMessage struct {
	Content ConversationItemGetResponseMessageContentUnion `json:"content,required"`
	// Any of "system", "developer", "user", "assistant".
	Role   ConversationItemGetResponseMessageRole `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 (ConversationItemGetResponseMessage) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseMessage) UnmarshalJSON

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

type ConversationItemGetResponseMessageContentArrayItemDetail

type ConversationItemGetResponseMessageContentArrayItemDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ConversationItemGetResponseMessageContentArrayItemDetailLow  ConversationItemGetResponseMessageContentArrayItemDetail = "low"
	ConversationItemGetResponseMessageContentArrayItemDetailHigh ConversationItemGetResponseMessageContentArrayItemDetail = "high"
	ConversationItemGetResponseMessageContentArrayItemDetailAuto ConversationItemGetResponseMessageContentArrayItemDetail = "auto"
)

type ConversationItemGetResponseMessageContentArrayItemInputFile

type ConversationItemGetResponseMessageContentArrayItemInputFile struct {
	// The type of the input item. Always `input_file`.
	Type constant.InputFile `json:"type,required"`
	// The data of the file to be sent to the model.
	FileData string `json:"file_data"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// The URL of the file to be sent to the model.
	FileURL string `json:"file_url"`
	// The name of the file to be sent to the model.
	Filename string `json:"filename"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		FileData    respjson.Field
		FileID      respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File content for input messages in OpenAI response format.

func (ConversationItemGetResponseMessageContentArrayItemInputFile) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseMessageContentArrayItemInputFile) UnmarshalJSON

type ConversationItemGetResponseMessageContentArrayItemInputImage

type ConversationItemGetResponseMessageContentArrayItemInputImage struct {
	// Level of detail for image processing, can be "low", "high", or "auto"
	//
	// Any of "low", "high", "auto".
	Detail ConversationItemGetResponseMessageContentArrayItemInputImageDetail `json:"detail,required"`
	// Content type identifier, always "input_image"
	Type constant.InputImage `json:"type,required"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// (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
		FileID      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 (ConversationItemGetResponseMessageContentArrayItemInputImage) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseMessageContentArrayItemInputImage) UnmarshalJSON

type ConversationItemGetResponseMessageContentArrayItemInputImageDetail

type ConversationItemGetResponseMessageContentArrayItemInputImageDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ConversationItemGetResponseMessageContentArrayItemInputImageDetailLow  ConversationItemGetResponseMessageContentArrayItemInputImageDetail = "low"
	ConversationItemGetResponseMessageContentArrayItemInputImageDetailHigh ConversationItemGetResponseMessageContentArrayItemInputImageDetail = "high"
	ConversationItemGetResponseMessageContentArrayItemInputImageDetailAuto ConversationItemGetResponseMessageContentArrayItemInputImageDetail = "auto"
)

type ConversationItemGetResponseMessageContentArrayItemInputText

type ConversationItemGetResponseMessageContentArrayItemInputText 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 (ConversationItemGetResponseMessageContentArrayItemInputText) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseMessageContentArrayItemInputText) UnmarshalJSON

type ConversationItemGetResponseMessageContentArrayItemUnion

type ConversationItemGetResponseMessageContentArrayItemUnion struct {
	// This field is from variant
	// [ConversationItemGetResponseMessageContentArrayItemInputText].
	Text string `json:"text"`
	// Any of "input_text", "input_image", "input_file".
	Type string `json:"type"`
	// This field is from variant
	// [ConversationItemGetResponseMessageContentArrayItemInputImage].
	Detail ConversationItemGetResponseMessageContentArrayItemInputImageDetail `json:"detail"`
	FileID string                                                             `json:"file_id"`
	// This field is from variant
	// [ConversationItemGetResponseMessageContentArrayItemInputImage].
	ImageURL string `json:"image_url"`
	// This field is from variant
	// [ConversationItemGetResponseMessageContentArrayItemInputFile].
	FileData string `json:"file_data"`
	// This field is from variant
	// [ConversationItemGetResponseMessageContentArrayItemInputFile].
	FileURL string `json:"file_url"`
	// This field is from variant
	// [ConversationItemGetResponseMessageContentArrayItemInputFile].
	Filename string `json:"filename"`
	JSON     struct {
		Text     respjson.Field
		Type     respjson.Field
		Detail   respjson.Field
		FileID   respjson.Field
		ImageURL respjson.Field
		FileData respjson.Field
		FileURL  respjson.Field
		Filename respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemGetResponseMessageContentArrayItemUnion contains all possible properties and values from ConversationItemGetResponseMessageContentArrayItemInputText, ConversationItemGetResponseMessageContentArrayItemInputImage, ConversationItemGetResponseMessageContentArrayItemInputFile.

Use the ConversationItemGetResponseMessageContentArrayItemUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ConversationItemGetResponseMessageContentArrayItemUnion) AsAny

func (u ConversationItemGetResponseMessageContentArrayItemUnion) AsAny() anyConversationItemGetResponseMessageContentArrayItem

Use the following switch statement to find the correct variant

switch variant := ConversationItemGetResponseMessageContentArrayItemUnion.AsAny().(type) {
case llamastackclient.ConversationItemGetResponseMessageContentArrayItemInputText:
case llamastackclient.ConversationItemGetResponseMessageContentArrayItemInputImage:
case llamastackclient.ConversationItemGetResponseMessageContentArrayItemInputFile:
default:
  fmt.Errorf("no variant present")
}

func (ConversationItemGetResponseMessageContentArrayItemUnion) AsInputFile

func (ConversationItemGetResponseMessageContentArrayItemUnion) AsInputImage

func (ConversationItemGetResponseMessageContentArrayItemUnion) AsInputText

func (ConversationItemGetResponseMessageContentArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseMessageContentArrayItemUnion) UnmarshalJSON

type ConversationItemGetResponseMessageContentUnion

type ConversationItemGetResponseMessageContentUnion 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
	// [[]ConversationItemGetResponseMessageContentArrayItemUnion] instead of an
	// object.
	OfVariant2 []ConversationItemGetResponseMessageContentArrayItemUnion `json:",inline"`
	JSON       struct {
		OfString   respjson.Field
		OfVariant2 respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemGetResponseMessageContentUnion contains all possible properties and values from [string], [[]ConversationItemGetResponseMessageContentArrayItemUnion], [[]ConversationItemGetResponseMessageContentArrayItemUnion].

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 OfVariant2]

func (ConversationItemGetResponseMessageContentUnion) AsConversationItemGetResponseMessageContentArray

func (u ConversationItemGetResponseMessageContentUnion) AsConversationItemGetResponseMessageContentArray() (v []ConversationItemGetResponseMessageContentArrayItemUnion)

func (ConversationItemGetResponseMessageContentUnion) AsString

func (ConversationItemGetResponseMessageContentUnion) AsVariant2

func (ConversationItemGetResponseMessageContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseMessageContentUnion) UnmarshalJSON

type ConversationItemGetResponseMessageRole

type ConversationItemGetResponseMessageRole string
const (
	ConversationItemGetResponseMessageRoleSystem    ConversationItemGetResponseMessageRole = "system"
	ConversationItemGetResponseMessageRoleDeveloper ConversationItemGetResponseMessageRole = "developer"
	ConversationItemGetResponseMessageRoleUser      ConversationItemGetResponseMessageRole = "user"
	ConversationItemGetResponseMessageRoleAssistant ConversationItemGetResponseMessageRole = "assistant"
)

type ConversationItemGetResponseRole

type ConversationItemGetResponseRole string
const (
	ConversationItemGetResponseRoleSystem    ConversationItemGetResponseRole = "system"
	ConversationItemGetResponseRoleDeveloper ConversationItemGetResponseRole = "developer"
	ConversationItemGetResponseRoleUser      ConversationItemGetResponseRole = "user"
	ConversationItemGetResponseRoleAssistant ConversationItemGetResponseRole = "assistant"
)

type ConversationItemGetResponseUnion

type ConversationItemGetResponseUnion struct {
	// This field is from variant [ConversationItemGetResponseMessage].
	Content ConversationItemGetResponseMessageContentUnion `json:"content"`
	// This field is from variant [ConversationItemGetResponseMessage].
	Role ConversationItemGetResponseMessageRole `json:"role"`
	// Any of "message", "web_search_call", "file_search_call", "function_call",
	// "function_call_output", "mcp_approval_request", "mcp_approval_response",
	// "mcp_call", "mcp_list_tools".
	Type   string `json:"type"`
	ID     string `json:"id"`
	Status string `json:"status"`
	// This field is from variant [ConversationItemGetResponseFileSearchCall].
	Queries []string `json:"queries"`
	// This field is from variant [ConversationItemGetResponseFileSearchCall].
	Results     []ConversationItemGetResponseFileSearchCallResult `json:"results"`
	Arguments   string                                            `json:"arguments"`
	CallID      string                                            `json:"call_id"`
	Name        string                                            `json:"name"`
	Output      string                                            `json:"output"`
	ServerLabel string                                            `json:"server_label"`
	// This field is from variant [ConversationItemGetResponseMcpApprovalResponse].
	ApprovalRequestID string `json:"approval_request_id"`
	// This field is from variant [ConversationItemGetResponseMcpApprovalResponse].
	Approve bool `json:"approve"`
	// This field is from variant [ConversationItemGetResponseMcpApprovalResponse].
	Reason string `json:"reason"`
	// This field is from variant [ConversationItemGetResponseMcpCall].
	Error string `json:"error"`
	// This field is from variant [ConversationItemGetResponseMcpListTools].
	Tools []ConversationItemGetResponseMcpListToolsTool `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
		Output            respjson.Field
		ServerLabel       respjson.Field
		ApprovalRequestID respjson.Field
		Approve           respjson.Field
		Reason            respjson.Field
		Error             respjson.Field
		Tools             respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemGetResponseUnion contains all possible properties and values from ConversationItemGetResponseMessage, ConversationItemGetResponseWebSearchCall, ConversationItemGetResponseFileSearchCall, ConversationItemGetResponseFunctionCall, ConversationItemGetResponseFunctionCallOutput, ConversationItemGetResponseMcpApprovalRequest, ConversationItemGetResponseMcpApprovalResponse, ConversationItemGetResponseMcpCall, ConversationItemGetResponseMcpListTools.

Use the ConversationItemGetResponseUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ConversationItemGetResponseUnion) AsAny

func (u ConversationItemGetResponseUnion) AsAny() anyConversationItemGetResponse

Use the following switch statement to find the correct variant

switch variant := ConversationItemGetResponseUnion.AsAny().(type) {
case llamastackclient.ConversationItemGetResponseMessage:
case llamastackclient.ConversationItemGetResponseWebSearchCall:
case llamastackclient.ConversationItemGetResponseFileSearchCall:
case llamastackclient.ConversationItemGetResponseFunctionCall:
case llamastackclient.ConversationItemGetResponseFunctionCallOutput:
case llamastackclient.ConversationItemGetResponseMcpApprovalRequest:
case llamastackclient.ConversationItemGetResponseMcpApprovalResponse:
case llamastackclient.ConversationItemGetResponseMcpCall:
case llamastackclient.ConversationItemGetResponseMcpListTools:
default:
  fmt.Errorf("no variant present")
}

func (ConversationItemGetResponseUnion) AsFileSearchCall

func (ConversationItemGetResponseUnion) AsFunctionCall

func (ConversationItemGetResponseUnion) AsFunctionCallOutput

func (ConversationItemGetResponseUnion) AsMcpApprovalRequest

func (ConversationItemGetResponseUnion) AsMcpApprovalResponse

func (ConversationItemGetResponseUnion) AsMcpCall

func (ConversationItemGetResponseUnion) AsMcpListTools

func (ConversationItemGetResponseUnion) AsMessage

func (ConversationItemGetResponseUnion) AsWebSearchCall

func (ConversationItemGetResponseUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseUnion) UnmarshalJSON

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

type ConversationItemGetResponseWebSearchCall

type ConversationItemGetResponseWebSearchCall 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 (ConversationItemGetResponseWebSearchCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemGetResponseWebSearchCall) UnmarshalJSON

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

type ConversationItemListParams

type ConversationItemListParams struct {
	// An item ID to list items after, used in pagination.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// A limit on the number of objects to be returned (1-100, default 20).
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Specify additional output data to include in the response.
	//
	// Any of "web_search_call.action.sources", "code_interpreter_call.outputs",
	// "computer_call_output.output.image_url", "file_search_call.results",
	// "message.input_image.image_url", "message.output_text.logprobs",
	// "reasoning.encrypted_content".
	Include []string `query:"include,omitzero" json:"-"`
	// The order to return items in (asc or desc, default desc).
	//
	// Any of "asc", "desc".
	Order ConversationItemListParamsOrder `query:"order,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ConversationItemListParams) URLQuery

func (r ConversationItemListParams) URLQuery() (v url.Values, err error)

URLQuery serializes ConversationItemListParams's query parameters as `url.Values`.

type ConversationItemListParamsOrder

type ConversationItemListParamsOrder string

The order to return items in (asc or desc, default desc).

const (
	ConversationItemListParamsOrderAsc  ConversationItemListParamsOrder = "asc"
	ConversationItemListParamsOrderDesc ConversationItemListParamsOrder = "desc"
)

type ConversationItemListResponseFileSearchCall

type ConversationItemListResponseFileSearchCall 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 []ConversationItemListResponseFileSearchCallResult `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 (ConversationItemListResponseFileSearchCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseFileSearchCall) UnmarshalJSON

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

type ConversationItemListResponseFileSearchCallResult

type ConversationItemListResponseFileSearchCallResult struct {
	// (Optional) Key-value attributes associated with the file
	Attributes map[string]ConversationItemListResponseFileSearchCallResultAttributeUnion `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 (ConversationItemListResponseFileSearchCallResult) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseFileSearchCallResult) UnmarshalJSON

type ConversationItemListResponseFileSearchCallResultAttributeUnion

type ConversationItemListResponseFileSearchCallResultAttributeUnion 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:"-"`
}

ConversationItemListResponseFileSearchCallResultAttributeUnion 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 (ConversationItemListResponseFileSearchCallResultAttributeUnion) AsAnyArray

func (ConversationItemListResponseFileSearchCallResultAttributeUnion) AsBool

func (ConversationItemListResponseFileSearchCallResultAttributeUnion) AsFloat

func (ConversationItemListResponseFileSearchCallResultAttributeUnion) AsString

func (ConversationItemListResponseFileSearchCallResultAttributeUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseFileSearchCallResultAttributeUnion) UnmarshalJSON

type ConversationItemListResponseFunctionCall

type ConversationItemListResponseFunctionCall 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 (ConversationItemListResponseFunctionCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseFunctionCall) UnmarshalJSON

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

type ConversationItemListResponseFunctionCallOutput

type ConversationItemListResponseFunctionCallOutput 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 (ConversationItemListResponseFunctionCallOutput) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseFunctionCallOutput) UnmarshalJSON

type ConversationItemListResponseMcpApprovalRequest

type ConversationItemListResponseMcpApprovalRequest struct {
	ID          string                      `json:"id,required"`
	Arguments   string                      `json:"arguments,required"`
	Name        string                      `json:"name,required"`
	ServerLabel string                      `json:"server_label,required"`
	Type        constant.McpApprovalRequest `json:"type,required"`
	// 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
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request for human approval of a tool invocation.

func (ConversationItemListResponseMcpApprovalRequest) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseMcpApprovalRequest) UnmarshalJSON

type ConversationItemListResponseMcpApprovalResponse

type ConversationItemListResponseMcpApprovalResponse struct {
	ApprovalRequestID string                       `json:"approval_request_id,required"`
	Approve           bool                         `json:"approve,required"`
	Type              constant.McpApprovalResponse `json:"type,required"`
	ID                string                       `json:"id"`
	Reason            string                       `json:"reason"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ApprovalRequestID respjson.Field
		Approve           respjson.Field
		Type              respjson.Field
		ID                respjson.Field
		Reason            respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A response to an MCP approval request.

func (ConversationItemListResponseMcpApprovalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseMcpApprovalResponse) UnmarshalJSON

type ConversationItemListResponseMcpCall

type ConversationItemListResponseMcpCall 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 (ConversationItemListResponseMcpCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseMcpCall) UnmarshalJSON

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

type ConversationItemListResponseMcpListTools

type ConversationItemListResponseMcpListTools 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 []ConversationItemListResponseMcpListToolsTool `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 (ConversationItemListResponseMcpListTools) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseMcpListTools) UnmarshalJSON

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

type ConversationItemListResponseMcpListToolsTool

type ConversationItemListResponseMcpListToolsTool struct {
	// JSON schema defining the tool's input parameters
	InputSchema map[string]ConversationItemListResponseMcpListToolsToolInputSchemaUnion `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 (ConversationItemListResponseMcpListToolsTool) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseMcpListToolsTool) UnmarshalJSON

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

type ConversationItemListResponseMcpListToolsToolInputSchemaUnion

type ConversationItemListResponseMcpListToolsToolInputSchemaUnion 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:"-"`
}

ConversationItemListResponseMcpListToolsToolInputSchemaUnion 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 (ConversationItemListResponseMcpListToolsToolInputSchemaUnion) AsAnyArray

func (ConversationItemListResponseMcpListToolsToolInputSchemaUnion) AsBool

func (ConversationItemListResponseMcpListToolsToolInputSchemaUnion) AsFloat

func (ConversationItemListResponseMcpListToolsToolInputSchemaUnion) AsString

func (ConversationItemListResponseMcpListToolsToolInputSchemaUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseMcpListToolsToolInputSchemaUnion) UnmarshalJSON

type ConversationItemListResponseMessage

type ConversationItemListResponseMessage struct {
	Content ConversationItemListResponseMessageContentUnion `json:"content,required"`
	// Any of "system", "developer", "user", "assistant".
	Role   ConversationItemListResponseMessageRole `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 (ConversationItemListResponseMessage) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseMessage) UnmarshalJSON

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

type ConversationItemListResponseMessageContentArrayItemDetail

type ConversationItemListResponseMessageContentArrayItemDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ConversationItemListResponseMessageContentArrayItemDetailLow  ConversationItemListResponseMessageContentArrayItemDetail = "low"
	ConversationItemListResponseMessageContentArrayItemDetailHigh ConversationItemListResponseMessageContentArrayItemDetail = "high"
	ConversationItemListResponseMessageContentArrayItemDetailAuto ConversationItemListResponseMessageContentArrayItemDetail = "auto"
)

type ConversationItemListResponseMessageContentArrayItemInputFile

type ConversationItemListResponseMessageContentArrayItemInputFile struct {
	// The type of the input item. Always `input_file`.
	Type constant.InputFile `json:"type,required"`
	// The data of the file to be sent to the model.
	FileData string `json:"file_data"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// The URL of the file to be sent to the model.
	FileURL string `json:"file_url"`
	// The name of the file to be sent to the model.
	Filename string `json:"filename"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		FileData    respjson.Field
		FileID      respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File content for input messages in OpenAI response format.

func (ConversationItemListResponseMessageContentArrayItemInputFile) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseMessageContentArrayItemInputFile) UnmarshalJSON

type ConversationItemListResponseMessageContentArrayItemInputImage

type ConversationItemListResponseMessageContentArrayItemInputImage struct {
	// Level of detail for image processing, can be "low", "high", or "auto"
	//
	// Any of "low", "high", "auto".
	Detail ConversationItemListResponseMessageContentArrayItemInputImageDetail `json:"detail,required"`
	// Content type identifier, always "input_image"
	Type constant.InputImage `json:"type,required"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// (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
		FileID      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 (ConversationItemListResponseMessageContentArrayItemInputImage) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseMessageContentArrayItemInputImage) UnmarshalJSON

type ConversationItemListResponseMessageContentArrayItemInputImageDetail

type ConversationItemListResponseMessageContentArrayItemInputImageDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ConversationItemListResponseMessageContentArrayItemInputImageDetailLow  ConversationItemListResponseMessageContentArrayItemInputImageDetail = "low"
	ConversationItemListResponseMessageContentArrayItemInputImageDetailHigh ConversationItemListResponseMessageContentArrayItemInputImageDetail = "high"
	ConversationItemListResponseMessageContentArrayItemInputImageDetailAuto ConversationItemListResponseMessageContentArrayItemInputImageDetail = "auto"
)

type ConversationItemListResponseMessageContentArrayItemInputText

type ConversationItemListResponseMessageContentArrayItemInputText 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 (ConversationItemListResponseMessageContentArrayItemInputText) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseMessageContentArrayItemInputText) UnmarshalJSON

type ConversationItemListResponseMessageContentArrayItemUnion

type ConversationItemListResponseMessageContentArrayItemUnion struct {
	// This field is from variant
	// [ConversationItemListResponseMessageContentArrayItemInputText].
	Text string `json:"text"`
	// Any of "input_text", "input_image", "input_file".
	Type string `json:"type"`
	// This field is from variant
	// [ConversationItemListResponseMessageContentArrayItemInputImage].
	Detail ConversationItemListResponseMessageContentArrayItemInputImageDetail `json:"detail"`
	FileID string                                                              `json:"file_id"`
	// This field is from variant
	// [ConversationItemListResponseMessageContentArrayItemInputImage].
	ImageURL string `json:"image_url"`
	// This field is from variant
	// [ConversationItemListResponseMessageContentArrayItemInputFile].
	FileData string `json:"file_data"`
	// This field is from variant
	// [ConversationItemListResponseMessageContentArrayItemInputFile].
	FileURL string `json:"file_url"`
	// This field is from variant
	// [ConversationItemListResponseMessageContentArrayItemInputFile].
	Filename string `json:"filename"`
	JSON     struct {
		Text     respjson.Field
		Type     respjson.Field
		Detail   respjson.Field
		FileID   respjson.Field
		ImageURL respjson.Field
		FileData respjson.Field
		FileURL  respjson.Field
		Filename respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemListResponseMessageContentArrayItemUnion contains all possible properties and values from ConversationItemListResponseMessageContentArrayItemInputText, ConversationItemListResponseMessageContentArrayItemInputImage, ConversationItemListResponseMessageContentArrayItemInputFile.

Use the ConversationItemListResponseMessageContentArrayItemUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ConversationItemListResponseMessageContentArrayItemUnion) AsAny

func (u ConversationItemListResponseMessageContentArrayItemUnion) AsAny() anyConversationItemListResponseMessageContentArrayItem

Use the following switch statement to find the correct variant

switch variant := ConversationItemListResponseMessageContentArrayItemUnion.AsAny().(type) {
case llamastackclient.ConversationItemListResponseMessageContentArrayItemInputText:
case llamastackclient.ConversationItemListResponseMessageContentArrayItemInputImage:
case llamastackclient.ConversationItemListResponseMessageContentArrayItemInputFile:
default:
  fmt.Errorf("no variant present")
}

func (ConversationItemListResponseMessageContentArrayItemUnion) AsInputFile

func (ConversationItemListResponseMessageContentArrayItemUnion) AsInputImage

func (ConversationItemListResponseMessageContentArrayItemUnion) AsInputText

func (ConversationItemListResponseMessageContentArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseMessageContentArrayItemUnion) UnmarshalJSON

type ConversationItemListResponseMessageContentUnion

type ConversationItemListResponseMessageContentUnion 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
	// [[]ConversationItemListResponseMessageContentArrayItemUnion] instead of an
	// object.
	OfVariant2 []ConversationItemListResponseMessageContentArrayItemUnion `json:",inline"`
	JSON       struct {
		OfString   respjson.Field
		OfVariant2 respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemListResponseMessageContentUnion contains all possible properties and values from [string], [[]ConversationItemListResponseMessageContentArrayItemUnion], [[]ConversationItemListResponseMessageContentArrayItemUnion].

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 OfVariant2]

func (ConversationItemListResponseMessageContentUnion) AsConversationItemListResponseMessageContentArray

func (u ConversationItemListResponseMessageContentUnion) AsConversationItemListResponseMessageContentArray() (v []ConversationItemListResponseMessageContentArrayItemUnion)

func (ConversationItemListResponseMessageContentUnion) AsString

func (ConversationItemListResponseMessageContentUnion) AsVariant2

func (ConversationItemListResponseMessageContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseMessageContentUnion) UnmarshalJSON

type ConversationItemListResponseMessageRole

type ConversationItemListResponseMessageRole string
const (
	ConversationItemListResponseMessageRoleSystem    ConversationItemListResponseMessageRole = "system"
	ConversationItemListResponseMessageRoleDeveloper ConversationItemListResponseMessageRole = "developer"
	ConversationItemListResponseMessageRoleUser      ConversationItemListResponseMessageRole = "user"
	ConversationItemListResponseMessageRoleAssistant ConversationItemListResponseMessageRole = "assistant"
)

type ConversationItemListResponseRole

type ConversationItemListResponseRole string
const (
	ConversationItemListResponseRoleSystem    ConversationItemListResponseRole = "system"
	ConversationItemListResponseRoleDeveloper ConversationItemListResponseRole = "developer"
	ConversationItemListResponseRoleUser      ConversationItemListResponseRole = "user"
	ConversationItemListResponseRoleAssistant ConversationItemListResponseRole = "assistant"
)

type ConversationItemListResponseUnion

type ConversationItemListResponseUnion struct {
	// This field is from variant [ConversationItemListResponseMessage].
	Content ConversationItemListResponseMessageContentUnion `json:"content"`
	// This field is from variant [ConversationItemListResponseMessage].
	Role ConversationItemListResponseMessageRole `json:"role"`
	// Any of "message", "web_search_call", "file_search_call", "function_call",
	// "function_call_output", "mcp_approval_request", "mcp_approval_response",
	// "mcp_call", "mcp_list_tools".
	Type   string `json:"type"`
	ID     string `json:"id"`
	Status string `json:"status"`
	// This field is from variant [ConversationItemListResponseFileSearchCall].
	Queries []string `json:"queries"`
	// This field is from variant [ConversationItemListResponseFileSearchCall].
	Results     []ConversationItemListResponseFileSearchCallResult `json:"results"`
	Arguments   string                                             `json:"arguments"`
	CallID      string                                             `json:"call_id"`
	Name        string                                             `json:"name"`
	Output      string                                             `json:"output"`
	ServerLabel string                                             `json:"server_label"`
	// This field is from variant [ConversationItemListResponseMcpApprovalResponse].
	ApprovalRequestID string `json:"approval_request_id"`
	// This field is from variant [ConversationItemListResponseMcpApprovalResponse].
	Approve bool `json:"approve"`
	// This field is from variant [ConversationItemListResponseMcpApprovalResponse].
	Reason string `json:"reason"`
	// This field is from variant [ConversationItemListResponseMcpCall].
	Error string `json:"error"`
	// This field is from variant [ConversationItemListResponseMcpListTools].
	Tools []ConversationItemListResponseMcpListToolsTool `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
		Output            respjson.Field
		ServerLabel       respjson.Field
		ApprovalRequestID respjson.Field
		Approve           respjson.Field
		Reason            respjson.Field
		Error             respjson.Field
		Tools             respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemListResponseUnion contains all possible properties and values from ConversationItemListResponseMessage, ConversationItemListResponseWebSearchCall, ConversationItemListResponseFileSearchCall, ConversationItemListResponseFunctionCall, ConversationItemListResponseFunctionCallOutput, ConversationItemListResponseMcpApprovalRequest, ConversationItemListResponseMcpApprovalResponse, ConversationItemListResponseMcpCall, ConversationItemListResponseMcpListTools.

Use the ConversationItemListResponseUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ConversationItemListResponseUnion) AsAny

func (u ConversationItemListResponseUnion) AsAny() anyConversationItemListResponse

Use the following switch statement to find the correct variant

switch variant := ConversationItemListResponseUnion.AsAny().(type) {
case llamastackclient.ConversationItemListResponseMessage:
case llamastackclient.ConversationItemListResponseWebSearchCall:
case llamastackclient.ConversationItemListResponseFileSearchCall:
case llamastackclient.ConversationItemListResponseFunctionCall:
case llamastackclient.ConversationItemListResponseFunctionCallOutput:
case llamastackclient.ConversationItemListResponseMcpApprovalRequest:
case llamastackclient.ConversationItemListResponseMcpApprovalResponse:
case llamastackclient.ConversationItemListResponseMcpCall:
case llamastackclient.ConversationItemListResponseMcpListTools:
default:
  fmt.Errorf("no variant present")
}

func (ConversationItemListResponseUnion) AsFileSearchCall

func (ConversationItemListResponseUnion) AsFunctionCall

func (ConversationItemListResponseUnion) AsFunctionCallOutput

func (ConversationItemListResponseUnion) AsMcpApprovalRequest

func (ConversationItemListResponseUnion) AsMcpApprovalResponse

func (ConversationItemListResponseUnion) AsMcpCall

func (ConversationItemListResponseUnion) AsMcpListTools

func (ConversationItemListResponseUnion) AsMessage

func (ConversationItemListResponseUnion) AsWebSearchCall

func (ConversationItemListResponseUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseUnion) UnmarshalJSON

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

type ConversationItemListResponseWebSearchCall

type ConversationItemListResponseWebSearchCall 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 (ConversationItemListResponseWebSearchCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemListResponseWebSearchCall) UnmarshalJSON

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

type ConversationItemNewParams

type ConversationItemNewParams struct {
	// Items to include in the conversation context.
	Items []ConversationItemNewParamsItemUnion `json:"items,omitzero,required"`
	// contains filtered or unexported fields
}

func (ConversationItemNewParams) MarshalJSON

func (r ConversationItemNewParams) MarshalJSON() (data []byte, err error)

func (*ConversationItemNewParams) UnmarshalJSON

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

type ConversationItemNewParamsItemFileSearchCall

type ConversationItemNewParamsItemFileSearchCall 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 []ConversationItemNewParamsItemFileSearchCallResult `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 (ConversationItemNewParamsItemFileSearchCall) MarshalJSON

func (r ConversationItemNewParamsItemFileSearchCall) MarshalJSON() (data []byte, err error)

func (*ConversationItemNewParamsItemFileSearchCall) UnmarshalJSON

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

type ConversationItemNewParamsItemFileSearchCallResult

type ConversationItemNewParamsItemFileSearchCallResult struct {
	// (Optional) Key-value attributes associated with the file
	Attributes map[string]ConversationItemNewParamsItemFileSearchCallResultAttributeUnion `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 (ConversationItemNewParamsItemFileSearchCallResult) MarshalJSON

func (r ConversationItemNewParamsItemFileSearchCallResult) MarshalJSON() (data []byte, err error)

func (*ConversationItemNewParamsItemFileSearchCallResult) UnmarshalJSON

type ConversationItemNewParamsItemFileSearchCallResultAttributeUnion

type ConversationItemNewParamsItemFileSearchCallResultAttributeUnion 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 (ConversationItemNewParamsItemFileSearchCallResultAttributeUnion) MarshalJSON

func (*ConversationItemNewParamsItemFileSearchCallResultAttributeUnion) UnmarshalJSON

type ConversationItemNewParamsItemFunctionCall

type ConversationItemNewParamsItemFunctionCall 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 (ConversationItemNewParamsItemFunctionCall) MarshalJSON

func (r ConversationItemNewParamsItemFunctionCall) MarshalJSON() (data []byte, err error)

func (*ConversationItemNewParamsItemFunctionCall) UnmarshalJSON

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

type ConversationItemNewParamsItemFunctionCallOutput

type ConversationItemNewParamsItemFunctionCallOutput 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 (ConversationItemNewParamsItemFunctionCallOutput) MarshalJSON

func (r ConversationItemNewParamsItemFunctionCallOutput) MarshalJSON() (data []byte, err error)

func (*ConversationItemNewParamsItemFunctionCallOutput) UnmarshalJSON

type ConversationItemNewParamsItemMcpApprovalRequest

type ConversationItemNewParamsItemMcpApprovalRequest struct {
	ID          string `json:"id,required"`
	Arguments   string `json:"arguments,required"`
	Name        string `json:"name,required"`
	ServerLabel string `json:"server_label,required"`
	// This field can be elided, and will marshal its zero value as
	// "mcp_approval_request".
	Type constant.McpApprovalRequest `json:"type,required"`
	// contains filtered or unexported fields
}

A request for human approval of a tool invocation.

The properties ID, Arguments, Name, ServerLabel, Type are required.

func (ConversationItemNewParamsItemMcpApprovalRequest) MarshalJSON

func (r ConversationItemNewParamsItemMcpApprovalRequest) MarshalJSON() (data []byte, err error)

func (*ConversationItemNewParamsItemMcpApprovalRequest) UnmarshalJSON

type ConversationItemNewParamsItemMcpApprovalResponse

type ConversationItemNewParamsItemMcpApprovalResponse struct {
	ApprovalRequestID string            `json:"approval_request_id,required"`
	Approve           bool              `json:"approve,required"`
	ID                param.Opt[string] `json:"id,omitzero"`
	Reason            param.Opt[string] `json:"reason,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "mcp_approval_response".
	Type constant.McpApprovalResponse `json:"type,required"`
	// contains filtered or unexported fields
}

A response to an MCP approval request.

The properties ApprovalRequestID, Approve, Type are required.

func (ConversationItemNewParamsItemMcpApprovalResponse) MarshalJSON

func (r ConversationItemNewParamsItemMcpApprovalResponse) MarshalJSON() (data []byte, err error)

func (*ConversationItemNewParamsItemMcpApprovalResponse) UnmarshalJSON

type ConversationItemNewParamsItemMcpCall

type ConversationItemNewParamsItemMcpCall 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"`
	// (Optional) Error message if the MCP call failed
	Error param.Opt[string] `json:"error,omitzero"`
	// (Optional) Output result from the successful MCP call
	Output param.Opt[string] `json:"output,omitzero"`
	// Tool call type identifier, always "mcp_call"
	//
	// This field can be elided, and will marshal its zero value as "mcp_call".
	Type constant.McpCall `json:"type,required"`
	// contains filtered or unexported fields
}

Model Context Protocol (MCP) call output message for OpenAI responses.

The properties ID, Arguments, Name, ServerLabel, Type are required.

func (ConversationItemNewParamsItemMcpCall) MarshalJSON

func (r ConversationItemNewParamsItemMcpCall) MarshalJSON() (data []byte, err error)

func (*ConversationItemNewParamsItemMcpCall) UnmarshalJSON

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

type ConversationItemNewParamsItemMcpListTools

type ConversationItemNewParamsItemMcpListTools 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 []ConversationItemNewParamsItemMcpListToolsTool `json:"tools,omitzero,required"`
	// Tool call type identifier, always "mcp_list_tools"
	//
	// This field can be elided, and will marshal its zero value as "mcp_list_tools".
	Type constant.McpListTools `json:"type,required"`
	// contains filtered or unexported fields
}

MCP list tools output message containing available tools from an MCP server.

The properties ID, ServerLabel, Tools, Type are required.

func (ConversationItemNewParamsItemMcpListTools) MarshalJSON

func (r ConversationItemNewParamsItemMcpListTools) MarshalJSON() (data []byte, err error)

func (*ConversationItemNewParamsItemMcpListTools) UnmarshalJSON

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

type ConversationItemNewParamsItemMcpListToolsTool

type ConversationItemNewParamsItemMcpListToolsTool struct {
	// JSON schema defining the tool's input parameters
	InputSchema map[string]ConversationItemNewParamsItemMcpListToolsToolInputSchemaUnion `json:"input_schema,omitzero,required"`
	// Name of the tool
	Name string `json:"name,required"`
	// (Optional) Description of what the tool does
	Description param.Opt[string] `json:"description,omitzero"`
	// contains filtered or unexported fields
}

Tool definition returned by MCP list tools operation.

The properties InputSchema, Name are required.

func (ConversationItemNewParamsItemMcpListToolsTool) MarshalJSON

func (r ConversationItemNewParamsItemMcpListToolsTool) MarshalJSON() (data []byte, err error)

func (*ConversationItemNewParamsItemMcpListToolsTool) UnmarshalJSON

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

type ConversationItemNewParamsItemMcpListToolsToolInputSchemaUnion

type ConversationItemNewParamsItemMcpListToolsToolInputSchemaUnion 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 (ConversationItemNewParamsItemMcpListToolsToolInputSchemaUnion) MarshalJSON

func (*ConversationItemNewParamsItemMcpListToolsToolInputSchemaUnion) UnmarshalJSON

type ConversationItemNewParamsItemMessage

type ConversationItemNewParamsItemMessage struct {
	Content ConversationItemNewParamsItemMessageContentUnion `json:"content,omitzero,required"`
	// Any of "system", "developer", "user", "assistant".
	Role   ConversationItemNewParamsItemMessageRole `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 (ConversationItemNewParamsItemMessage) MarshalJSON

func (r ConversationItemNewParamsItemMessage) MarshalJSON() (data []byte, err error)

func (*ConversationItemNewParamsItemMessage) UnmarshalJSON

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

type ConversationItemNewParamsItemMessageContentArrayItemInputFile

type ConversationItemNewParamsItemMessageContentArrayItemInputFile struct {
	// The data of the file to be sent to the model.
	FileData param.Opt[string] `json:"file_data,omitzero"`
	// (Optional) The ID of the file to be sent to the model.
	FileID param.Opt[string] `json:"file_id,omitzero"`
	// The URL of the file to be sent to the model.
	FileURL param.Opt[string] `json:"file_url,omitzero"`
	// The name of the file to be sent to the model.
	Filename param.Opt[string] `json:"filename,omitzero"`
	// The type of the input item. Always `input_file`.
	//
	// This field can be elided, and will marshal its zero value as "input_file".
	Type constant.InputFile `json:"type,required"`
	// contains filtered or unexported fields
}

File content for input messages in OpenAI response format.

The property Type is required.

func (ConversationItemNewParamsItemMessageContentArrayItemInputFile) MarshalJSON

func (*ConversationItemNewParamsItemMessageContentArrayItemInputFile) UnmarshalJSON

type ConversationItemNewParamsItemMessageContentArrayItemInputImage

type ConversationItemNewParamsItemMessageContentArrayItemInputImage struct {
	// Level of detail for image processing, can be "low", "high", or "auto"
	//
	// Any of "low", "high", "auto".
	Detail ConversationItemNewParamsItemMessageContentArrayItemInputImageDetail `json:"detail,omitzero,required"`
	// (Optional) The ID of the file to be sent to the model.
	FileID param.Opt[string] `json:"file_id,omitzero"`
	// (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 (ConversationItemNewParamsItemMessageContentArrayItemInputImage) MarshalJSON

func (*ConversationItemNewParamsItemMessageContentArrayItemInputImage) UnmarshalJSON

type ConversationItemNewParamsItemMessageContentArrayItemInputImageDetail

type ConversationItemNewParamsItemMessageContentArrayItemInputImageDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ConversationItemNewParamsItemMessageContentArrayItemInputImageDetailLow  ConversationItemNewParamsItemMessageContentArrayItemInputImageDetail = "low"
	ConversationItemNewParamsItemMessageContentArrayItemInputImageDetailHigh ConversationItemNewParamsItemMessageContentArrayItemInputImageDetail = "high"
	ConversationItemNewParamsItemMessageContentArrayItemInputImageDetailAuto ConversationItemNewParamsItemMessageContentArrayItemInputImageDetail = "auto"
)

type ConversationItemNewParamsItemMessageContentArrayItemInputText

type ConversationItemNewParamsItemMessageContentArrayItemInputText 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 (ConversationItemNewParamsItemMessageContentArrayItemInputText) MarshalJSON

func (*ConversationItemNewParamsItemMessageContentArrayItemInputText) UnmarshalJSON

type ConversationItemNewParamsItemMessageContentArrayItemUnion

type ConversationItemNewParamsItemMessageContentArrayItemUnion struct {
	OfInputText  *ConversationItemNewParamsItemMessageContentArrayItemInputText  `json:",omitzero,inline"`
	OfInputImage *ConversationItemNewParamsItemMessageContentArrayItemInputImage `json:",omitzero,inline"`
	OfInputFile  *ConversationItemNewParamsItemMessageContentArrayItemInputFile  `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 (ConversationItemNewParamsItemMessageContentArrayItemUnion) GetDetail

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

func (ConversationItemNewParamsItemMessageContentArrayItemUnion) GetFileData

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

func (ConversationItemNewParamsItemMessageContentArrayItemUnion) GetFileID

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

func (ConversationItemNewParamsItemMessageContentArrayItemUnion) GetFileURL

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

func (ConversationItemNewParamsItemMessageContentArrayItemUnion) GetFilename

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

func (ConversationItemNewParamsItemMessageContentArrayItemUnion) GetImageURL

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

func (ConversationItemNewParamsItemMessageContentArrayItemUnion) GetText

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

func (ConversationItemNewParamsItemMessageContentArrayItemUnion) GetType

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

func (ConversationItemNewParamsItemMessageContentArrayItemUnion) MarshalJSON

func (*ConversationItemNewParamsItemMessageContentArrayItemUnion) UnmarshalJSON

type ConversationItemNewParamsItemMessageContentUnion

type ConversationItemNewParamsItemMessageContentUnion struct {
	OfString                                      param.Opt[string]                                           `json:",omitzero,inline"`
	OfConversationItemNewsItemMessageContentArray []ConversationItemNewParamsItemMessageContentArrayItemUnion `json:",omitzero,inline"`
	OfVariant2                                    []ConversationItemNewParamsItemMessageContentArrayItemUnion `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 (ConversationItemNewParamsItemMessageContentUnion) MarshalJSON

func (*ConversationItemNewParamsItemMessageContentUnion) UnmarshalJSON

type ConversationItemNewParamsItemMessageRole

type ConversationItemNewParamsItemMessageRole string
const (
	ConversationItemNewParamsItemMessageRoleSystem    ConversationItemNewParamsItemMessageRole = "system"
	ConversationItemNewParamsItemMessageRoleDeveloper ConversationItemNewParamsItemMessageRole = "developer"
	ConversationItemNewParamsItemMessageRoleUser      ConversationItemNewParamsItemMessageRole = "user"
	ConversationItemNewParamsItemMessageRoleAssistant ConversationItemNewParamsItemMessageRole = "assistant"
)

type ConversationItemNewParamsItemUnion

type ConversationItemNewParamsItemUnion struct {
	OfMessage             *ConversationItemNewParamsItemMessage             `json:",omitzero,inline"`
	OfWebSearchCall       *ConversationItemNewParamsItemWebSearchCall       `json:",omitzero,inline"`
	OfFileSearchCall      *ConversationItemNewParamsItemFileSearchCall      `json:",omitzero,inline"`
	OfFunctionCall        *ConversationItemNewParamsItemFunctionCall        `json:",omitzero,inline"`
	OfFunctionCallOutput  *ConversationItemNewParamsItemFunctionCallOutput  `json:",omitzero,inline"`
	OfMcpApprovalRequest  *ConversationItemNewParamsItemMcpApprovalRequest  `json:",omitzero,inline"`
	OfMcpApprovalResponse *ConversationItemNewParamsItemMcpApprovalResponse `json:",omitzero,inline"`
	OfMcpCall             *ConversationItemNewParamsItemMcpCall             `json:",omitzero,inline"`
	OfMcpListTools        *ConversationItemNewParamsItemMcpListTools        `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 (ConversationItemNewParamsItemUnion) GetApprovalRequestID

func (u ConversationItemNewParamsItemUnion) GetApprovalRequestID() *string

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

func (ConversationItemNewParamsItemUnion) GetApprove

func (u ConversationItemNewParamsItemUnion) GetApprove() *bool

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

func (ConversationItemNewParamsItemUnion) GetArguments

func (u ConversationItemNewParamsItemUnion) GetArguments() *string

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

func (ConversationItemNewParamsItemUnion) GetCallID

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

func (ConversationItemNewParamsItemUnion) GetContent

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

func (ConversationItemNewParamsItemUnion) GetError

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

func (ConversationItemNewParamsItemUnion) GetID

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

func (ConversationItemNewParamsItemUnion) GetName

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

func (ConversationItemNewParamsItemUnion) GetOutput

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

func (ConversationItemNewParamsItemUnion) GetQueries

func (u ConversationItemNewParamsItemUnion) GetQueries() []string

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

func (ConversationItemNewParamsItemUnion) GetReason

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

func (ConversationItemNewParamsItemUnion) GetResults

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

func (ConversationItemNewParamsItemUnion) GetRole

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

func (ConversationItemNewParamsItemUnion) GetServerLabel

func (u ConversationItemNewParamsItemUnion) GetServerLabel() *string

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

func (ConversationItemNewParamsItemUnion) GetStatus

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

func (ConversationItemNewParamsItemUnion) GetTools

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

func (ConversationItemNewParamsItemUnion) GetType

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

func (ConversationItemNewParamsItemUnion) MarshalJSON

func (u ConversationItemNewParamsItemUnion) MarshalJSON() ([]byte, error)

func (*ConversationItemNewParamsItemUnion) UnmarshalJSON

func (u *ConversationItemNewParamsItemUnion) UnmarshalJSON(data []byte) error

type ConversationItemNewParamsItemWebSearchCall

type ConversationItemNewParamsItemWebSearchCall 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 (ConversationItemNewParamsItemWebSearchCall) MarshalJSON

func (r ConversationItemNewParamsItemWebSearchCall) MarshalJSON() (data []byte, err error)

func (*ConversationItemNewParamsItemWebSearchCall) UnmarshalJSON

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

type ConversationItemNewResponse

type ConversationItemNewResponse struct {
	Data    []ConversationItemNewResponseDataUnion `json:"data,required"`
	HasMore bool                                   `json:"has_more,required"`
	Object  string                                 `json:"object,required"`
	FirstID string                                 `json:"first_id"`
	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:"-"`
}

List of conversation items with pagination.

func (ConversationItemNewResponse) RawJSON

func (r ConversationItemNewResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponse) UnmarshalJSON

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

type ConversationItemNewResponseDataFileSearchCall

type ConversationItemNewResponseDataFileSearchCall 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 []ConversationItemNewResponseDataFileSearchCallResult `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 (ConversationItemNewResponseDataFileSearchCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataFileSearchCall) UnmarshalJSON

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

type ConversationItemNewResponseDataFileSearchCallResult

type ConversationItemNewResponseDataFileSearchCallResult struct {
	// (Optional) Key-value attributes associated with the file
	Attributes map[string]ConversationItemNewResponseDataFileSearchCallResultAttributeUnion `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 (ConversationItemNewResponseDataFileSearchCallResult) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataFileSearchCallResult) UnmarshalJSON

type ConversationItemNewResponseDataFileSearchCallResultAttributeUnion

type ConversationItemNewResponseDataFileSearchCallResultAttributeUnion 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:"-"`
}

ConversationItemNewResponseDataFileSearchCallResultAttributeUnion 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 (ConversationItemNewResponseDataFileSearchCallResultAttributeUnion) AsAnyArray

func (ConversationItemNewResponseDataFileSearchCallResultAttributeUnion) AsBool

func (ConversationItemNewResponseDataFileSearchCallResultAttributeUnion) AsFloat

func (ConversationItemNewResponseDataFileSearchCallResultAttributeUnion) AsString

func (ConversationItemNewResponseDataFileSearchCallResultAttributeUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataFileSearchCallResultAttributeUnion) UnmarshalJSON

type ConversationItemNewResponseDataFunctionCall

type ConversationItemNewResponseDataFunctionCall 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 (ConversationItemNewResponseDataFunctionCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataFunctionCall) UnmarshalJSON

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

type ConversationItemNewResponseDataFunctionCallOutput

type ConversationItemNewResponseDataFunctionCallOutput 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 (ConversationItemNewResponseDataFunctionCallOutput) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataFunctionCallOutput) UnmarshalJSON

type ConversationItemNewResponseDataMcpApprovalRequest

type ConversationItemNewResponseDataMcpApprovalRequest struct {
	ID          string                      `json:"id,required"`
	Arguments   string                      `json:"arguments,required"`
	Name        string                      `json:"name,required"`
	ServerLabel string                      `json:"server_label,required"`
	Type        constant.McpApprovalRequest `json:"type,required"`
	// 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
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request for human approval of a tool invocation.

func (ConversationItemNewResponseDataMcpApprovalRequest) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataMcpApprovalRequest) UnmarshalJSON

type ConversationItemNewResponseDataMcpApprovalResponse

type ConversationItemNewResponseDataMcpApprovalResponse struct {
	ApprovalRequestID string                       `json:"approval_request_id,required"`
	Approve           bool                         `json:"approve,required"`
	Type              constant.McpApprovalResponse `json:"type,required"`
	ID                string                       `json:"id"`
	Reason            string                       `json:"reason"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ApprovalRequestID respjson.Field
		Approve           respjson.Field
		Type              respjson.Field
		ID                respjson.Field
		Reason            respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A response to an MCP approval request.

func (ConversationItemNewResponseDataMcpApprovalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataMcpApprovalResponse) UnmarshalJSON

type ConversationItemNewResponseDataMcpCall

type ConversationItemNewResponseDataMcpCall 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 (ConversationItemNewResponseDataMcpCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataMcpCall) UnmarshalJSON

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

type ConversationItemNewResponseDataMcpListTools

type ConversationItemNewResponseDataMcpListTools 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 []ConversationItemNewResponseDataMcpListToolsTool `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 (ConversationItemNewResponseDataMcpListTools) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataMcpListTools) UnmarshalJSON

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

type ConversationItemNewResponseDataMcpListToolsTool

type ConversationItemNewResponseDataMcpListToolsTool struct {
	// JSON schema defining the tool's input parameters
	InputSchema map[string]ConversationItemNewResponseDataMcpListToolsToolInputSchemaUnion `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 (ConversationItemNewResponseDataMcpListToolsTool) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataMcpListToolsTool) UnmarshalJSON

type ConversationItemNewResponseDataMcpListToolsToolInputSchemaUnion

type ConversationItemNewResponseDataMcpListToolsToolInputSchemaUnion 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:"-"`
}

ConversationItemNewResponseDataMcpListToolsToolInputSchemaUnion 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 (ConversationItemNewResponseDataMcpListToolsToolInputSchemaUnion) AsAnyArray

func (ConversationItemNewResponseDataMcpListToolsToolInputSchemaUnion) AsBool

func (ConversationItemNewResponseDataMcpListToolsToolInputSchemaUnion) AsFloat

func (ConversationItemNewResponseDataMcpListToolsToolInputSchemaUnion) AsString

func (ConversationItemNewResponseDataMcpListToolsToolInputSchemaUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataMcpListToolsToolInputSchemaUnion) UnmarshalJSON

type ConversationItemNewResponseDataMessage

type ConversationItemNewResponseDataMessage struct {
	Content ConversationItemNewResponseDataMessageContentUnion `json:"content,required"`
	// Any of "system", "developer", "user", "assistant".
	Role   ConversationItemNewResponseDataMessageRole `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 (ConversationItemNewResponseDataMessage) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataMessage) UnmarshalJSON

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

type ConversationItemNewResponseDataMessageContentArrayItemDetail

type ConversationItemNewResponseDataMessageContentArrayItemDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ConversationItemNewResponseDataMessageContentArrayItemDetailLow  ConversationItemNewResponseDataMessageContentArrayItemDetail = "low"
	ConversationItemNewResponseDataMessageContentArrayItemDetailHigh ConversationItemNewResponseDataMessageContentArrayItemDetail = "high"
	ConversationItemNewResponseDataMessageContentArrayItemDetailAuto ConversationItemNewResponseDataMessageContentArrayItemDetail = "auto"
)

type ConversationItemNewResponseDataMessageContentArrayItemInputFile

type ConversationItemNewResponseDataMessageContentArrayItemInputFile struct {
	// The type of the input item. Always `input_file`.
	Type constant.InputFile `json:"type,required"`
	// The data of the file to be sent to the model.
	FileData string `json:"file_data"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// The URL of the file to be sent to the model.
	FileURL string `json:"file_url"`
	// The name of the file to be sent to the model.
	Filename string `json:"filename"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		FileData    respjson.Field
		FileID      respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File content for input messages in OpenAI response format.

func (ConversationItemNewResponseDataMessageContentArrayItemInputFile) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataMessageContentArrayItemInputFile) UnmarshalJSON

type ConversationItemNewResponseDataMessageContentArrayItemInputImage

type ConversationItemNewResponseDataMessageContentArrayItemInputImage struct {
	// Level of detail for image processing, can be "low", "high", or "auto"
	//
	// Any of "low", "high", "auto".
	Detail ConversationItemNewResponseDataMessageContentArrayItemInputImageDetail `json:"detail,required"`
	// Content type identifier, always "input_image"
	Type constant.InputImage `json:"type,required"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// (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
		FileID      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 (ConversationItemNewResponseDataMessageContentArrayItemInputImage) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataMessageContentArrayItemInputImage) UnmarshalJSON

type ConversationItemNewResponseDataMessageContentArrayItemInputImageDetail

type ConversationItemNewResponseDataMessageContentArrayItemInputImageDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ConversationItemNewResponseDataMessageContentArrayItemInputImageDetailLow  ConversationItemNewResponseDataMessageContentArrayItemInputImageDetail = "low"
	ConversationItemNewResponseDataMessageContentArrayItemInputImageDetailHigh ConversationItemNewResponseDataMessageContentArrayItemInputImageDetail = "high"
	ConversationItemNewResponseDataMessageContentArrayItemInputImageDetailAuto ConversationItemNewResponseDataMessageContentArrayItemInputImageDetail = "auto"
)

type ConversationItemNewResponseDataMessageContentArrayItemInputText

type ConversationItemNewResponseDataMessageContentArrayItemInputText 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 (ConversationItemNewResponseDataMessageContentArrayItemInputText) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataMessageContentArrayItemInputText) UnmarshalJSON

type ConversationItemNewResponseDataMessageContentArrayItemUnion

type ConversationItemNewResponseDataMessageContentArrayItemUnion struct {
	// This field is from variant
	// [ConversationItemNewResponseDataMessageContentArrayItemInputText].
	Text string `json:"text"`
	// Any of "input_text", "input_image", "input_file".
	Type string `json:"type"`
	// This field is from variant
	// [ConversationItemNewResponseDataMessageContentArrayItemInputImage].
	Detail ConversationItemNewResponseDataMessageContentArrayItemInputImageDetail `json:"detail"`
	FileID string                                                                 `json:"file_id"`
	// This field is from variant
	// [ConversationItemNewResponseDataMessageContentArrayItemInputImage].
	ImageURL string `json:"image_url"`
	// This field is from variant
	// [ConversationItemNewResponseDataMessageContentArrayItemInputFile].
	FileData string `json:"file_data"`
	// This field is from variant
	// [ConversationItemNewResponseDataMessageContentArrayItemInputFile].
	FileURL string `json:"file_url"`
	// This field is from variant
	// [ConversationItemNewResponseDataMessageContentArrayItemInputFile].
	Filename string `json:"filename"`
	JSON     struct {
		Text     respjson.Field
		Type     respjson.Field
		Detail   respjson.Field
		FileID   respjson.Field
		ImageURL respjson.Field
		FileData respjson.Field
		FileURL  respjson.Field
		Filename respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemNewResponseDataMessageContentArrayItemUnion contains all possible properties and values from ConversationItemNewResponseDataMessageContentArrayItemInputText, ConversationItemNewResponseDataMessageContentArrayItemInputImage, ConversationItemNewResponseDataMessageContentArrayItemInputFile.

Use the ConversationItemNewResponseDataMessageContentArrayItemUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ConversationItemNewResponseDataMessageContentArrayItemUnion) AsAny

func (u ConversationItemNewResponseDataMessageContentArrayItemUnion) AsAny() anyConversationItemNewResponseDataMessageContentArrayItem

Use the following switch statement to find the correct variant

switch variant := ConversationItemNewResponseDataMessageContentArrayItemUnion.AsAny().(type) {
case llamastackclient.ConversationItemNewResponseDataMessageContentArrayItemInputText:
case llamastackclient.ConversationItemNewResponseDataMessageContentArrayItemInputImage:
case llamastackclient.ConversationItemNewResponseDataMessageContentArrayItemInputFile:
default:
  fmt.Errorf("no variant present")
}

func (ConversationItemNewResponseDataMessageContentArrayItemUnion) AsInputFile

func (ConversationItemNewResponseDataMessageContentArrayItemUnion) AsInputImage

func (ConversationItemNewResponseDataMessageContentArrayItemUnion) AsInputText

func (ConversationItemNewResponseDataMessageContentArrayItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataMessageContentArrayItemUnion) UnmarshalJSON

type ConversationItemNewResponseDataMessageContentUnion

type ConversationItemNewResponseDataMessageContentUnion 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
	// [[]ConversationItemNewResponseDataMessageContentArrayItemUnion] instead of an
	// object.
	OfVariant2 []ConversationItemNewResponseDataMessageContentArrayItemUnion `json:",inline"`
	JSON       struct {
		OfString   respjson.Field
		OfVariant2 respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemNewResponseDataMessageContentUnion contains all possible properties and values from [string], [[]ConversationItemNewResponseDataMessageContentArrayItemUnion], [[]ConversationItemNewResponseDataMessageContentArrayItemUnion].

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 OfVariant2]

func (ConversationItemNewResponseDataMessageContentUnion) AsConversationItemNewResponseDataMessageContentArray

func (u ConversationItemNewResponseDataMessageContentUnion) AsConversationItemNewResponseDataMessageContentArray() (v []ConversationItemNewResponseDataMessageContentArrayItemUnion)

func (ConversationItemNewResponseDataMessageContentUnion) AsString

func (ConversationItemNewResponseDataMessageContentUnion) AsVariant2

func (ConversationItemNewResponseDataMessageContentUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataMessageContentUnion) UnmarshalJSON

type ConversationItemNewResponseDataMessageRole

type ConversationItemNewResponseDataMessageRole string
const (
	ConversationItemNewResponseDataMessageRoleSystem    ConversationItemNewResponseDataMessageRole = "system"
	ConversationItemNewResponseDataMessageRoleDeveloper ConversationItemNewResponseDataMessageRole = "developer"
	ConversationItemNewResponseDataMessageRoleUser      ConversationItemNewResponseDataMessageRole = "user"
	ConversationItemNewResponseDataMessageRoleAssistant ConversationItemNewResponseDataMessageRole = "assistant"
)

type ConversationItemNewResponseDataRole

type ConversationItemNewResponseDataRole string
const (
	ConversationItemNewResponseDataRoleSystem    ConversationItemNewResponseDataRole = "system"
	ConversationItemNewResponseDataRoleDeveloper ConversationItemNewResponseDataRole = "developer"
	ConversationItemNewResponseDataRoleUser      ConversationItemNewResponseDataRole = "user"
	ConversationItemNewResponseDataRoleAssistant ConversationItemNewResponseDataRole = "assistant"
)

type ConversationItemNewResponseDataUnion

type ConversationItemNewResponseDataUnion struct {
	// This field is from variant [ConversationItemNewResponseDataMessage].
	Content ConversationItemNewResponseDataMessageContentUnion `json:"content"`
	// This field is from variant [ConversationItemNewResponseDataMessage].
	Role ConversationItemNewResponseDataMessageRole `json:"role"`
	// Any of "message", "web_search_call", "file_search_call", "function_call",
	// "function_call_output", "mcp_approval_request", "mcp_approval_response",
	// "mcp_call", "mcp_list_tools".
	Type   string `json:"type"`
	ID     string `json:"id"`
	Status string `json:"status"`
	// This field is from variant [ConversationItemNewResponseDataFileSearchCall].
	Queries []string `json:"queries"`
	// This field is from variant [ConversationItemNewResponseDataFileSearchCall].
	Results     []ConversationItemNewResponseDataFileSearchCallResult `json:"results"`
	Arguments   string                                                `json:"arguments"`
	CallID      string                                                `json:"call_id"`
	Name        string                                                `json:"name"`
	Output      string                                                `json:"output"`
	ServerLabel string                                                `json:"server_label"`
	// This field is from variant [ConversationItemNewResponseDataMcpApprovalResponse].
	ApprovalRequestID string `json:"approval_request_id"`
	// This field is from variant [ConversationItemNewResponseDataMcpApprovalResponse].
	Approve bool `json:"approve"`
	// This field is from variant [ConversationItemNewResponseDataMcpApprovalResponse].
	Reason string `json:"reason"`
	// This field is from variant [ConversationItemNewResponseDataMcpCall].
	Error string `json:"error"`
	// This field is from variant [ConversationItemNewResponseDataMcpListTools].
	Tools []ConversationItemNewResponseDataMcpListToolsTool `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
		Output            respjson.Field
		ServerLabel       respjson.Field
		ApprovalRequestID respjson.Field
		Approve           respjson.Field
		Reason            respjson.Field
		Error             respjson.Field
		Tools             respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ConversationItemNewResponseDataUnion contains all possible properties and values from ConversationItemNewResponseDataMessage, ConversationItemNewResponseDataWebSearchCall, ConversationItemNewResponseDataFileSearchCall, ConversationItemNewResponseDataFunctionCall, ConversationItemNewResponseDataFunctionCallOutput, ConversationItemNewResponseDataMcpApprovalRequest, ConversationItemNewResponseDataMcpApprovalResponse, ConversationItemNewResponseDataMcpCall, ConversationItemNewResponseDataMcpListTools.

Use the ConversationItemNewResponseDataUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ConversationItemNewResponseDataUnion) AsAny

func (u ConversationItemNewResponseDataUnion) AsAny() anyConversationItemNewResponseData

Use the following switch statement to find the correct variant

switch variant := ConversationItemNewResponseDataUnion.AsAny().(type) {
case llamastackclient.ConversationItemNewResponseDataMessage:
case llamastackclient.ConversationItemNewResponseDataWebSearchCall:
case llamastackclient.ConversationItemNewResponseDataFileSearchCall:
case llamastackclient.ConversationItemNewResponseDataFunctionCall:
case llamastackclient.ConversationItemNewResponseDataFunctionCallOutput:
case llamastackclient.ConversationItemNewResponseDataMcpApprovalRequest:
case llamastackclient.ConversationItemNewResponseDataMcpApprovalResponse:
case llamastackclient.ConversationItemNewResponseDataMcpCall:
case llamastackclient.ConversationItemNewResponseDataMcpListTools:
default:
  fmt.Errorf("no variant present")
}

func (ConversationItemNewResponseDataUnion) AsFileSearchCall

func (ConversationItemNewResponseDataUnion) AsFunctionCall

func (ConversationItemNewResponseDataUnion) AsFunctionCallOutput

func (ConversationItemNewResponseDataUnion) AsMcpApprovalRequest

func (ConversationItemNewResponseDataUnion) AsMcpApprovalResponse

func (ConversationItemNewResponseDataUnion) AsMcpCall

func (ConversationItemNewResponseDataUnion) AsMcpListTools

func (ConversationItemNewResponseDataUnion) AsMessage

func (ConversationItemNewResponseDataUnion) AsWebSearchCall

func (ConversationItemNewResponseDataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataUnion) UnmarshalJSON

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

type ConversationItemNewResponseDataWebSearchCall

type ConversationItemNewResponseDataWebSearchCall 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 (ConversationItemNewResponseDataWebSearchCall) RawJSON

Returns the unmodified JSON received from the API

func (*ConversationItemNewResponseDataWebSearchCall) UnmarshalJSON

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

type ConversationItemService

type ConversationItemService struct {
	Options []option.RequestOption
}

ConversationItemService 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 NewConversationItemService method instead.

func NewConversationItemService

func NewConversationItemService(opts ...option.RequestOption) (r ConversationItemService)

NewConversationItemService 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 (*ConversationItemService) Get

Retrieve an item. Retrieve a conversation item.

func (*ConversationItemService) List

List items. List items in the conversation.

func (*ConversationItemService) ListAutoPaging

List items. List items in the conversation.

func (*ConversationItemService) New

Create items. Create items in the conversation.

type ConversationNewParams

type ConversationNewParams struct {
	// Initial items to include in the conversation context.
	Items []ConversationNewParamsItemUnion `json:"items,omitzero"`
	// Set of key-value pairs that can be attached to an object.
	Metadata map[string]string `json:"metadata,omitzero"`
	// contains filtered or unexported fields
}

func (ConversationNewParams) MarshalJSON

func (r ConversationNewParams) MarshalJSON() (data []byte, err error)

func (*ConversationNewParams) UnmarshalJSON

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

type ConversationNewParamsItemFileSearchCall

type ConversationNewParamsItemFileSearchCall 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 []ConversationNewParamsItemFileSearchCallResult `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 (ConversationNewParamsItemFileSearchCall) MarshalJSON

func (r ConversationNewParamsItemFileSearchCall) MarshalJSON() (data []byte, err error)

func (*ConversationNewParamsItemFileSearchCall) UnmarshalJSON

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

type ConversationNewParamsItemFileSearchCallResult

type ConversationNewParamsItemFileSearchCallResult struct {
	// (Optional) Key-value attributes associated with the file
	Attributes map[string]ConversationNewParamsItemFileSearchCallResultAttributeUnion `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 (ConversationNewParamsItemFileSearchCallResult) MarshalJSON

func (r ConversationNewParamsItemFileSearchCallResult) MarshalJSON() (data []byte, err error)

func (*ConversationNewParamsItemFileSearchCallResult) UnmarshalJSON

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

type ConversationNewParamsItemFileSearchCallResultAttributeUnion

type ConversationNewParamsItemFileSearchCallResultAttributeUnion 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 (ConversationNewParamsItemFileSearchCallResultAttributeUnion) MarshalJSON

func (*ConversationNewParamsItemFileSearchCallResultAttributeUnion) UnmarshalJSON

type ConversationNewParamsItemFunctionCall

type ConversationNewParamsItemFunctionCall 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 (ConversationNewParamsItemFunctionCall) MarshalJSON

func (r ConversationNewParamsItemFunctionCall) MarshalJSON() (data []byte, err error)

func (*ConversationNewParamsItemFunctionCall) UnmarshalJSON

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

type ConversationNewParamsItemFunctionCallOutput

type ConversationNewParamsItemFunctionCallOutput 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 (ConversationNewParamsItemFunctionCallOutput) MarshalJSON

func (r ConversationNewParamsItemFunctionCallOutput) MarshalJSON() (data []byte, err error)

func (*ConversationNewParamsItemFunctionCallOutput) UnmarshalJSON

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

type ConversationNewParamsItemMcpApprovalRequest

type ConversationNewParamsItemMcpApprovalRequest struct {
	ID          string `json:"id,required"`
	Arguments   string `json:"arguments,required"`
	Name        string `json:"name,required"`
	ServerLabel string `json:"server_label,required"`
	// This field can be elided, and will marshal its zero value as
	// "mcp_approval_request".
	Type constant.McpApprovalRequest `json:"type,required"`
	// contains filtered or unexported fields
}

A request for human approval of a tool invocation.

The properties ID, Arguments, Name, ServerLabel, Type are required.

func (ConversationNewParamsItemMcpApprovalRequest) MarshalJSON

func (r ConversationNewParamsItemMcpApprovalRequest) MarshalJSON() (data []byte, err error)

func (*ConversationNewParamsItemMcpApprovalRequest) UnmarshalJSON

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

type ConversationNewParamsItemMcpApprovalResponse

type ConversationNewParamsItemMcpApprovalResponse struct {
	ApprovalRequestID string            `json:"approval_request_id,required"`
	Approve           bool              `json:"approve,required"`
	ID                param.Opt[string] `json:"id,omitzero"`
	Reason            param.Opt[string] `json:"reason,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "mcp_approval_response".
	Type constant.McpApprovalResponse `json:"type,required"`
	// contains filtered or unexported fields
}

A response to an MCP approval request.

The properties ApprovalRequestID, Approve, Type are required.

func (ConversationNewParamsItemMcpApprovalResponse) MarshalJSON

func (r ConversationNewParamsItemMcpApprovalResponse) MarshalJSON() (data []byte, err error)

func (*ConversationNewParamsItemMcpApprovalResponse) UnmarshalJSON

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

type ConversationNewParamsItemMcpCall

type ConversationNewParamsItemMcpCall 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"`
	// (Optional) Error message if the MCP call failed
	Error param.Opt[string] `json:"error,omitzero"`
	// (Optional) Output result from the successful MCP call
	Output param.Opt[string] `json:"output,omitzero"`
	// Tool call type identifier, always "mcp_call"
	//
	// This field can be elided, and will marshal its zero value as "mcp_call".
	Type constant.McpCall `json:"type,required"`
	// contains filtered or unexported fields
}

Model Context Protocol (MCP) call output message for OpenAI responses.

The properties ID, Arguments, Name, ServerLabel, Type are required.

func (ConversationNewParamsItemMcpCall) MarshalJSON

func (r ConversationNewParamsItemMcpCall) MarshalJSON() (data []byte, err error)

func (*ConversationNewParamsItemMcpCall) UnmarshalJSON

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

type ConversationNewParamsItemMcpListTools

type ConversationNewParamsItemMcpListTools 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 []ConversationNewParamsItemMcpListToolsTool `json:"tools,omitzero,required"`
	// Tool call type identifier, always "mcp_list_tools"
	//
	// This field can be elided, and will marshal its zero value as "mcp_list_tools".
	Type constant.McpListTools `json:"type,required"`
	// contains filtered or unexported fields
}

MCP list tools output message containing available tools from an MCP server.

The properties ID, ServerLabel, Tools, Type are required.

func (ConversationNewParamsItemMcpListTools) MarshalJSON

func (r ConversationNewParamsItemMcpListTools) MarshalJSON() (data []byte, err error)

func (*ConversationNewParamsItemMcpListTools) UnmarshalJSON

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

type ConversationNewParamsItemMcpListToolsTool

type ConversationNewParamsItemMcpListToolsTool struct {
	// JSON schema defining the tool's input parameters
	InputSchema map[string]ConversationNewParamsItemMcpListToolsToolInputSchemaUnion `json:"input_schema,omitzero,required"`
	// Name of the tool
	Name string `json:"name,required"`
	// (Optional) Description of what the tool does
	Description param.Opt[string] `json:"description,omitzero"`
	// contains filtered or unexported fields
}

Tool definition returned by MCP list tools operation.

The properties InputSchema, Name are required.

func (ConversationNewParamsItemMcpListToolsTool) MarshalJSON

func (r ConversationNewParamsItemMcpListToolsTool) MarshalJSON() (data []byte, err error)

func (*ConversationNewParamsItemMcpListToolsTool) UnmarshalJSON

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

type ConversationNewParamsItemMcpListToolsToolInputSchemaUnion

type ConversationNewParamsItemMcpListToolsToolInputSchemaUnion 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 (ConversationNewParamsItemMcpListToolsToolInputSchemaUnion) MarshalJSON

func (*ConversationNewParamsItemMcpListToolsToolInputSchemaUnion) UnmarshalJSON

type ConversationNewParamsItemMessage

type ConversationNewParamsItemMessage struct {
	Content ConversationNewParamsItemMessageContentUnion `json:"content,omitzero,required"`
	// Any of "system", "developer", "user", "assistant".
	Role   ConversationNewParamsItemMessageRole `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 (ConversationNewParamsItemMessage) MarshalJSON

func (r ConversationNewParamsItemMessage) MarshalJSON() (data []byte, err error)

func (*ConversationNewParamsItemMessage) UnmarshalJSON

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

type ConversationNewParamsItemMessageContentArrayItemInputFile

type ConversationNewParamsItemMessageContentArrayItemInputFile struct {
	// The data of the file to be sent to the model.
	FileData param.Opt[string] `json:"file_data,omitzero"`
	// (Optional) The ID of the file to be sent to the model.
	FileID param.Opt[string] `json:"file_id,omitzero"`
	// The URL of the file to be sent to the model.
	FileURL param.Opt[string] `json:"file_url,omitzero"`
	// The name of the file to be sent to the model.
	Filename param.Opt[string] `json:"filename,omitzero"`
	// The type of the input item. Always `input_file`.
	//
	// This field can be elided, and will marshal its zero value as "input_file".
	Type constant.InputFile `json:"type,required"`
	// contains filtered or unexported fields
}

File content for input messages in OpenAI response format.

The property Type is required.

func (ConversationNewParamsItemMessageContentArrayItemInputFile) MarshalJSON

func (*ConversationNewParamsItemMessageContentArrayItemInputFile) UnmarshalJSON

type ConversationNewParamsItemMessageContentArrayItemInputImage

type ConversationNewParamsItemMessageContentArrayItemInputImage struct {
	// Level of detail for image processing, can be "low", "high", or "auto"
	//
	// Any of "low", "high", "auto".
	Detail ConversationNewParamsItemMessageContentArrayItemInputImageDetail `json:"detail,omitzero,required"`
	// (Optional) The ID of the file to be sent to the model.
	FileID param.Opt[string] `json:"file_id,omitzero"`
	// (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 (ConversationNewParamsItemMessageContentArrayItemInputImage) MarshalJSON

func (*ConversationNewParamsItemMessageContentArrayItemInputImage) UnmarshalJSON

type ConversationNewParamsItemMessageContentArrayItemInputImageDetail

type ConversationNewParamsItemMessageContentArrayItemInputImageDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ConversationNewParamsItemMessageContentArrayItemInputImageDetailLow  ConversationNewParamsItemMessageContentArrayItemInputImageDetail = "low"
	ConversationNewParamsItemMessageContentArrayItemInputImageDetailHigh ConversationNewParamsItemMessageContentArrayItemInputImageDetail = "high"
	ConversationNewParamsItemMessageContentArrayItemInputImageDetailAuto ConversationNewParamsItemMessageContentArrayItemInputImageDetail = "auto"
)

type ConversationNewParamsItemMessageContentArrayItemInputText

type ConversationNewParamsItemMessageContentArrayItemInputText 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 (ConversationNewParamsItemMessageContentArrayItemInputText) MarshalJSON

func (*ConversationNewParamsItemMessageContentArrayItemInputText) UnmarshalJSON

type ConversationNewParamsItemMessageContentArrayItemUnion

type ConversationNewParamsItemMessageContentArrayItemUnion struct {
	OfInputText  *ConversationNewParamsItemMessageContentArrayItemInputText  `json:",omitzero,inline"`
	OfInputImage *ConversationNewParamsItemMessageContentArrayItemInputImage `json:",omitzero,inline"`
	OfInputFile  *ConversationNewParamsItemMessageContentArrayItemInputFile  `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 (ConversationNewParamsItemMessageContentArrayItemUnion) GetDetail

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

func (ConversationNewParamsItemMessageContentArrayItemUnion) GetFileData

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

func (ConversationNewParamsItemMessageContentArrayItemUnion) GetFileID

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

func (ConversationNewParamsItemMessageContentArrayItemUnion) GetFileURL

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

func (ConversationNewParamsItemMessageContentArrayItemUnion) GetFilename

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

func (ConversationNewParamsItemMessageContentArrayItemUnion) GetImageURL

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

func (ConversationNewParamsItemMessageContentArrayItemUnion) GetText

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

func (ConversationNewParamsItemMessageContentArrayItemUnion) GetType

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

func (ConversationNewParamsItemMessageContentArrayItemUnion) MarshalJSON

func (*ConversationNewParamsItemMessageContentArrayItemUnion) UnmarshalJSON

type ConversationNewParamsItemMessageContentUnion

type ConversationNewParamsItemMessageContentUnion struct {
	OfString                                  param.Opt[string]                                       `json:",omitzero,inline"`
	OfConversationNewsItemMessageContentArray []ConversationNewParamsItemMessageContentArrayItemUnion `json:",omitzero,inline"`
	OfVariant2                                []ConversationNewParamsItemMessageContentArrayItemUnion `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 (ConversationNewParamsItemMessageContentUnion) MarshalJSON

func (*ConversationNewParamsItemMessageContentUnion) UnmarshalJSON

func (u *ConversationNewParamsItemMessageContentUnion) UnmarshalJSON(data []byte) error

type ConversationNewParamsItemMessageRole

type ConversationNewParamsItemMessageRole string
const (
	ConversationNewParamsItemMessageRoleSystem    ConversationNewParamsItemMessageRole = "system"
	ConversationNewParamsItemMessageRoleDeveloper ConversationNewParamsItemMessageRole = "developer"
	ConversationNewParamsItemMessageRoleUser      ConversationNewParamsItemMessageRole = "user"
	ConversationNewParamsItemMessageRoleAssistant ConversationNewParamsItemMessageRole = "assistant"
)

type ConversationNewParamsItemUnion

type ConversationNewParamsItemUnion struct {
	OfMessage             *ConversationNewParamsItemMessage             `json:",omitzero,inline"`
	OfWebSearchCall       *ConversationNewParamsItemWebSearchCall       `json:",omitzero,inline"`
	OfFileSearchCall      *ConversationNewParamsItemFileSearchCall      `json:",omitzero,inline"`
	OfFunctionCall        *ConversationNewParamsItemFunctionCall        `json:",omitzero,inline"`
	OfFunctionCallOutput  *ConversationNewParamsItemFunctionCallOutput  `json:",omitzero,inline"`
	OfMcpApprovalRequest  *ConversationNewParamsItemMcpApprovalRequest  `json:",omitzero,inline"`
	OfMcpApprovalResponse *ConversationNewParamsItemMcpApprovalResponse `json:",omitzero,inline"`
	OfMcpCall             *ConversationNewParamsItemMcpCall             `json:",omitzero,inline"`
	OfMcpListTools        *ConversationNewParamsItemMcpListTools        `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 (ConversationNewParamsItemUnion) GetApprovalRequestID

func (u ConversationNewParamsItemUnion) GetApprovalRequestID() *string

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

func (ConversationNewParamsItemUnion) GetApprove

func (u ConversationNewParamsItemUnion) GetApprove() *bool

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

func (ConversationNewParamsItemUnion) GetArguments

func (u ConversationNewParamsItemUnion) GetArguments() *string

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

func (ConversationNewParamsItemUnion) GetCallID

func (u ConversationNewParamsItemUnion) GetCallID() *string

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

func (ConversationNewParamsItemUnion) GetContent

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

func (ConversationNewParamsItemUnion) GetError

func (u ConversationNewParamsItemUnion) GetError() *string

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

func (ConversationNewParamsItemUnion) GetID

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

func (ConversationNewParamsItemUnion) GetName

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

func (ConversationNewParamsItemUnion) GetOutput

func (u ConversationNewParamsItemUnion) GetOutput() *string

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

func (ConversationNewParamsItemUnion) GetQueries

func (u ConversationNewParamsItemUnion) GetQueries() []string

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

func (ConversationNewParamsItemUnion) GetReason

func (u ConversationNewParamsItemUnion) GetReason() *string

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

func (ConversationNewParamsItemUnion) GetResults

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

func (ConversationNewParamsItemUnion) GetRole

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

func (ConversationNewParamsItemUnion) GetServerLabel

func (u ConversationNewParamsItemUnion) GetServerLabel() *string

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

func (ConversationNewParamsItemUnion) GetStatus

func (u ConversationNewParamsItemUnion) GetStatus() *string

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

func (ConversationNewParamsItemUnion) GetTools

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

func (ConversationNewParamsItemUnion) GetType

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

func (ConversationNewParamsItemUnion) MarshalJSON

func (u ConversationNewParamsItemUnion) MarshalJSON() ([]byte, error)

func (*ConversationNewParamsItemUnion) UnmarshalJSON

func (u *ConversationNewParamsItemUnion) UnmarshalJSON(data []byte) error

type ConversationNewParamsItemWebSearchCall

type ConversationNewParamsItemWebSearchCall 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 (ConversationNewParamsItemWebSearchCall) MarshalJSON

func (r ConversationNewParamsItemWebSearchCall) MarshalJSON() (data []byte, err error)

func (*ConversationNewParamsItemWebSearchCall) UnmarshalJSON

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

type ConversationObject

type ConversationObject struct {
	ID        string                `json:"id,required"`
	CreatedAt int64                 `json:"created_at,required"`
	Object    constant.Conversation `json:"object,required"`
	Items     []any                 `json:"items"`
	Metadata  map[string]string     `json:"metadata"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Object      respjson.Field
		Items       respjson.Field
		Metadata    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpenAI-compatible conversation object.

func (ConversationObject) RawJSON

func (r ConversationObject) RawJSON() string

Returns the unmodified JSON received from the API

func (*ConversationObject) UnmarshalJSON

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

type ConversationService

type ConversationService struct {
	Options []option.RequestOption
	Items   ConversationItemService
}

ConversationService 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 NewConversationService method instead.

func NewConversationService

func NewConversationService(opts ...option.RequestOption) (r ConversationService)

NewConversationService 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 (*ConversationService) Delete

func (r *ConversationService) Delete(ctx context.Context, conversationID string, opts ...option.RequestOption) (res *ConversationDeleteResponse, err error)

Delete a conversation. Delete a conversation with the given ID.

func (*ConversationService) Get

func (r *ConversationService) Get(ctx context.Context, conversationID string, opts ...option.RequestOption) (res *ConversationObject, err error)

Retrieve a conversation. Get a conversation with the given ID.

func (*ConversationService) New

Create a conversation. Create a conversation.

func (*ConversationService) Update

func (r *ConversationService) Update(ctx context.Context, conversationID string, body ConversationUpdateParams, opts ...option.RequestOption) (res *ConversationObject, err error)

Update a conversation. Update a conversation's metadata with the given ID.

type ConversationUpdateParams

type ConversationUpdateParams struct {
	// Set of key-value pairs that can be attached to an object.
	Metadata map[string]string `json:"metadata,omitzero,required"`
	// contains filtered or unexported fields
}

func (ConversationUpdateParams) MarshalJSON

func (r ConversationUpdateParams) MarshalJSON() (data []byte, err error)

func (*ConversationUpdateParams) UnmarshalJSON

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

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.
	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 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 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

Create embeddings. Generate OpenAI-compatible embeddings for the given input using the specified model.

type Error

type Error = apierror.Error

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]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 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", "batch".
	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", "batch".
	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"
	FileListParamsPurposeBatch      FileListParamsPurpose = "batch"
)

type FileNewParams

type FileNewParams struct {
	File io.Reader `json:"file,omitzero,required" format:"binary"`
	// Valid purpose values for OpenAI Files API.
	//
	// Any of "assistants", "batch".
	Purpose FileNewParamsPurpose `json:"purpose,omitzero,required"`
	// Control expiration of uploaded files. Params:
	//
	// - anchor, must be "created_at"
	// - seconds, must be int between 3600 and 2592000 (1 hour to 30 days)
	ExpiresAfter FileNewParamsExpiresAfter `json:"expires_after,omitzero"`
	// contains filtered or unexported fields
}

func (FileNewParams) MarshalMultipart

func (r FileNewParams) MarshalMultipart() (data []byte, contentType string, err error)

type FileNewParamsExpiresAfter

type FileNewParamsExpiresAfter struct {
	Seconds int64 `json:"seconds,required"`
	// This field can be elided, and will marshal its zero value as "created_at".
	Anchor constant.CreatedAt `json:"anchor,required"`
	// contains filtered or unexported fields
}

Control expiration of uploaded files. Params:

- anchor, must be "created_at" - seconds, must be int between 3600 and 2592000 (1 hour to 30 days)

The properties Anchor, Seconds are required.

func (FileNewParamsExpiresAfter) MarshalJSON

func (r FileNewParamsExpiresAfter) MarshalJSON() (data []byte, err error)

func (*FileNewParamsExpiresAfter) UnmarshalJSON

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

type FileNewParamsPurpose

type FileNewParamsPurpose string

Valid purpose values for OpenAI Files API.

const (
	FileNewParamsPurposeAssistants FileNewParamsPurpose = "assistants"
	FileNewParamsPurposeBatch      FileNewParamsPurpose = "batch"
)

type FilePurpose

type FilePurpose string

The intended purpose of the file

const (
	FilePurposeAssistants FilePurpose = "assistants"
	FilePurposeBatch      FilePurpose = "batch"
)

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)

Retrieve file content. 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 file.

func (*FileService) Get

func (r *FileService) Get(ctx context.Context, fileID string, opts ...option.RequestOption) (res *File, err error)

Retrieve file. Returns information about a specific file.

func (*FileService) List

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

func (*FileService) ListAutoPaging

List files. 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 file. 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. - expires_after: Optional form values describing expiration for the 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 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 health status. 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 version. Get the version of the service.

type InterleavedContentImageContentItem

type InterleavedContentImageContentItem struct {
	// Image as a base64 encoded string or an URL
	Image InterleavedContentImageContentItemImage `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 (InterleavedContentImageContentItem) RawJSON

Returns the unmodified JSON received from the API

func (*InterleavedContentImageContentItem) UnmarshalJSON

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

type InterleavedContentImageContentItemImage

type InterleavedContentImageContentItemImage 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 InterleavedContentImageContentItemImageURL `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 (InterleavedContentImageContentItemImage) RawJSON

Returns the unmodified JSON received from the API

func (*InterleavedContentImageContentItemImage) UnmarshalJSON

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

type InterleavedContentImageContentItemImageParam

type InterleavedContentImageContentItemImageParam 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 InterleavedContentImageContentItemImageURLParam `json:"url,omitzero"`
	// contains filtered or unexported fields
}

Image as a base64 encoded string or an URL

func (InterleavedContentImageContentItemImageParam) MarshalJSON

func (r InterleavedContentImageContentItemImageParam) MarshalJSON() (data []byte, err error)

func (*InterleavedContentImageContentItemImageParam) UnmarshalJSON

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

type InterleavedContentImageContentItemImageURL

type InterleavedContentImageContentItemImageURL 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 (InterleavedContentImageContentItemImageURL) RawJSON

Returns the unmodified JSON received from the API

func (*InterleavedContentImageContentItemImageURL) UnmarshalJSON

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

type InterleavedContentImageContentItemImageURLParam

type InterleavedContentImageContentItemImageURLParam 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 (InterleavedContentImageContentItemImageURLParam) MarshalJSON

func (r InterleavedContentImageContentItemImageURLParam) MarshalJSON() (data []byte, err error)

func (*InterleavedContentImageContentItemImageURLParam) UnmarshalJSON

type InterleavedContentImageContentItemParam

type InterleavedContentImageContentItemParam struct {
	// Image as a base64 encoded string or an URL
	Image InterleavedContentImageContentItemImageParam `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 (InterleavedContentImageContentItemParam) MarshalJSON

func (r InterleavedContentImageContentItemParam) MarshalJSON() (data []byte, err error)

func (*InterleavedContentImageContentItemParam) UnmarshalJSON

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

type InterleavedContentItemImage

type InterleavedContentItemImage struct {
	// Image as a base64 encoded string or an URL
	Image InterleavedContentItemImageImage `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 (InterleavedContentItemImage) RawJSON

func (r InterleavedContentItemImage) RawJSON() string

Returns the unmodified JSON received from the API

func (*InterleavedContentItemImage) UnmarshalJSON

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

type InterleavedContentItemImageImage

type InterleavedContentItemImageImage 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 InterleavedContentItemImageImageURL `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 (InterleavedContentItemImageImage) RawJSON

Returns the unmodified JSON received from the API

func (*InterleavedContentItemImageImage) UnmarshalJSON

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

type InterleavedContentItemImageImageParam

type InterleavedContentItemImageImageParam 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 InterleavedContentItemImageImageURLParam `json:"url,omitzero"`
	// contains filtered or unexported fields
}

Image as a base64 encoded string or an URL

func (InterleavedContentItemImageImageParam) MarshalJSON

func (r InterleavedContentItemImageImageParam) MarshalJSON() (data []byte, err error)

func (*InterleavedContentItemImageImageParam) UnmarshalJSON

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

type InterleavedContentItemImageImageURL

type InterleavedContentItemImageImageURL 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 (InterleavedContentItemImageImageURL) RawJSON

Returns the unmodified JSON received from the API

func (*InterleavedContentItemImageImageURL) UnmarshalJSON

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

type InterleavedContentItemImageImageURLParam

type InterleavedContentItemImageImageURLParam 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 (InterleavedContentItemImageImageURLParam) MarshalJSON

func (r InterleavedContentItemImageImageURLParam) MarshalJSON() (data []byte, err error)

func (*InterleavedContentItemImageImageURLParam) UnmarshalJSON

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

type InterleavedContentItemImageParam

type InterleavedContentItemImageParam struct {
	// Image as a base64 encoded string or an URL
	Image InterleavedContentItemImageImageParam `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 (InterleavedContentItemImageParam) MarshalJSON

func (r InterleavedContentItemImageParam) MarshalJSON() (data []byte, err error)

func (*InterleavedContentItemImageParam) UnmarshalJSON

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

type InterleavedContentItemText

type InterleavedContentItemText 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 (InterleavedContentItemText) RawJSON

func (r InterleavedContentItemText) RawJSON() string

Returns the unmodified JSON received from the API

func (*InterleavedContentItemText) UnmarshalJSON

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

type InterleavedContentItemTextParam

type InterleavedContentItemTextParam 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 (InterleavedContentItemTextParam) MarshalJSON

func (r InterleavedContentItemTextParam) MarshalJSON() (data []byte, err error)

func (*InterleavedContentItemTextParam) UnmarshalJSON

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

type InterleavedContentItemUnion

type InterleavedContentItemUnion struct {
	// This field is from variant [InterleavedContentItemImage].
	Image InterleavedContentItemImageImage `json:"image"`
	// Any of "image", "text".
	Type string `json:"type"`
	// This field is from variant [InterleavedContentItemText].
	Text string `json:"text"`
	JSON struct {
		Image respjson.Field
		Type  respjson.Field
		Text  respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

InterleavedContentItemUnion contains all possible properties and values from InterleavedContentItemImage, InterleavedContentItemText.

Use the InterleavedContentItemUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (InterleavedContentItemUnion) AsAny

func (u InterleavedContentItemUnion) AsAny() anyInterleavedContentItem

Use the following switch statement to find the correct variant

switch variant := InterleavedContentItemUnion.AsAny().(type) {
case llamastackclient.InterleavedContentItemImage:
case llamastackclient.InterleavedContentItemText:
default:
  fmt.Errorf("no variant present")
}

func (InterleavedContentItemUnion) AsImage

func (InterleavedContentItemUnion) AsText

func (InterleavedContentItemUnion) RawJSON

func (u InterleavedContentItemUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (InterleavedContentItemUnion) ToParam

ToParam converts this InterleavedContentItemUnion to a InterleavedContentItemUnionParam.

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 InterleavedContentItemUnionParam.Overrides()

func (*InterleavedContentItemUnion) UnmarshalJSON

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

type InterleavedContentItemUnionParam

type InterleavedContentItemUnionParam struct {
	OfImage *InterleavedContentItemImageParam `json:",omitzero,inline"`
	OfText  *InterleavedContentItemTextParam  `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 InterleavedContentItemParamOfText

func InterleavedContentItemParamOfText(text string) InterleavedContentItemUnionParam

func (InterleavedContentItemUnionParam) GetImage

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

func (InterleavedContentItemUnionParam) GetText

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

func (InterleavedContentItemUnionParam) GetType

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

func (InterleavedContentItemUnionParam) MarshalJSON

func (u InterleavedContentItemUnionParam) MarshalJSON() ([]byte, error)

func (*InterleavedContentItemUnionParam) UnmarshalJSON

func (u *InterleavedContentItemUnionParam) UnmarshalJSON(data []byte) error

type InterleavedContentTextContentItem

type InterleavedContentTextContentItem 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 (InterleavedContentTextContentItem) RawJSON

Returns the unmodified JSON received from the API

func (*InterleavedContentTextContentItem) UnmarshalJSON

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

type InterleavedContentTextContentItemParam

type InterleavedContentTextContentItemParam 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 (InterleavedContentTextContentItemParam) MarshalJSON

func (r InterleavedContentTextContentItemParam) MarshalJSON() (data []byte, err error)

func (*InterleavedContentTextContentItemParam) UnmarshalJSON

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

type InterleavedContentUnion

type InterleavedContentUnion 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 [[]InterleavedContentItemUnion]
	// instead of an object.
	OfInterleavedContentItemArray []InterleavedContentItemUnion `json:",inline"`
	// This field is from variant [InterleavedContentImageContentItem].
	Image InterleavedContentImageContentItemImage `json:"image"`
	Type  string                                  `json:"type"`
	// This field is from variant [InterleavedContentTextContentItem].
	Text string `json:"text"`
	JSON struct {
		OfString                      respjson.Field
		OfInterleavedContentItemArray respjson.Field
		Image                         respjson.Field
		Type                          respjson.Field
		Text                          respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

InterleavedContentUnion contains all possible properties and values from [string], InterleavedContentImageContentItem, InterleavedContentTextContentItem, [[]InterleavedContentItemUnion].

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 (InterleavedContentUnion) AsImageContentItem

func (InterleavedContentUnion) AsInterleavedContentItemArray

func (u InterleavedContentUnion) AsInterleavedContentItemArray() (v []InterleavedContentItemUnion)

func (InterleavedContentUnion) AsString

func (u InterleavedContentUnion) AsString() (v string)

func (InterleavedContentUnion) AsTextContentItem

func (InterleavedContentUnion) RawJSON

func (u InterleavedContentUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (InterleavedContentUnion) ToParam

ToParam converts this InterleavedContentUnion to a InterleavedContentUnionParam.

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 InterleavedContentUnionParam.Overrides()

func (*InterleavedContentUnion) UnmarshalJSON

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

type InterleavedContentUnionParam

type InterleavedContentUnionParam struct {
	OfString                      param.Opt[string]                        `json:",omitzero,inline"`
	OfImageContentItem            *InterleavedContentImageContentItemParam `json:",omitzero,inline"`
	OfTextContentItem             *InterleavedContentTextContentItemParam  `json:",omitzero,inline"`
	OfInterleavedContentItemArray []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 InterleavedContentParamOfTextContentItem

func InterleavedContentParamOfTextContentItem(text string) InterleavedContentUnionParam

func (InterleavedContentUnionParam) GetImage

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

func (InterleavedContentUnionParam) GetText

func (u InterleavedContentUnionParam) GetText() *string

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

func (InterleavedContentUnionParam) GetType

func (u InterleavedContentUnionParam) GetType() *string

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

func (InterleavedContentUnionParam) MarshalJSON

func (u InterleavedContentUnionParam) MarshalJSON() ([]byte, error)

func (*InterleavedContentUnionParam) UnmarshalJSON

func (u *InterleavedContentUnionParam) UnmarshalJSON(data []byte) error

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 ListPromptsResponse

type ListPromptsResponse struct {
	Data []Prompt `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 model to list prompts.

func (ListPromptsResponse) RawJSON

func (r ListPromptsResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListPromptsResponse) UnmarshalJSON

func (r *ListPromptsResponse) 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 ListVectorStoreFilesInBatchResponse

type ListVectorStoreFilesInBatchResponse struct {
	// List of vector store file objects in the batch
	Data []VectorStoreFile `json:"data,required"`
	// Whether there are more files 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 file in the list for pagination
	FirstID string `json:"first_id"`
	// (Optional) ID of the last file 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 files in a vector store file batch.

func (ListVectorStoreFilesInBatchResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ListVectorStoreFilesInBatchResponse) UnmarshalJSON

func (r *ListVectorStoreFilesInBatchResponse) 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 Model

type Model struct {
	ID             string                              `json:"id,required"`
	Created        int64                               `json:"created,required"`
	Object         constant.Model                      `json:"object,required"`
	OwnedBy        string                              `json:"owned_by,required"`
	CustomMetadata map[string]ModelCustomMetadataUnion `json:"custom_metadata"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID             respjson.Field
		Created        respjson.Field
		Object         respjson.Field
		OwnedBy        respjson.Field
		CustomMetadata respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A model from OpenAI.

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 ModelCustomMetadataUnion

type ModelCustomMetadataUnion 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:"-"`
}

ModelCustomMetadataUnion 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 (ModelCustomMetadataUnion) AsAnyArray

func (u ModelCustomMetadataUnion) AsAnyArray() (v []any)

func (ModelCustomMetadataUnion) AsBool

func (u ModelCustomMetadataUnion) AsBool() (v bool)

func (ModelCustomMetadataUnion) AsFloat

func (u ModelCustomMetadataUnion) AsFloat() (v float64)

func (ModelCustomMetadataUnion) AsString

func (u ModelCustomMetadataUnion) AsString() (v string)

func (ModelCustomMetadataUnion) RawJSON

func (u ModelCustomMetadataUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ModelCustomMetadataUnion) UnmarshalJSON

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

type ModelGetResponse

type ModelGetResponse struct {
	// Unique identifier for this resource in llama stack
	Identifier string `json:"identifier,required"`
	// Any additional metadata for this model
	Metadata map[string]ModelGetResponseMetadataUnion `json:"metadata,required"`
	// The type of model (LLM or embedding model)
	//
	// Any of "llm", "embedding", "rerank".
	ModelType ModelGetResponseModelType `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 (ModelGetResponse) RawJSON

func (r ModelGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ModelGetResponse) UnmarshalJSON

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

type ModelGetResponseMetadataUnion

type ModelGetResponseMetadataUnion 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:"-"`
}

ModelGetResponseMetadataUnion 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 (ModelGetResponseMetadataUnion) AsAnyArray

func (u ModelGetResponseMetadataUnion) AsAnyArray() (v []any)

func (ModelGetResponseMetadataUnion) AsBool

func (u ModelGetResponseMetadataUnion) AsBool() (v bool)

func (ModelGetResponseMetadataUnion) AsFloat

func (u ModelGetResponseMetadataUnion) AsFloat() (v float64)

func (ModelGetResponseMetadataUnion) AsString

func (u ModelGetResponseMetadataUnion) AsString() (v string)

func (ModelGetResponseMetadataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ModelGetResponseMetadataUnion) UnmarshalJSON

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

type ModelGetResponseModelType

type ModelGetResponseModelType string

The type of model (LLM or embedding model)

const (
	ModelGetResponseModelTypeLlm       ModelGetResponseModelType = "llm"
	ModelGetResponseModelTypeEmbedding ModelGetResponseModelType = "embedding"
	ModelGetResponseModelTypeRerank    ModelGetResponseModelType = "rerank"
)

type ModelOpenAIService

type ModelOpenAIService struct {
	Options []option.RequestOption
}

ModelOpenAIService 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 NewModelOpenAIService method instead.

func NewModelOpenAIService

func NewModelOpenAIService(opts ...option.RequestOption) (r ModelOpenAIService)

NewModelOpenAIService 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 (*ModelOpenAIService) List

func (r *ModelOpenAIService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Model, err error)

List models using the OpenAI API.

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", "rerank".
	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"
	ModelRegisterParamsModelTypeRerank    ModelRegisterParamsModelType = "rerank"
)

type ModelRegisterResponse

type ModelRegisterResponse struct {
	// Unique identifier for this resource in llama stack
	Identifier string `json:"identifier,required"`
	// Any additional metadata for this model
	Metadata map[string]ModelRegisterResponseMetadataUnion `json:"metadata,required"`
	// The type of model (LLM or embedding model)
	//
	// Any of "llm", "embedding", "rerank".
	ModelType ModelRegisterResponseModelType `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 (ModelRegisterResponse) RawJSON

func (r ModelRegisterResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ModelRegisterResponse) UnmarshalJSON

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

type ModelRegisterResponseMetadataUnion

type ModelRegisterResponseMetadataUnion 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:"-"`
}

ModelRegisterResponseMetadataUnion 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 (ModelRegisterResponseMetadataUnion) AsAnyArray

func (u ModelRegisterResponseMetadataUnion) AsAnyArray() (v []any)

func (ModelRegisterResponseMetadataUnion) AsBool

func (ModelRegisterResponseMetadataUnion) AsFloat

func (ModelRegisterResponseMetadataUnion) AsString

func (u ModelRegisterResponseMetadataUnion) AsString() (v string)

func (ModelRegisterResponseMetadataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ModelRegisterResponseMetadataUnion) UnmarshalJSON

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

type ModelRegisterResponseModelType

type ModelRegisterResponseModelType string

The type of model (LLM or embedding model)

const (
	ModelRegisterResponseModelTypeLlm       ModelRegisterResponseModelType = "llm"
	ModelRegisterResponseModelTypeEmbedding ModelRegisterResponseModelType = "embedding"
	ModelRegisterResponseModelTypeRerank    ModelRegisterResponseModelType = "rerank"
)

type ModelService

type ModelService struct {
	Options []option.RequestOption
	OpenAI  ModelOpenAIService
}

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 *ModelGetResponse, err error)

Get model. Get a model by its identifier.

func (*ModelService) List

func (r *ModelService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Model, err error)

List models using the OpenAI API.

func (*ModelService) Register deprecated

func (r *ModelService) Register(ctx context.Context, body ModelRegisterParams, opts ...option.RequestOption) (res *ModelRegisterResponse, err error)

Register model. Register a model.

Deprecated: deprecated

func (*ModelService) Unregister deprecated

func (r *ModelService) Unregister(ctx context.Context, modelID string, opts ...option.RequestOption) (err error)

Unregister model. Unregister a model.

Deprecated: deprecated

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"`
	// (Optional) The content moderation model you would like to use.
	Model param.Opt[string] `json:"model,omitzero"`
	// 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

Create moderation. 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 Prompt

type Prompt struct {
	// Boolean indicating whether this version is the default version for this prompt
	IsDefault bool `json:"is_default,required"`
	// Unique identifier formatted as 'pmpt\_<48-digit-hash>'
	PromptID string `json:"prompt_id,required"`
	// List of prompt variable names that can be used in the prompt template
	Variables []string `json:"variables,required"`
	// Version (integer starting at 1, incremented on save)
	Version int64 `json:"version,required"`
	// The system prompt text with variable placeholders. Variables are only supported
	// when using the Responses API.
	Prompt string `json:"prompt"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IsDefault   respjson.Field
		PromptID    respjson.Field
		Variables   respjson.Field
		Version     respjson.Field
		Prompt      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A prompt resource representing a stored OpenAI Compatible prompt template in Llama Stack.

func (Prompt) RawJSON

func (r Prompt) RawJSON() string

Returns the unmodified JSON received from the API

func (*Prompt) UnmarshalJSON

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

type PromptGetParams

type PromptGetParams struct {
	// The version of the prompt to get (defaults to latest).
	Version param.Opt[int64] `query:"version,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (PromptGetParams) URLQuery

func (r PromptGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes PromptGetParams's query parameters as `url.Values`.

type PromptNewParams

type PromptNewParams struct {
	// The prompt text content with variable placeholders.
	Prompt string `json:"prompt,required"`
	// List of variable names that can be used in the prompt template.
	Variables []string `json:"variables,omitzero"`
	// contains filtered or unexported fields
}

func (PromptNewParams) MarshalJSON

func (r PromptNewParams) MarshalJSON() (data []byte, err error)

func (*PromptNewParams) UnmarshalJSON

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

type PromptService

type PromptService struct {
	Options  []option.RequestOption
	Versions PromptVersionService
}

PromptService 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 NewPromptService method instead.

func NewPromptService

func NewPromptService(opts ...option.RequestOption) (r PromptService)

NewPromptService 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 (*PromptService) Delete

func (r *PromptService) Delete(ctx context.Context, promptID string, opts ...option.RequestOption) (err error)

Delete prompt. Delete a prompt.

func (*PromptService) Get

func (r *PromptService) Get(ctx context.Context, promptID string, query PromptGetParams, opts ...option.RequestOption) (res *Prompt, err error)

Get prompt. Get a prompt by its identifier and optional version.

func (*PromptService) List

func (r *PromptService) List(ctx context.Context, opts ...option.RequestOption) (res *[]Prompt, err error)

List all prompts.

func (*PromptService) New

func (r *PromptService) New(ctx context.Context, body PromptNewParams, opts ...option.RequestOption) (res *Prompt, err error)

Create prompt. Create a new prompt.

func (*PromptService) SetDefaultVersion

func (r *PromptService) SetDefaultVersion(ctx context.Context, promptID string, body PromptSetDefaultVersionParams, opts ...option.RequestOption) (res *Prompt, err error)

Set prompt version. Set which version of a prompt should be the default in get_prompt (latest).

func (*PromptService) Update

func (r *PromptService) Update(ctx context.Context, promptID string, body PromptUpdateParams, opts ...option.RequestOption) (res *Prompt, err error)

Update prompt. Update an existing prompt (increments version).

type PromptSetDefaultVersionParams

type PromptSetDefaultVersionParams struct {
	// The version to set as default.
	Version int64 `json:"version,required"`
	// contains filtered or unexported fields
}

func (PromptSetDefaultVersionParams) MarshalJSON

func (r PromptSetDefaultVersionParams) MarshalJSON() (data []byte, err error)

func (*PromptSetDefaultVersionParams) UnmarshalJSON

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

type PromptUpdateParams

type PromptUpdateParams struct {
	// The updated prompt text content.
	Prompt string `json:"prompt,required"`
	// Set the new version as the default (default=True).
	SetAsDefault bool `json:"set_as_default,required"`
	// The current version of the prompt being updated.
	Version int64 `json:"version,required"`
	// Updated list of variable names that can be used in the prompt template.
	Variables []string `json:"variables,omitzero"`
	// contains filtered or unexported fields
}

func (PromptUpdateParams) MarshalJSON

func (r PromptUpdateParams) MarshalJSON() (data []byte, err error)

func (*PromptUpdateParams) UnmarshalJSON

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

type PromptVersionService

type PromptVersionService struct {
	Options []option.RequestOption
}

PromptVersionService 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 NewPromptVersionService method instead.

func NewPromptVersionService

func NewPromptVersionService(opts ...option.RequestOption) (r PromptVersionService)

NewPromptVersionService 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 (*PromptVersionService) List

func (r *PromptVersionService) List(ctx context.Context, promptID string, opts ...option.RequestOption) (res *[]Prompt, err error)

List prompt versions. List all versions of a specific prompt.

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 provider. 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 providers. 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 {
	// Unique identifier for the chunk. Must be provided explicitly.
	ChunkID string `json:"chunk_id,required"`
	// The content of the chunk, which can be interleaved text, images, or other types.
	Content 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"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ChunkID       respjson.Field
		Content       respjson.Field
		Metadata      respjson.Field
		ChunkMetadata respjson.Field
		Embedding     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 ResponseDeleteResponse

type ResponseDeleteResponse struct {
	// Unique identifier of the deleted response
	ID string `json:"id,required"`
	// Deletion confirmation flag, always True
	Deleted bool `json:"deleted,required"`
	// Object type identifier, always "response"
	Object constant.Response `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 object confirming deletion of an OpenAI response.

func (ResponseDeleteResponse) RawJSON

func (r ResponseDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ResponseDeleteResponse) UnmarshalJSON

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

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 ResponseInputItemListResponseDataOpenAIResponseMcpApprovalRequest

type ResponseInputItemListResponseDataOpenAIResponseMcpApprovalRequest struct {
	ID          string                      `json:"id,required"`
	Arguments   string                      `json:"arguments,required"`
	Name        string                      `json:"name,required"`
	ServerLabel string                      `json:"server_label,required"`
	Type        constant.McpApprovalRequest `json:"type,required"`
	// 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
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request for human approval of a tool invocation.

func (ResponseInputItemListResponseDataOpenAIResponseMcpApprovalRequest) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMcpApprovalRequest) UnmarshalJSON

type ResponseInputItemListResponseDataOpenAIResponseMcpApprovalResponse

type ResponseInputItemListResponseDataOpenAIResponseMcpApprovalResponse struct {
	ApprovalRequestID string                       `json:"approval_request_id,required"`
	Approve           bool                         `json:"approve,required"`
	Type              constant.McpApprovalResponse `json:"type,required"`
	ID                string                       `json:"id"`
	Reason            string                       `json:"reason"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ApprovalRequestID respjson.Field
		Approve           respjson.Field
		Type              respjson.Field
		ID                respjson.Field
		Reason            respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A response to an MCP approval request.

func (ResponseInputItemListResponseDataOpenAIResponseMcpApprovalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMcpApprovalResponse) 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 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 ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputFile

type ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputFile struct {
	// The type of the input item. Always `input_file`.
	Type constant.InputFile `json:"type,required"`
	// The data of the file to be sent to the model.
	FileData string `json:"file_data"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// The URL of the file to be sent to the model.
	FileURL string `json:"file_url"`
	// The name of the file to be sent to the model.
	Filename string `json:"filename"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		FileData    respjson.Field
		FileID      respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File content for input messages in OpenAI response format.

func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputFile) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputFile) UnmarshalJSON

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) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// (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
		FileID      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", "input_file".
	Type string `json:"type"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage].
	Detail ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImageDetail `json:"detail"`
	FileID string                                                                                 `json:"file_id"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage].
	ImageURL string `json:"image_url"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputFile].
	FileData string `json:"file_data"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputFile].
	FileURL string `json:"file_url"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputFile].
	Filename string `json:"filename"`
	JSON     struct {
		Text     respjson.Field
		Type     respjson.Field
		Detail   respjson.Field
		FileID   respjson.Field
		ImageURL respjson.Field
		FileData respjson.Field
		FileURL  respjson.Field
		Filename respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion contains all possible properties and values from ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputText, ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputImage, ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputFile.

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:
case llamastackclient.ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemInputFile:
default:
  fmt.Errorf("no variant present")
}

func (ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion) AsInputFile

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.
	OfVariant2 []ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion `json:",inline"`
	JSON       struct {
		OfString   respjson.Field
		OfVariant2 respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion contains all possible properties and values from [string], [[]ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion], [[]ResponseInputItemListResponseDataOpenAIResponseMessageContentArrayItemUnion].

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 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 ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpCall

type ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpCall 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 (ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpCall) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpCall) UnmarshalJSON

type ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListTools

type ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListTools 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 []ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsTool `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 (ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListTools) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListTools) UnmarshalJSON

type ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsTool

type ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsTool struct {
	// JSON schema defining the tool's input parameters
	InputSchema map[string]ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion `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 (ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsTool) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsTool) UnmarshalJSON

type ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion

type ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion 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:"-"`
}

ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion 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 (ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) AsAnyArray

func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) AsBool

func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) AsFloat

func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) AsString

func (ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) 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 {
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseMessage].
	Content ResponseInputItemListResponseDataOpenAIResponseMessageContentUnion `json:"content"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseMessage].
	Role   ResponseInputItemListResponseDataOpenAIResponseMessageRole `json:"role"`
	Type   string                                                     `json:"type"`
	ID     string                                                     `json:"id"`
	Status string                                                     `json:"status"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall].
	Queries []string `json:"queries"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall].
	Results     []ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCallResult `json:"results"`
	Arguments   string                                                                                 `json:"arguments"`
	CallID      string                                                                                 `json:"call_id"`
	Name        string                                                                                 `json:"name"`
	ServerLabel string                                                                                 `json:"server_label"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpCall].
	Error  string `json:"error"`
	Output string `json:"output"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListTools].
	Tools []ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListToolsTool `json:"tools"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseMcpApprovalResponse].
	ApprovalRequestID string `json:"approval_request_id"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseMcpApprovalResponse].
	Approve bool `json:"approve"`
	// This field is from variant
	// [ResponseInputItemListResponseDataOpenAIResponseMcpApprovalResponse].
	Reason string `json:"reason"`
	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
		ApprovalRequestID respjson.Field
		Approve           respjson.Field
		Reason            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseInputItemListResponseDataUnion contains all possible properties and values from ResponseInputItemListResponseDataOpenAIResponseMessage, ResponseInputItemListResponseDataOpenAIResponseOutputMessageWebSearchToolCall, ResponseInputItemListResponseDataOpenAIResponseOutputMessageFileSearchToolCall, ResponseInputItemListResponseDataOpenAIResponseOutputMessageFunctionToolCall, ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpCall, ResponseInputItemListResponseDataOpenAIResponseOutputMessageMcpListTools, ResponseInputItemListResponseDataOpenAIResponseMcpApprovalRequest, ResponseInputItemListResponseDataOpenAIResponseInputFunctionToolCallOutput, ResponseInputItemListResponseDataOpenAIResponseMcpApprovalResponse, ResponseInputItemListResponseDataOpenAIResponseMessage.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseInputFunctionToolCallOutput

func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseMcpApprovalRequest

func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseMcpApprovalResponse

func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseMessage

func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageFileSearchToolCall

func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageFunctionToolCall

func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageMcpCall

func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageMcpListTools

func (ResponseInputItemListResponseDataUnion) AsOpenAIResponseOutputMessageWebSearchToolCall

func (ResponseInputItemListResponseDataUnion) AsResponseInputItemListResponseDataOpenAIResponseMessage

func (u ResponseInputItemListResponseDataUnion) AsResponseInputItemListResponseDataOpenAIResponseMessage() (v ResponseInputItemListResponseDataOpenAIResponseMessage)

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.

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) System message inserted into the model's context
	Instructions string `json:"instructions"`
	// (Optional) Max number of total calls to built-in tools that can be processed in
	// a response
	MaxToolCalls int64 `json:"max_tool_calls"`
	// (Optional) ID of the previous response in a conversation
	PreviousResponseID string `json:"previous_response_id"`
	// (Optional) Reference to a prompt template and its variables.
	Prompt ResponseListResponsePrompt `json:"prompt"`
	// (Optional) Sampling temperature used for generation
	Temperature float64 `json:"temperature"`
	// (Optional) An array of tools the model may call while generating a response.
	Tools []ResponseListResponseToolUnion `json:"tools"`
	// (Optional) Nucleus sampling parameter used for generation
	TopP float64 `json:"top_p"`
	// (Optional) Truncation strategy applied to the response
	Truncation string `json:"truncation"`
	// (Optional) Token usage information for the response
	Usage ResponseListResponseUsage `json:"usage"`
	// 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
		Instructions       respjson.Field
		MaxToolCalls       respjson.Field
		PreviousResponseID respjson.Field
		Prompt             respjson.Field
		Temperature        respjson.Field
		Tools              respjson.Field
		TopP               respjson.Field
		Truncation         respjson.Field
		Usage              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 ResponseListResponseInputOpenAIResponseMcpApprovalRequest

type ResponseListResponseInputOpenAIResponseMcpApprovalRequest struct {
	ID          string                      `json:"id,required"`
	Arguments   string                      `json:"arguments,required"`
	Name        string                      `json:"name,required"`
	ServerLabel string                      `json:"server_label,required"`
	Type        constant.McpApprovalRequest `json:"type,required"`
	// 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
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request for human approval of a tool invocation.

func (ResponseListResponseInputOpenAIResponseMcpApprovalRequest) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMcpApprovalRequest) UnmarshalJSON

type ResponseListResponseInputOpenAIResponseMcpApprovalResponse

type ResponseListResponseInputOpenAIResponseMcpApprovalResponse struct {
	ApprovalRequestID string                       `json:"approval_request_id,required"`
	Approve           bool                         `json:"approve,required"`
	Type              constant.McpApprovalResponse `json:"type,required"`
	ID                string                       `json:"id"`
	Reason            string                       `json:"reason"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ApprovalRequestID respjson.Field
		Approve           respjson.Field
		Type              respjson.Field
		ID                respjson.Field
		Reason            respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A response to an MCP approval request.

func (ResponseListResponseInputOpenAIResponseMcpApprovalResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMcpApprovalResponse) 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 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 ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputFile

type ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputFile struct {
	// The type of the input item. Always `input_file`.
	Type constant.InputFile `json:"type,required"`
	// The data of the file to be sent to the model.
	FileData string `json:"file_data"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// The URL of the file to be sent to the model.
	FileURL string `json:"file_url"`
	// The name of the file to be sent to the model.
	Filename string `json:"filename"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		FileData    respjson.Field
		FileID      respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File content for input messages in OpenAI response format.

func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputFile) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputFile) UnmarshalJSON

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) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// (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
		FileID      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", "input_file".
	Type string `json:"type"`
	// This field is from variant
	// [ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage].
	Detail ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImageDetail `json:"detail"`
	FileID string                                                                         `json:"file_id"`
	// This field is from variant
	// [ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage].
	ImageURL string `json:"image_url"`
	// This field is from variant
	// [ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputFile].
	FileData string `json:"file_data"`
	// This field is from variant
	// [ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputFile].
	FileURL string `json:"file_url"`
	// This field is from variant
	// [ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputFile].
	Filename string `json:"filename"`
	JSON     struct {
		Text     respjson.Field
		Type     respjson.Field
		Detail   respjson.Field
		FileID   respjson.Field
		ImageURL respjson.Field
		FileData respjson.Field
		FileURL  respjson.Field
		Filename respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion contains all possible properties and values from ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputText, ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputImage, ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputFile.

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:
case llamastackclient.ResponseListResponseInputOpenAIResponseMessageContentArrayItemInputFile:
default:
  fmt.Errorf("no variant present")
}

func (ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion) AsInputFile

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.
	OfVariant2 []ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion `json:",inline"`
	JSON       struct {
		OfString   respjson.Field
		OfVariant2 respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseListResponseInputOpenAIResponseMessageContentUnion contains all possible properties and values from [string], [[]ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion], [[]ResponseListResponseInputOpenAIResponseMessageContentArrayItemUnion].

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 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 ResponseListResponseInputOpenAIResponseOutputMessageMcpCall

type ResponseListResponseInputOpenAIResponseOutputMessageMcpCall 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 (ResponseListResponseInputOpenAIResponseOutputMessageMcpCall) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseOutputMessageMcpCall) UnmarshalJSON

type ResponseListResponseInputOpenAIResponseOutputMessageMcpListTools

type ResponseListResponseInputOpenAIResponseOutputMessageMcpListTools 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 []ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsTool `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 (ResponseListResponseInputOpenAIResponseOutputMessageMcpListTools) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseOutputMessageMcpListTools) UnmarshalJSON

type ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsTool

type ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsTool struct {
	// JSON schema defining the tool's input parameters
	InputSchema map[string]ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion `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 (ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsTool) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsTool) UnmarshalJSON

type ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion

type ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion 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:"-"`
}

ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion 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 (ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) AsAnyArray

func (ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) AsBool

func (ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) AsFloat

func (ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) AsString

func (ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) 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 {
	// This field is from variant [ResponseListResponseInputOpenAIResponseMessage].
	Content ResponseListResponseInputOpenAIResponseMessageContentUnion `json:"content"`
	// This field is from variant [ResponseListResponseInputOpenAIResponseMessage].
	Role   ResponseListResponseInputOpenAIResponseMessageRole `json:"role"`
	Type   string                                             `json:"type"`
	ID     string                                             `json:"id"`
	Status string                                             `json:"status"`
	// This field is from variant
	// [ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall].
	Queries []string `json:"queries"`
	// This field is from variant
	// [ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall].
	Results     []ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCallResult `json:"results"`
	Arguments   string                                                                         `json:"arguments"`
	CallID      string                                                                         `json:"call_id"`
	Name        string                                                                         `json:"name"`
	ServerLabel string                                                                         `json:"server_label"`
	// This field is from variant
	// [ResponseListResponseInputOpenAIResponseOutputMessageMcpCall].
	Error  string `json:"error"`
	Output string `json:"output"`
	// This field is from variant
	// [ResponseListResponseInputOpenAIResponseOutputMessageMcpListTools].
	Tools []ResponseListResponseInputOpenAIResponseOutputMessageMcpListToolsTool `json:"tools"`
	// This field is from variant
	// [ResponseListResponseInputOpenAIResponseMcpApprovalResponse].
	ApprovalRequestID string `json:"approval_request_id"`
	// This field is from variant
	// [ResponseListResponseInputOpenAIResponseMcpApprovalResponse].
	Approve bool `json:"approve"`
	// This field is from variant
	// [ResponseListResponseInputOpenAIResponseMcpApprovalResponse].
	Reason string `json:"reason"`
	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
		ApprovalRequestID respjson.Field
		Approve           respjson.Field
		Reason            respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseListResponseInputUnion contains all possible properties and values from ResponseListResponseInputOpenAIResponseMessage, ResponseListResponseInputOpenAIResponseOutputMessageWebSearchToolCall, ResponseListResponseInputOpenAIResponseOutputMessageFileSearchToolCall, ResponseListResponseInputOpenAIResponseOutputMessageFunctionToolCall, ResponseListResponseInputOpenAIResponseOutputMessageMcpCall, ResponseListResponseInputOpenAIResponseOutputMessageMcpListTools, ResponseListResponseInputOpenAIResponseMcpApprovalRequest, ResponseListResponseInputOpenAIResponseInputFunctionToolCallOutput, ResponseListResponseInputOpenAIResponseMcpApprovalResponse, ResponseListResponseInputOpenAIResponseMessage.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ResponseListResponseInputUnion) AsOpenAIResponseInputFunctionToolCallOutput

func (ResponseListResponseInputUnion) AsOpenAIResponseMcpApprovalRequest

func (ResponseListResponseInputUnion) AsOpenAIResponseMcpApprovalResponse

func (ResponseListResponseInputUnion) AsOpenAIResponseMessage

func (ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageFileSearchToolCall

func (ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageFunctionToolCall

func (ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageMcpCall

func (ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageMcpListTools

func (ResponseListResponseInputUnion) AsOpenAIResponseOutputMessageWebSearchToolCall

func (ResponseListResponseInputUnion) AsResponseListResponseInputOpenAIResponseMessage

func (u ResponseListResponseInputUnion) AsResponseListResponseInputOpenAIResponseMessage() (v ResponseListResponseInputOpenAIResponseMessage)

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 ResponseListResponseOutputMcpApprovalRequest

type ResponseListResponseOutputMcpApprovalRequest struct {
	ID          string                      `json:"id,required"`
	Arguments   string                      `json:"arguments,required"`
	Name        string                      `json:"name,required"`
	ServerLabel string                      `json:"server_label,required"`
	Type        constant.McpApprovalRequest `json:"type,required"`
	// 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
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request for human approval of a tool invocation.

func (ResponseListResponseOutputMcpApprovalRequest) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputMcpApprovalRequest) UnmarshalJSON

func (r *ResponseListResponseOutputMcpApprovalRequest) 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 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 ResponseListResponseOutputMessageContentArrayItemInputFile

type ResponseListResponseOutputMessageContentArrayItemInputFile struct {
	// The type of the input item. Always `input_file`.
	Type constant.InputFile `json:"type,required"`
	// The data of the file to be sent to the model.
	FileData string `json:"file_data"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// The URL of the file to be sent to the model.
	FileURL string `json:"file_url"`
	// The name of the file to be sent to the model.
	Filename string `json:"filename"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		FileData    respjson.Field
		FileID      respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File content for input messages in OpenAI response format.

func (ResponseListResponseOutputMessageContentArrayItemInputFile) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseOutputMessageContentArrayItemInputFile) UnmarshalJSON

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) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// (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
		FileID      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", "input_file".
	Type string `json:"type"`
	// This field is from variant
	// [ResponseListResponseOutputMessageContentArrayItemInputImage].
	Detail ResponseListResponseOutputMessageContentArrayItemInputImageDetail `json:"detail"`
	FileID string                                                            `json:"file_id"`
	// This field is from variant
	// [ResponseListResponseOutputMessageContentArrayItemInputImage].
	ImageURL string `json:"image_url"`
	// This field is from variant
	// [ResponseListResponseOutputMessageContentArrayItemInputFile].
	FileData string `json:"file_data"`
	// This field is from variant
	// [ResponseListResponseOutputMessageContentArrayItemInputFile].
	FileURL string `json:"file_url"`
	// This field is from variant
	// [ResponseListResponseOutputMessageContentArrayItemInputFile].
	Filename string `json:"filename"`
	JSON     struct {
		Text     respjson.Field
		Type     respjson.Field
		Detail   respjson.Field
		FileID   respjson.Field
		ImageURL respjson.Field
		FileData respjson.Field
		FileURL  respjson.Field
		Filename respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseListResponseOutputMessageContentArrayItemUnion contains all possible properties and values from ResponseListResponseOutputMessageContentArrayItemInputText, ResponseListResponseOutputMessageContentArrayItemInputImage, ResponseListResponseOutputMessageContentArrayItemInputFile.

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:
case llamastackclient.ResponseListResponseOutputMessageContentArrayItemInputFile:
default:
  fmt.Errorf("no variant present")
}

func (ResponseListResponseOutputMessageContentArrayItemUnion) AsInputFile

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.
	OfVariant2 []ResponseListResponseOutputMessageContentArrayItemUnion `json:",inline"`
	JSON       struct {
		OfString   respjson.Field
		OfVariant2 respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseListResponseOutputMessageContentUnion contains all possible properties and values from [string], [[]ResponseListResponseOutputMessageContentArrayItemUnion], [[]ResponseListResponseOutputMessageContentArrayItemUnion].

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 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", "mcp_approval_request".
	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, ResponseListResponseOutputMcpApprovalRequest.

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:
case llamastackclient.ResponseListResponseOutputMcpApprovalRequest:
default:
  fmt.Errorf("no variant present")
}

func (ResponseListResponseOutputUnion) AsFileSearchCall

func (ResponseListResponseOutputUnion) AsFunctionCall

func (ResponseListResponseOutputUnion) AsMcpApprovalRequest

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 ResponseListResponsePrompt

type ResponseListResponsePrompt struct {
	// Unique identifier of the prompt template
	ID string `json:"id,required"`
	// Dictionary of variable names to OpenAIResponseInputMessageContent structure for
	// template substitution. The substitution values can either be strings, or other
	// Response input types like images or files.
	Variables map[string]ResponseListResponsePromptVariableUnion `json:"variables"`
	// Version number of the prompt to use (defaults to latest if not specified)
	Version string `json:"version"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Variables   respjson.Field
		Version     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

(Optional) Reference to a prompt template and its variables.

func (ResponseListResponsePrompt) RawJSON

func (r ResponseListResponsePrompt) RawJSON() string

Returns the unmodified JSON received from the API

func (*ResponseListResponsePrompt) UnmarshalJSON

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

type ResponseListResponsePromptVariableDetail

type ResponseListResponsePromptVariableDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ResponseListResponsePromptVariableDetailLow  ResponseListResponsePromptVariableDetail = "low"
	ResponseListResponsePromptVariableDetailHigh ResponseListResponsePromptVariableDetail = "high"
	ResponseListResponsePromptVariableDetailAuto ResponseListResponsePromptVariableDetail = "auto"
)

type ResponseListResponsePromptVariableInputFile

type ResponseListResponsePromptVariableInputFile struct {
	// The type of the input item. Always `input_file`.
	Type constant.InputFile `json:"type,required"`
	// The data of the file to be sent to the model.
	FileData string `json:"file_data"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// The URL of the file to be sent to the model.
	FileURL string `json:"file_url"`
	// The name of the file to be sent to the model.
	Filename string `json:"filename"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		FileData    respjson.Field
		FileID      respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File content for input messages in OpenAI response format.

func (ResponseListResponsePromptVariableInputFile) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponsePromptVariableInputFile) UnmarshalJSON

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

type ResponseListResponsePromptVariableInputImage

type ResponseListResponsePromptVariableInputImage struct {
	// Level of detail for image processing, can be "low", "high", or "auto"
	//
	// Any of "low", "high", "auto".
	Detail ResponseListResponsePromptVariableInputImageDetail `json:"detail,required"`
	// Content type identifier, always "input_image"
	Type constant.InputImage `json:"type,required"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// (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
		FileID      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 (ResponseListResponsePromptVariableInputImage) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponsePromptVariableInputImage) UnmarshalJSON

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

type ResponseListResponsePromptVariableInputImageDetail

type ResponseListResponsePromptVariableInputImageDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ResponseListResponsePromptVariableInputImageDetailLow  ResponseListResponsePromptVariableInputImageDetail = "low"
	ResponseListResponsePromptVariableInputImageDetailHigh ResponseListResponsePromptVariableInputImageDetail = "high"
	ResponseListResponsePromptVariableInputImageDetailAuto ResponseListResponsePromptVariableInputImageDetail = "auto"
)

type ResponseListResponsePromptVariableInputText

type ResponseListResponsePromptVariableInputText 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 (ResponseListResponsePromptVariableInputText) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponsePromptVariableInputText) UnmarshalJSON

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

type ResponseListResponsePromptVariableUnion

type ResponseListResponsePromptVariableUnion struct {
	// This field is from variant [ResponseListResponsePromptVariableInputText].
	Text string `json:"text"`
	// Any of "input_text", "input_image", "input_file".
	Type string `json:"type"`
	// This field is from variant [ResponseListResponsePromptVariableInputImage].
	Detail ResponseListResponsePromptVariableInputImageDetail `json:"detail"`
	FileID string                                             `json:"file_id"`
	// This field is from variant [ResponseListResponsePromptVariableInputImage].
	ImageURL string `json:"image_url"`
	// This field is from variant [ResponseListResponsePromptVariableInputFile].
	FileData string `json:"file_data"`
	// This field is from variant [ResponseListResponsePromptVariableInputFile].
	FileURL string `json:"file_url"`
	// This field is from variant [ResponseListResponsePromptVariableInputFile].
	Filename string `json:"filename"`
	JSON     struct {
		Text     respjson.Field
		Type     respjson.Field
		Detail   respjson.Field
		FileID   respjson.Field
		ImageURL respjson.Field
		FileData respjson.Field
		FileURL  respjson.Field
		Filename respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseListResponsePromptVariableUnion contains all possible properties and values from ResponseListResponsePromptVariableInputText, ResponseListResponsePromptVariableInputImage, ResponseListResponsePromptVariableInputFile.

Use the ResponseListResponsePromptVariableUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ResponseListResponsePromptVariableUnion) AsAny

func (u ResponseListResponsePromptVariableUnion) AsAny() anyResponseListResponsePromptVariable

Use the following switch statement to find the correct variant

switch variant := ResponseListResponsePromptVariableUnion.AsAny().(type) {
case llamastackclient.ResponseListResponsePromptVariableInputText:
case llamastackclient.ResponseListResponsePromptVariableInputImage:
case llamastackclient.ResponseListResponsePromptVariableInputFile:
default:
  fmt.Errorf("no variant present")
}

func (ResponseListResponsePromptVariableUnion) AsInputFile

func (ResponseListResponsePromptVariableUnion) AsInputImage

func (ResponseListResponsePromptVariableUnion) AsInputText

func (ResponseListResponsePromptVariableUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponsePromptVariableUnion) UnmarshalJSON

func (r *ResponseListResponsePromptVariableUnion) 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 ResponseListResponseToolFileSearch

type ResponseListResponseToolFileSearch struct {
	// Tool type identifier, always "file_search"
	Type constant.FileSearch `json:"type,required"`
	// List of vector store identifiers to search within
	VectorStoreIDs []string `json:"vector_store_ids,required"`
	// (Optional) Additional filters to apply to the search
	Filters map[string]ResponseListResponseToolFileSearchFilterUnion `json:"filters"`
	// (Optional) Maximum number of search results to return (1-50)
	MaxNumResults int64 `json:"max_num_results"`
	// (Optional) Options for ranking and scoring search results
	RankingOptions ResponseListResponseToolFileSearchRankingOptions `json:"ranking_options"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type           respjson.Field
		VectorStoreIDs respjson.Field
		Filters        respjson.Field
		MaxNumResults  respjson.Field
		RankingOptions respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File search tool configuration for OpenAI response inputs.

func (ResponseListResponseToolFileSearch) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseToolFileSearch) UnmarshalJSON

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

type ResponseListResponseToolFileSearchFilterUnion

type ResponseListResponseToolFileSearchFilterUnion 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:"-"`
}

ResponseListResponseToolFileSearchFilterUnion 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 (ResponseListResponseToolFileSearchFilterUnion) AsAnyArray

func (ResponseListResponseToolFileSearchFilterUnion) AsBool

func (ResponseListResponseToolFileSearchFilterUnion) AsFloat

func (ResponseListResponseToolFileSearchFilterUnion) AsString

func (ResponseListResponseToolFileSearchFilterUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseToolFileSearchFilterUnion) UnmarshalJSON

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

type ResponseListResponseToolFileSearchRankingOptions

type ResponseListResponseToolFileSearchRankingOptions struct {
	// (Optional) Name of the ranking algorithm to use
	Ranker string `json:"ranker"`
	// (Optional) Minimum relevance score threshold for results
	ScoreThreshold float64 `json:"score_threshold"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Ranker         respjson.Field
		ScoreThreshold respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

(Optional) Options for ranking and scoring search results

func (ResponseListResponseToolFileSearchRankingOptions) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseToolFileSearchRankingOptions) UnmarshalJSON

type ResponseListResponseToolFunction

type ResponseListResponseToolFunction struct {
	// Name of the function that can be called
	Name string `json:"name,required"`
	// Tool type identifier, always "function"
	Type constant.Function `json:"type,required"`
	// (Optional) Description of what the function does
	Description string `json:"description"`
	// (Optional) JSON schema defining the function's parameters
	Parameters map[string]ResponseListResponseToolFunctionParameterUnion `json:"parameters"`
	// (Optional) Whether to enforce strict parameter validation
	Strict bool `json:"strict"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		Type        respjson.Field
		Description respjson.Field
		Parameters  respjson.Field
		Strict      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Function tool configuration for OpenAI response inputs.

func (ResponseListResponseToolFunction) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseToolFunction) UnmarshalJSON

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

type ResponseListResponseToolFunctionParameterUnion

type ResponseListResponseToolFunctionParameterUnion 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:"-"`
}

ResponseListResponseToolFunctionParameterUnion 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 (ResponseListResponseToolFunctionParameterUnion) AsAnyArray

func (ResponseListResponseToolFunctionParameterUnion) AsBool

func (ResponseListResponseToolFunctionParameterUnion) AsFloat

func (ResponseListResponseToolFunctionParameterUnion) AsString

func (ResponseListResponseToolFunctionParameterUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseToolFunctionParameterUnion) UnmarshalJSON

type ResponseListResponseToolMcp

type ResponseListResponseToolMcp struct {
	// Label to identify this MCP server
	ServerLabel string `json:"server_label,required"`
	// Tool type identifier, always "mcp"
	Type constant.Mcp `json:"type,required"`
	// (Optional) Restriction on which tools can be used from this server
	AllowedTools ResponseListResponseToolMcpAllowedToolsUnion `json:"allowed_tools"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ServerLabel  respjson.Field
		Type         respjson.Field
		AllowedTools respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Model Context Protocol (MCP) tool configuration for OpenAI response object.

func (ResponseListResponseToolMcp) RawJSON

func (r ResponseListResponseToolMcp) RawJSON() string

Returns the unmodified JSON received from the API

func (*ResponseListResponseToolMcp) UnmarshalJSON

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

type ResponseListResponseToolMcpAllowedToolsAllowedToolsFilter

type ResponseListResponseToolMcpAllowedToolsAllowedToolsFilter struct {
	// (Optional) List of specific tool names that are allowed
	ToolNames []string `json:"tool_names"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ToolNames   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Filter configuration for restricting which MCP tools can be used.

func (ResponseListResponseToolMcpAllowedToolsAllowedToolsFilter) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseToolMcpAllowedToolsAllowedToolsFilter) UnmarshalJSON

type ResponseListResponseToolMcpAllowedToolsUnion

type ResponseListResponseToolMcpAllowedToolsUnion struct {
	// This field will be present if the value is a [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant
	// [ResponseListResponseToolMcpAllowedToolsAllowedToolsFilter].
	ToolNames []string `json:"tool_names"`
	JSON      struct {
		OfStringArray respjson.Field
		ToolNames     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseListResponseToolMcpAllowedToolsUnion contains all possible properties and values from [[]string], ResponseListResponseToolMcpAllowedToolsAllowedToolsFilter.

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: OfStringArray]

func (ResponseListResponseToolMcpAllowedToolsUnion) AsAllowedToolsFilter

func (ResponseListResponseToolMcpAllowedToolsUnion) AsStringArray

func (u ResponseListResponseToolMcpAllowedToolsUnion) AsStringArray() (v []string)

func (ResponseListResponseToolMcpAllowedToolsUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseToolMcpAllowedToolsUnion) UnmarshalJSON

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

type ResponseListResponseToolOpenAIResponseInputToolWebSearch

type ResponseListResponseToolOpenAIResponseInputToolWebSearch struct {
	// Web search tool type variant to use
	//
	// Any of "web_search", "web_search_preview", "web_search_preview_2025_03_11",
	// "web_search_2025_08_26".
	Type ResponseListResponseToolOpenAIResponseInputToolWebSearchType `json:"type,required"`
	// (Optional) Size of search context, must be "low", "medium", or "high"
	SearchContextSize string `json:"search_context_size"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type              respjson.Field
		SearchContextSize respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Web search tool configuration for OpenAI response inputs.

func (ResponseListResponseToolOpenAIResponseInputToolWebSearch) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseToolOpenAIResponseInputToolWebSearch) UnmarshalJSON

type ResponseListResponseToolOpenAIResponseInputToolWebSearchType

type ResponseListResponseToolOpenAIResponseInputToolWebSearchType string

Web search tool type variant to use

const (
	ResponseListResponseToolOpenAIResponseInputToolWebSearchTypeWebSearch                  ResponseListResponseToolOpenAIResponseInputToolWebSearchType = "web_search"
	ResponseListResponseToolOpenAIResponseInputToolWebSearchTypeWebSearchPreview           ResponseListResponseToolOpenAIResponseInputToolWebSearchType = "web_search_preview"
	ResponseListResponseToolOpenAIResponseInputToolWebSearchTypeWebSearchPreview2025_03_11 ResponseListResponseToolOpenAIResponseInputToolWebSearchType = "web_search_preview_2025_03_11"
	ResponseListResponseToolOpenAIResponseInputToolWebSearchTypeWebSearch2025_08_26        ResponseListResponseToolOpenAIResponseInputToolWebSearchType = "web_search_2025_08_26"
)

type ResponseListResponseToolType

type ResponseListResponseToolType string

Web search tool type variant to use

const (
	ResponseListResponseToolTypeWebSearch                  ResponseListResponseToolType = "web_search"
	ResponseListResponseToolTypeWebSearchPreview           ResponseListResponseToolType = "web_search_preview"
	ResponseListResponseToolTypeWebSearchPreview2025_03_11 ResponseListResponseToolType = "web_search_preview_2025_03_11"
	ResponseListResponseToolTypeWebSearch2025_08_26        ResponseListResponseToolType = "web_search_2025_08_26"
	ResponseListResponseToolTypeFileSearch                 ResponseListResponseToolType = "file_search"
	ResponseListResponseToolTypeFunction                   ResponseListResponseToolType = "function"
	ResponseListResponseToolTypeMcp                        ResponseListResponseToolType = "mcp"
)

type ResponseListResponseToolUnion

type ResponseListResponseToolUnion struct {
	// Any of nil, "file_search", "function", "mcp".
	Type string `json:"type"`
	// This field is from variant
	// [ResponseListResponseToolOpenAIResponseInputToolWebSearch].
	SearchContextSize string `json:"search_context_size"`
	// This field is from variant [ResponseListResponseToolFileSearch].
	VectorStoreIDs []string `json:"vector_store_ids"`
	// This field is from variant [ResponseListResponseToolFileSearch].
	Filters map[string]ResponseListResponseToolFileSearchFilterUnion `json:"filters"`
	// This field is from variant [ResponseListResponseToolFileSearch].
	MaxNumResults int64 `json:"max_num_results"`
	// This field is from variant [ResponseListResponseToolFileSearch].
	RankingOptions ResponseListResponseToolFileSearchRankingOptions `json:"ranking_options"`
	// This field is from variant [ResponseListResponseToolFunction].
	Name string `json:"name"`
	// This field is from variant [ResponseListResponseToolFunction].
	Description string `json:"description"`
	// This field is from variant [ResponseListResponseToolFunction].
	Parameters map[string]ResponseListResponseToolFunctionParameterUnion `json:"parameters"`
	// This field is from variant [ResponseListResponseToolFunction].
	Strict bool `json:"strict"`
	// This field is from variant [ResponseListResponseToolMcp].
	ServerLabel string `json:"server_label"`
	// This field is from variant [ResponseListResponseToolMcp].
	AllowedTools ResponseListResponseToolMcpAllowedToolsUnion `json:"allowed_tools"`
	JSON         struct {
		Type              respjson.Field
		SearchContextSize respjson.Field
		VectorStoreIDs    respjson.Field
		Filters           respjson.Field
		MaxNumResults     respjson.Field
		RankingOptions    respjson.Field
		Name              respjson.Field
		Description       respjson.Field
		Parameters        respjson.Field
		Strict            respjson.Field
		ServerLabel       respjson.Field
		AllowedTools      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseListResponseToolUnion contains all possible properties and values from ResponseListResponseToolOpenAIResponseInputToolWebSearch, ResponseListResponseToolFileSearch, ResponseListResponseToolFunction, ResponseListResponseToolMcp.

Use the [ResponseListResponseToolUnion.AsAny] method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ResponseListResponseToolUnion) AsFileSearch

func (ResponseListResponseToolUnion) AsFunction

func (ResponseListResponseToolUnion) AsMcp

func (ResponseListResponseToolUnion) AsOpenAIResponseInputToolWebSearch

func (ResponseListResponseToolUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseToolUnion) UnmarshalJSON

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

type ResponseListResponseUsage

type ResponseListResponseUsage struct {
	// Number of tokens in the input
	InputTokens int64 `json:"input_tokens,required"`
	// Number of tokens in the output
	OutputTokens int64 `json:"output_tokens,required"`
	// Total tokens used (input + output)
	TotalTokens int64 `json:"total_tokens,required"`
	// Detailed breakdown of input token usage
	InputTokensDetails ResponseListResponseUsageInputTokensDetails `json:"input_tokens_details"`
	// Detailed breakdown of output token usage
	OutputTokensDetails ResponseListResponseUsageOutputTokensDetails `json:"output_tokens_details"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InputTokens         respjson.Field
		OutputTokens        respjson.Field
		TotalTokens         respjson.Field
		InputTokensDetails  respjson.Field
		OutputTokensDetails respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

(Optional) Token usage information for the response

func (ResponseListResponseUsage) RawJSON

func (r ResponseListResponseUsage) RawJSON() string

Returns the unmodified JSON received from the API

func (*ResponseListResponseUsage) UnmarshalJSON

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

type ResponseListResponseUsageInputTokensDetails

type ResponseListResponseUsageInputTokensDetails struct {
	// Number of tokens retrieved from cache
	CachedTokens int64 `json:"cached_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CachedTokens respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Detailed breakdown of input token usage

func (ResponseListResponseUsageInputTokensDetails) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseUsageInputTokensDetails) UnmarshalJSON

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

type ResponseListResponseUsageOutputTokensDetails

type ResponseListResponseUsageOutputTokensDetails struct {
	// Number of tokens used for reasoning (o1/o3 models)
	ReasoningTokens int64 `json:"reasoning_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ReasoningTokens respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Detailed breakdown of output token usage

func (ResponseListResponseUsageOutputTokensDetails) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseListResponseUsageOutputTokensDetails) UnmarshalJSON

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

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"`
	// (Optional) The ID of a conversation to add the response to. Must begin with
	// 'conv\_'. Input and output messages will be automatically added to the
	// conversation.
	Conversation  param.Opt[string] `json:"conversation,omitzero"`
	Instructions  param.Opt[string] `json:"instructions,omitzero"`
	MaxInferIters param.Opt[int64]  `json:"max_infer_iters,omitzero"`
	// (Optional) Max number of total calls to built-in tools that can be processed in
	// a response.
	MaxToolCalls param.Opt[int64] `json:"max_tool_calls,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"`
	// (Optional) Prompt object with ID, version, and variables.
	Prompt ResponseNewParamsPrompt `json:"prompt,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 ResponseNewParamsInputArrayItemOpenAIResponseMcpApprovalRequest

type ResponseNewParamsInputArrayItemOpenAIResponseMcpApprovalRequest struct {
	ID          string `json:"id,required"`
	Arguments   string `json:"arguments,required"`
	Name        string `json:"name,required"`
	ServerLabel string `json:"server_label,required"`
	// This field can be elided, and will marshal its zero value as
	// "mcp_approval_request".
	Type constant.McpApprovalRequest `json:"type,required"`
	// contains filtered or unexported fields
}

A request for human approval of a tool invocation.

The properties ID, Arguments, Name, ServerLabel, Type are required.

func (ResponseNewParamsInputArrayItemOpenAIResponseMcpApprovalRequest) MarshalJSON

func (*ResponseNewParamsInputArrayItemOpenAIResponseMcpApprovalRequest) UnmarshalJSON

type ResponseNewParamsInputArrayItemOpenAIResponseMcpApprovalResponse

type ResponseNewParamsInputArrayItemOpenAIResponseMcpApprovalResponse struct {
	ApprovalRequestID string            `json:"approval_request_id,required"`
	Approve           bool              `json:"approve,required"`
	ID                param.Opt[string] `json:"id,omitzero"`
	Reason            param.Opt[string] `json:"reason,omitzero"`
	// This field can be elided, and will marshal its zero value as
	// "mcp_approval_response".
	Type constant.McpApprovalResponse `json:"type,required"`
	// contains filtered or unexported fields
}

A response to an MCP approval request.

The properties ApprovalRequestID, Approve, Type are required.

func (ResponseNewParamsInputArrayItemOpenAIResponseMcpApprovalResponse) MarshalJSON

func (*ResponseNewParamsInputArrayItemOpenAIResponseMcpApprovalResponse) 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 ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputFile

type ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputFile struct {
	// The data of the file to be sent to the model.
	FileData param.Opt[string] `json:"file_data,omitzero"`
	// (Optional) The ID of the file to be sent to the model.
	FileID param.Opt[string] `json:"file_id,omitzero"`
	// The URL of the file to be sent to the model.
	FileURL param.Opt[string] `json:"file_url,omitzero"`
	// The name of the file to be sent to the model.
	Filename param.Opt[string] `json:"filename,omitzero"`
	// The type of the input item. Always `input_file`.
	//
	// This field can be elided, and will marshal its zero value as "input_file".
	Type constant.InputFile `json:"type,required"`
	// contains filtered or unexported fields
}

File content for input messages in OpenAI response format.

The property Type is required.

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputFile) MarshalJSON

func (*ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputFile) 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) The ID of the file to be sent to the model.
	FileID param.Opt[string] `json:"file_id,omitzero"`
	// (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"`
	OfInputFile  *ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemInputFile  `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) GetFileData

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

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetFileID

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

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetFileURL

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

func (ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion) GetFilename

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                                                    []ResponseNewParamsInputArrayItemOpenAIResponseMessageContentArrayItemUnion `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 ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpCall

type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpCall 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"`
	// (Optional) Error message if the MCP call failed
	Error param.Opt[string] `json:"error,omitzero"`
	// (Optional) Output result from the successful MCP call
	Output param.Opt[string] `json:"output,omitzero"`
	// Tool call type identifier, always "mcp_call"
	//
	// This field can be elided, and will marshal its zero value as "mcp_call".
	Type constant.McpCall `json:"type,required"`
	// contains filtered or unexported fields
}

Model Context Protocol (MCP) call output message for OpenAI responses.

The properties ID, Arguments, Name, ServerLabel, Type are required.

func (ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpCall) MarshalJSON

func (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpCall) UnmarshalJSON

type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListTools

type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListTools 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 []ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListToolsTool `json:"tools,omitzero,required"`
	// Tool call type identifier, always "mcp_list_tools"
	//
	// This field can be elided, and will marshal its zero value as "mcp_list_tools".
	Type constant.McpListTools `json:"type,required"`
	// contains filtered or unexported fields
}

MCP list tools output message containing available tools from an MCP server.

The properties ID, ServerLabel, Tools, Type are required.

func (ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListTools) MarshalJSON

func (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListTools) UnmarshalJSON

type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListToolsTool

type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListToolsTool struct {
	// JSON schema defining the tool's input parameters
	InputSchema map[string]ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion `json:"input_schema,omitzero,required"`
	// Name of the tool
	Name string `json:"name,required"`
	// (Optional) Description of what the tool does
	Description param.Opt[string] `json:"description,omitzero"`
	// contains filtered or unexported fields
}

Tool definition returned by MCP list tools operation.

The properties InputSchema, Name are required.

func (ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListToolsTool) MarshalJSON

func (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListToolsTool) UnmarshalJSON

type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion

type ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion 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 (ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) MarshalJSON

func (*ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListToolsToolInputSchemaUnion) 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 {
	OfOpenAIResponseMessage                           *ResponseNewParamsInputArrayItemOpenAIResponseMessage                         `json:",omitzero,inline"`
	OfOpenAIResponseOutputMessageWebSearchToolCall    *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageWebSearchToolCall  `json:",omitzero,inline"`
	OfOpenAIResponseOutputMessageFileSearchToolCall   *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFileSearchToolCall `json:",omitzero,inline"`
	OfOpenAIResponseOutputMessageFunctionToolCall     *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageFunctionToolCall   `json:",omitzero,inline"`
	OfOpenAIResponseOutputMessageMcpCall              *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpCall            `json:",omitzero,inline"`
	OfOpenAIResponseOutputMessageMcpListTools         *ResponseNewParamsInputArrayItemOpenAIResponseOutputMessageMcpListTools       `json:",omitzero,inline"`
	OfOpenAIResponseMcpApprovalRequest                *ResponseNewParamsInputArrayItemOpenAIResponseMcpApprovalRequest              `json:",omitzero,inline"`
	OfOpenAIResponseInputFunctionToolCallOutput       *ResponseNewParamsInputArrayItemOpenAIResponseInputFunctionToolCallOutput     `json:",omitzero,inline"`
	OfOpenAIResponseMcpApprovalResponse               *ResponseNewParamsInputArrayItemOpenAIResponseMcpApprovalResponse             `json:",omitzero,inline"`
	OfResponseNewsInputArrayItemOpenAIResponseMessage *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) GetApprovalRequestID

func (u ResponseNewParamsInputArrayItemUnion) GetApprovalRequestID() *string

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

func (ResponseNewParamsInputArrayItemUnion) GetApprove

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

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 Content property, if present.

func (ResponseNewParamsInputArrayItemUnion) GetError

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

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

func (u ResponseNewParamsInputArrayItemUnion) GetServerLabel() *string

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

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 ResponseNewParamsPrompt

type ResponseNewParamsPrompt struct {
	// Unique identifier of the prompt template
	ID string `json:"id,required"`
	// Version number of the prompt to use (defaults to latest if not specified)
	Version param.Opt[string] `json:"version,omitzero"`
	// Dictionary of variable names to OpenAIResponseInputMessageContent structure for
	// template substitution. The substitution values can either be strings, or other
	// Response input types like images or files.
	Variables map[string]ResponseNewParamsPromptVariableUnion `json:"variables,omitzero"`
	// contains filtered or unexported fields
}

(Optional) Prompt object with ID, version, and variables.

The property ID is required.

func (ResponseNewParamsPrompt) MarshalJSON

func (r ResponseNewParamsPrompt) MarshalJSON() (data []byte, err error)

func (*ResponseNewParamsPrompt) UnmarshalJSON

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

type ResponseNewParamsPromptVariableInputFile

type ResponseNewParamsPromptVariableInputFile struct {
	// The data of the file to be sent to the model.
	FileData param.Opt[string] `json:"file_data,omitzero"`
	// (Optional) The ID of the file to be sent to the model.
	FileID param.Opt[string] `json:"file_id,omitzero"`
	// The URL of the file to be sent to the model.
	FileURL param.Opt[string] `json:"file_url,omitzero"`
	// The name of the file to be sent to the model.
	Filename param.Opt[string] `json:"filename,omitzero"`
	// The type of the input item. Always `input_file`.
	//
	// This field can be elided, and will marshal its zero value as "input_file".
	Type constant.InputFile `json:"type,required"`
	// contains filtered or unexported fields
}

File content for input messages in OpenAI response format.

The property Type is required.

func (ResponseNewParamsPromptVariableInputFile) MarshalJSON

func (r ResponseNewParamsPromptVariableInputFile) MarshalJSON() (data []byte, err error)

func (*ResponseNewParamsPromptVariableInputFile) UnmarshalJSON

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

type ResponseNewParamsPromptVariableInputImage

type ResponseNewParamsPromptVariableInputImage struct {
	// Level of detail for image processing, can be "low", "high", or "auto"
	//
	// Any of "low", "high", "auto".
	Detail ResponseNewParamsPromptVariableInputImageDetail `json:"detail,omitzero,required"`
	// (Optional) The ID of the file to be sent to the model.
	FileID param.Opt[string] `json:"file_id,omitzero"`
	// (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 (ResponseNewParamsPromptVariableInputImage) MarshalJSON

func (r ResponseNewParamsPromptVariableInputImage) MarshalJSON() (data []byte, err error)

func (*ResponseNewParamsPromptVariableInputImage) UnmarshalJSON

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

type ResponseNewParamsPromptVariableInputImageDetail

type ResponseNewParamsPromptVariableInputImageDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ResponseNewParamsPromptVariableInputImageDetailLow  ResponseNewParamsPromptVariableInputImageDetail = "low"
	ResponseNewParamsPromptVariableInputImageDetailHigh ResponseNewParamsPromptVariableInputImageDetail = "high"
	ResponseNewParamsPromptVariableInputImageDetailAuto ResponseNewParamsPromptVariableInputImageDetail = "auto"
)

type ResponseNewParamsPromptVariableInputText

type ResponseNewParamsPromptVariableInputText 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 (ResponseNewParamsPromptVariableInputText) MarshalJSON

func (r ResponseNewParamsPromptVariableInputText) MarshalJSON() (data []byte, err error)

func (*ResponseNewParamsPromptVariableInputText) UnmarshalJSON

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

type ResponseNewParamsPromptVariableUnion

type ResponseNewParamsPromptVariableUnion struct {
	OfInputText  *ResponseNewParamsPromptVariableInputText  `json:",omitzero,inline"`
	OfInputImage *ResponseNewParamsPromptVariableInputImage `json:",omitzero,inline"`
	OfInputFile  *ResponseNewParamsPromptVariableInputFile  `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 (ResponseNewParamsPromptVariableUnion) GetDetail

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

func (ResponseNewParamsPromptVariableUnion) GetFileData

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

func (ResponseNewParamsPromptVariableUnion) GetFileID

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

func (ResponseNewParamsPromptVariableUnion) GetFileURL

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

func (ResponseNewParamsPromptVariableUnion) GetFilename

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

func (ResponseNewParamsPromptVariableUnion) GetImageURL

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

func (ResponseNewParamsPromptVariableUnion) GetText

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

func (ResponseNewParamsPromptVariableUnion) GetType

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

func (ResponseNewParamsPromptVariableUnion) MarshalJSON

func (u ResponseNewParamsPromptVariableUnion) MarshalJSON() ([]byte, error)

func (*ResponseNewParamsPromptVariableUnion) UnmarshalJSON

func (u *ResponseNewParamsPromptVariableUnion) 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) OAuth access token for authenticating with the MCP server
	Authorization param.Opt[string] `json:"authorization,omitzero"`
	// (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",
	// "web_search_2025_08_26".
	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"
	ResponseNewParamsToolOpenAIResponseInputToolWebSearchTypeWebSearch2025_08_26        ResponseNewParamsToolOpenAIResponseInputToolWebSearchType = "web_search_2025_08_26"
)

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

func (u ResponseNewParamsToolUnion) GetAuthorization() *string

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) System message inserted into the model's context
	Instructions string `json:"instructions"`
	// (Optional) Max number of total calls to built-in tools that can be processed in
	// a response
	MaxToolCalls int64 `json:"max_tool_calls"`
	// (Optional) ID of the previous response in a conversation
	PreviousResponseID string `json:"previous_response_id"`
	// (Optional) Reference to a prompt template and its variables.
	Prompt ResponseObjectPrompt `json:"prompt"`
	// (Optional) Sampling temperature used for generation
	Temperature float64 `json:"temperature"`
	// (Optional) An array of tools the model may call while generating a response.
	Tools []ResponseObjectToolUnion `json:"tools"`
	// (Optional) Nucleus sampling parameter used for generation
	TopP float64 `json:"top_p"`
	// (Optional) Truncation strategy applied to the response
	Truncation string `json:"truncation"`
	// (Optional) Token usage information for the response
	Usage ResponseObjectUsage `json:"usage"`
	// 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
		Instructions       respjson.Field
		MaxToolCalls       respjson.Field
		PreviousResponseID respjson.Field
		Prompt             respjson.Field
		Temperature        respjson.Field
		Tools              respjson.Field
		TopP               respjson.Field
		Truncation         respjson.Field
		Usage              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 ResponseObjectOutputMcpApprovalRequest

type ResponseObjectOutputMcpApprovalRequest struct {
	ID          string                      `json:"id,required"`
	Arguments   string                      `json:"arguments,required"`
	Name        string                      `json:"name,required"`
	ServerLabel string                      `json:"server_label,required"`
	Type        constant.McpApprovalRequest `json:"type,required"`
	// 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
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request for human approval of a tool invocation.

func (ResponseObjectOutputMcpApprovalRequest) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectOutputMcpApprovalRequest) UnmarshalJSON

func (r *ResponseObjectOutputMcpApprovalRequest) 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 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 ResponseObjectOutputMessageContentArrayItemInputFile

type ResponseObjectOutputMessageContentArrayItemInputFile struct {
	// The type of the input item. Always `input_file`.
	Type constant.InputFile `json:"type,required"`
	// The data of the file to be sent to the model.
	FileData string `json:"file_data"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// The URL of the file to be sent to the model.
	FileURL string `json:"file_url"`
	// The name of the file to be sent to the model.
	Filename string `json:"filename"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		FileData    respjson.Field
		FileID      respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File content for input messages in OpenAI response format.

func (ResponseObjectOutputMessageContentArrayItemInputFile) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectOutputMessageContentArrayItemInputFile) UnmarshalJSON

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) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// (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
		FileID      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", "input_file".
	Type string `json:"type"`
	// This field is from variant
	// [ResponseObjectOutputMessageContentArrayItemInputImage].
	Detail ResponseObjectOutputMessageContentArrayItemInputImageDetail `json:"detail"`
	FileID string                                                      `json:"file_id"`
	// This field is from variant
	// [ResponseObjectOutputMessageContentArrayItemInputImage].
	ImageURL string `json:"image_url"`
	// This field is from variant
	// [ResponseObjectOutputMessageContentArrayItemInputFile].
	FileData string `json:"file_data"`
	// This field is from variant
	// [ResponseObjectOutputMessageContentArrayItemInputFile].
	FileURL string `json:"file_url"`
	// This field is from variant
	// [ResponseObjectOutputMessageContentArrayItemInputFile].
	Filename string `json:"filename"`
	JSON     struct {
		Text     respjson.Field
		Type     respjson.Field
		Detail   respjson.Field
		FileID   respjson.Field
		ImageURL respjson.Field
		FileData respjson.Field
		FileURL  respjson.Field
		Filename respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectOutputMessageContentArrayItemUnion contains all possible properties and values from ResponseObjectOutputMessageContentArrayItemInputText, ResponseObjectOutputMessageContentArrayItemInputImage, ResponseObjectOutputMessageContentArrayItemInputFile.

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:
case llamastackclient.ResponseObjectOutputMessageContentArrayItemInputFile:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectOutputMessageContentArrayItemUnion) AsInputFile

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.
	OfVariant2 []ResponseObjectOutputMessageContentArrayItemUnion `json:",inline"`
	JSON       struct {
		OfString   respjson.Field
		OfVariant2 respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectOutputMessageContentUnion contains all possible properties and values from [string], [[]ResponseObjectOutputMessageContentArrayItemUnion], [[]ResponseObjectOutputMessageContentArrayItemUnion].

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 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", "mcp_approval_request".
	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, ResponseObjectOutputMcpApprovalRequest.

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:
case llamastackclient.ResponseObjectOutputMcpApprovalRequest:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectOutputUnion) AsFileSearchCall

func (ResponseObjectOutputUnion) AsFunctionCall

func (ResponseObjectOutputUnion) AsMcpApprovalRequest

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 ResponseObjectPrompt

type ResponseObjectPrompt struct {
	// Unique identifier of the prompt template
	ID string `json:"id,required"`
	// Dictionary of variable names to OpenAIResponseInputMessageContent structure for
	// template substitution. The substitution values can either be strings, or other
	// Response input types like images or files.
	Variables map[string]ResponseObjectPromptVariableUnion `json:"variables"`
	// Version number of the prompt to use (defaults to latest if not specified)
	Version string `json:"version"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Variables   respjson.Field
		Version     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

(Optional) Reference to a prompt template and its variables.

func (ResponseObjectPrompt) RawJSON

func (r ResponseObjectPrompt) RawJSON() string

Returns the unmodified JSON received from the API

func (*ResponseObjectPrompt) UnmarshalJSON

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

type ResponseObjectPromptVariableDetail

type ResponseObjectPromptVariableDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ResponseObjectPromptVariableDetailLow  ResponseObjectPromptVariableDetail = "low"
	ResponseObjectPromptVariableDetailHigh ResponseObjectPromptVariableDetail = "high"
	ResponseObjectPromptVariableDetailAuto ResponseObjectPromptVariableDetail = "auto"
)

type ResponseObjectPromptVariableInputFile

type ResponseObjectPromptVariableInputFile struct {
	// The type of the input item. Always `input_file`.
	Type constant.InputFile `json:"type,required"`
	// The data of the file to be sent to the model.
	FileData string `json:"file_data"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// The URL of the file to be sent to the model.
	FileURL string `json:"file_url"`
	// The name of the file to be sent to the model.
	Filename string `json:"filename"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		FileData    respjson.Field
		FileID      respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File content for input messages in OpenAI response format.

func (ResponseObjectPromptVariableInputFile) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectPromptVariableInputFile) UnmarshalJSON

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

type ResponseObjectPromptVariableInputImage

type ResponseObjectPromptVariableInputImage struct {
	// Level of detail for image processing, can be "low", "high", or "auto"
	//
	// Any of "low", "high", "auto".
	Detail ResponseObjectPromptVariableInputImageDetail `json:"detail,required"`
	// Content type identifier, always "input_image"
	Type constant.InputImage `json:"type,required"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// (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
		FileID      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 (ResponseObjectPromptVariableInputImage) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectPromptVariableInputImage) UnmarshalJSON

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

type ResponseObjectPromptVariableInputImageDetail

type ResponseObjectPromptVariableInputImageDetail string

Level of detail for image processing, can be "low", "high", or "auto"

const (
	ResponseObjectPromptVariableInputImageDetailLow  ResponseObjectPromptVariableInputImageDetail = "low"
	ResponseObjectPromptVariableInputImageDetailHigh ResponseObjectPromptVariableInputImageDetail = "high"
	ResponseObjectPromptVariableInputImageDetailAuto ResponseObjectPromptVariableInputImageDetail = "auto"
)

type ResponseObjectPromptVariableInputText

type ResponseObjectPromptVariableInputText 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 (ResponseObjectPromptVariableInputText) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectPromptVariableInputText) UnmarshalJSON

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

type ResponseObjectPromptVariableUnion

type ResponseObjectPromptVariableUnion struct {
	// This field is from variant [ResponseObjectPromptVariableInputText].
	Text string `json:"text"`
	// Any of "input_text", "input_image", "input_file".
	Type string `json:"type"`
	// This field is from variant [ResponseObjectPromptVariableInputImage].
	Detail ResponseObjectPromptVariableInputImageDetail `json:"detail"`
	FileID string                                       `json:"file_id"`
	// This field is from variant [ResponseObjectPromptVariableInputImage].
	ImageURL string `json:"image_url"`
	// This field is from variant [ResponseObjectPromptVariableInputFile].
	FileData string `json:"file_data"`
	// This field is from variant [ResponseObjectPromptVariableInputFile].
	FileURL string `json:"file_url"`
	// This field is from variant [ResponseObjectPromptVariableInputFile].
	Filename string `json:"filename"`
	JSON     struct {
		Text     respjson.Field
		Type     respjson.Field
		Detail   respjson.Field
		FileID   respjson.Field
		ImageURL respjson.Field
		FileData respjson.Field
		FileURL  respjson.Field
		Filename respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectPromptVariableUnion contains all possible properties and values from ResponseObjectPromptVariableInputText, ResponseObjectPromptVariableInputImage, ResponseObjectPromptVariableInputFile.

Use the ResponseObjectPromptVariableUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ResponseObjectPromptVariableUnion) AsAny

func (u ResponseObjectPromptVariableUnion) AsAny() anyResponseObjectPromptVariable

Use the following switch statement to find the correct variant

switch variant := ResponseObjectPromptVariableUnion.AsAny().(type) {
case llamastackclient.ResponseObjectPromptVariableInputText:
case llamastackclient.ResponseObjectPromptVariableInputImage:
case llamastackclient.ResponseObjectPromptVariableInputFile:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectPromptVariableUnion) AsInputFile

func (ResponseObjectPromptVariableUnion) AsInputImage

func (ResponseObjectPromptVariableUnion) AsInputText

func (ResponseObjectPromptVariableUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectPromptVariableUnion) UnmarshalJSON

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

type ResponseObjectStreamResponseCompleted

type ResponseObjectStreamResponseCompleted struct {
	// 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 {
	// Index position of the part within the content array
	ContentIndex int64 `json:"content_index,required"`
	// Unique identifier of the output item containing this content part
	ItemID string `json:"item_id,required"`
	// Index position of the output item in the response
	OutputIndex int64 `json:"output_index,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 {
		ContentIndex   respjson.Field
		ItemID         respjson.Field
		OutputIndex    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 {
	// Structured annotations associated with the text
	Annotations []ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion `json:"annotations,required"`
	// Text emitted for this content part
	Text string `json:"text,required"`
	// Content part type identifier, always "output_text"
	Type constant.OutputText `json:"type,required"`
	// (Optional) Token log probability details
	Logprobs []map[string]ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion `json:"logprobs"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Annotations respjson.Field
		Text        respjson.Field
		Type        respjson.Field
		Logprobs    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Text content within a streamed response part.

func (ResponseObjectStreamResponseContentPartAddedPartOutputText) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartAddedPartOutputText) UnmarshalJSON

type ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationContainerFileCitation

type ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationContainerFileCitation 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 (ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationContainerFileCitation) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationContainerFileCitation) UnmarshalJSON

type ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationFileCitation

type ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationFileCitation 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 (ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationFileCitation) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationFileCitation) UnmarshalJSON

type ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationFilePath

type ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationFilePath 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 (ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationFilePath) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationFilePath) UnmarshalJSON

type ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationURLCitation

type ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationURLCitation 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 (ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationURLCitation) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationURLCitation) UnmarshalJSON

type ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion

type ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion 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
	// [ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationURLCitation].
	Title string `json:"title"`
	// This field is from variant
	// [ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationURLCitation].
	URL string `json:"url"`
	// This field is from variant
	// [ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationContainerFileCitation].
	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:"-"`
}

ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion contains all possible properties and values from ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationFileCitation, ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationURLCitation, ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationContainerFileCitation, ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationFilePath.

Use the ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion) AsAny

func (u ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion) AsAny() anyResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotation

Use the following switch statement to find the correct variant

switch variant := ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion.AsAny().(type) {
case llamastackclient.ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationFileCitation:
case llamastackclient.ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationURLCitation:
case llamastackclient.ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationContainerFileCitation:
case llamastackclient.ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationFilePath:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion) AsContainerFileCitation

func (ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion) AsFileCitation

func (ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion) AsFilePath

func (ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion) AsURLCitation

func (ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion) UnmarshalJSON

type ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion

type ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion 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:"-"`
}

ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion 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 (ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion) AsAnyArray

func (ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion) AsBool

func (ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion) AsFloat

func (ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion) AsString

func (ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion) UnmarshalJSON

type ResponseObjectStreamResponseContentPartAddedPartReasoningText

type ResponseObjectStreamResponseContentPartAddedPartReasoningText struct {
	// Reasoning text supplied by the model
	Text string `json:"text,required"`
	// Content part type identifier, always "reasoning_text"
	Type constant.ReasoningText `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:"-"`
}

Reasoning text emitted as part of a streamed response.

func (ResponseObjectStreamResponseContentPartAddedPartReasoningText) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartAddedPartReasoningText) UnmarshalJSON

type ResponseObjectStreamResponseContentPartAddedPartRefusal

type ResponseObjectStreamResponseContentPartAddedPartRefusal struct {
	// Refusal text supplied by the model
	Refusal string `json:"refusal,required"`
	// Content part type identifier, always "refusal"
	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:"-"`
}

Refusal content within a streamed response part.

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].
	Annotations []ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion `json:"annotations"`
	Text        string                                                                      `json:"text"`
	// Any of "output_text", "refusal", "reasoning_text".
	Type string `json:"type"`
	// This field is from variant
	// [ResponseObjectStreamResponseContentPartAddedPartOutputText].
	Logprobs []map[string]ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion `json:"logprobs"`
	// This field is from variant
	// [ResponseObjectStreamResponseContentPartAddedPartRefusal].
	Refusal string `json:"refusal"`
	JSON    struct {
		Annotations respjson.Field
		Text        respjson.Field
		Type        respjson.Field
		Logprobs    respjson.Field
		Refusal     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectStreamResponseContentPartAddedPartUnion contains all possible properties and values from ResponseObjectStreamResponseContentPartAddedPartOutputText, ResponseObjectStreamResponseContentPartAddedPartRefusal, ResponseObjectStreamResponseContentPartAddedPartReasoningText.

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:
case llamastackclient.ResponseObjectStreamResponseContentPartAddedPartReasoningText:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectStreamResponseContentPartAddedPartUnion) AsOutputText

func (ResponseObjectStreamResponseContentPartAddedPartUnion) AsReasoningText

func (ResponseObjectStreamResponseContentPartAddedPartUnion) AsRefusal

func (ResponseObjectStreamResponseContentPartAddedPartUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartAddedPartUnion) UnmarshalJSON

type ResponseObjectStreamResponseContentPartDone

type ResponseObjectStreamResponseContentPartDone struct {
	// Index position of the part within the content array
	ContentIndex int64 `json:"content_index,required"`
	// Unique identifier of the output item containing this content part
	ItemID string `json:"item_id,required"`
	// Index position of the output item in the response
	OutputIndex int64 `json:"output_index,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 {
		ContentIndex   respjson.Field
		ItemID         respjson.Field
		OutputIndex    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 {
	// Structured annotations associated with the text
	Annotations []ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion `json:"annotations,required"`
	// Text emitted for this content part
	Text string `json:"text,required"`
	// Content part type identifier, always "output_text"
	Type constant.OutputText `json:"type,required"`
	// (Optional) Token log probability details
	Logprobs []map[string]ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion `json:"logprobs"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Annotations respjson.Field
		Text        respjson.Field
		Type        respjson.Field
		Logprobs    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Text content within a streamed response part.

func (ResponseObjectStreamResponseContentPartDonePartOutputText) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartDonePartOutputText) UnmarshalJSON

type ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationContainerFileCitation

type ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationContainerFileCitation 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 (ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationContainerFileCitation) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationContainerFileCitation) UnmarshalJSON

type ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationFileCitation

type ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationFileCitation 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 (ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationFileCitation) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationFileCitation) UnmarshalJSON

type ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationFilePath

type ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationFilePath 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 (ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationFilePath) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationFilePath) UnmarshalJSON

type ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationURLCitation

type ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationURLCitation 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 (ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationURLCitation) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationURLCitation) UnmarshalJSON

type ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion

type ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion 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
	// [ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationURLCitation].
	Title string `json:"title"`
	// This field is from variant
	// [ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationURLCitation].
	URL string `json:"url"`
	// This field is from variant
	// [ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationContainerFileCitation].
	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:"-"`
}

ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion contains all possible properties and values from ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationFileCitation, ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationURLCitation, ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationContainerFileCitation, ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationFilePath.

Use the ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion) AsAny

func (u ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion) AsAny() anyResponseObjectStreamResponseContentPartDonePartOutputTextAnnotation

Use the following switch statement to find the correct variant

switch variant := ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion.AsAny().(type) {
case llamastackclient.ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationFileCitation:
case llamastackclient.ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationURLCitation:
case llamastackclient.ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationContainerFileCitation:
case llamastackclient.ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationFilePath:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion) AsContainerFileCitation

func (ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion) AsFileCitation

func (ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion) AsFilePath

func (ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion) AsURLCitation

func (ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion) UnmarshalJSON

type ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion

type ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion 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:"-"`
}

ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion 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 (ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion) AsAnyArray

func (ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion) AsBool

func (ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion) AsFloat

func (ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion) AsString

func (ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion) UnmarshalJSON

type ResponseObjectStreamResponseContentPartDonePartReasoningText

type ResponseObjectStreamResponseContentPartDonePartReasoningText struct {
	// Reasoning text supplied by the model
	Text string `json:"text,required"`
	// Content part type identifier, always "reasoning_text"
	Type constant.ReasoningText `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:"-"`
}

Reasoning text emitted as part of a streamed response.

func (ResponseObjectStreamResponseContentPartDonePartReasoningText) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartDonePartReasoningText) UnmarshalJSON

type ResponseObjectStreamResponseContentPartDonePartRefusal

type ResponseObjectStreamResponseContentPartDonePartRefusal struct {
	// Refusal text supplied by the model
	Refusal string `json:"refusal,required"`
	// Content part type identifier, always "refusal"
	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:"-"`
}

Refusal content within a streamed response part.

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].
	Annotations []ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion `json:"annotations"`
	Text        string                                                                     `json:"text"`
	// Any of "output_text", "refusal", "reasoning_text".
	Type string `json:"type"`
	// This field is from variant
	// [ResponseObjectStreamResponseContentPartDonePartOutputText].
	Logprobs []map[string]ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion `json:"logprobs"`
	// This field is from variant
	// [ResponseObjectStreamResponseContentPartDonePartRefusal].
	Refusal string `json:"refusal"`
	JSON    struct {
		Annotations respjson.Field
		Text        respjson.Field
		Type        respjson.Field
		Logprobs    respjson.Field
		Refusal     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectStreamResponseContentPartDonePartUnion contains all possible properties and values from ResponseObjectStreamResponseContentPartDonePartOutputText, ResponseObjectStreamResponseContentPartDonePartRefusal, ResponseObjectStreamResponseContentPartDonePartReasoningText.

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:
case llamastackclient.ResponseObjectStreamResponseContentPartDonePartReasoningText:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectStreamResponseContentPartDonePartUnion) AsOutputText

func (ResponseObjectStreamResponseContentPartDonePartUnion) AsReasoningText

func (ResponseObjectStreamResponseContentPartDonePartUnion) AsRefusal

func (ResponseObjectStreamResponseContentPartDonePartUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseContentPartDonePartUnion) UnmarshalJSON

type ResponseObjectStreamResponseCreated

type ResponseObjectStreamResponseCreated struct {
	// The response object that was created
	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 ResponseObjectStreamResponseFailed

type ResponseObjectStreamResponseFailed struct {
	// Response object describing the failure
	Response ResponseObject `json:"response,required"`
	// Sequential number for ordering streaming events
	SequenceNumber int64 `json:"sequence_number,required"`
	// Event type identifier, always "response.failed"
	Type constant.ResponseFailed `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Response       respjson.Field
		SequenceNumber respjson.Field
		Type           respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Streaming event emitted when a response fails.

func (ResponseObjectStreamResponseFailed) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseFailed) UnmarshalJSON

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

type ResponseObjectStreamResponseFileSearchCallCompleted

type ResponseObjectStreamResponseFileSearchCallCompleted struct {
	// Unique identifier of the completed file 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.file_search_call.completed"
	Type constant.ResponseFileSearchCallCompleted `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 file search calls.

func (ResponseObjectStreamResponseFileSearchCallCompleted) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseFileSearchCallCompleted) UnmarshalJSON

type ResponseObjectStreamResponseFileSearchCallInProgress

type ResponseObjectStreamResponseFileSearchCallInProgress struct {
	// Unique identifier of the file 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.file_search_call.in_progress"
	Type constant.ResponseFileSearchCallInProgress `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 file search calls in progress.

func (ResponseObjectStreamResponseFileSearchCallInProgress) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseFileSearchCallInProgress) UnmarshalJSON

type ResponseObjectStreamResponseFileSearchCallSearching

type ResponseObjectStreamResponseFileSearchCallSearching struct {
	// Unique identifier of the file 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.file_search_call.searching"
	Type constant.ResponseFileSearchCallSearching `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 file search currently searching.

func (ResponseObjectStreamResponseFileSearchCallSearching) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseFileSearchCallSearching) UnmarshalJSON

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 ResponseObjectStreamResponseInProgress

type ResponseObjectStreamResponseInProgress struct {
	// Current response state while in progress
	Response ResponseObject `json:"response,required"`
	// Sequential number for ordering streaming events
	SequenceNumber int64 `json:"sequence_number,required"`
	// Event type identifier, always "response.in_progress"
	Type constant.ResponseInProgress `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Response       respjson.Field
		SequenceNumber respjson.Field
		Type           respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Streaming event indicating the response remains in progress.

func (ResponseObjectStreamResponseInProgress) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseInProgress) UnmarshalJSON

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

type ResponseObjectStreamResponseIncomplete

type ResponseObjectStreamResponseIncomplete struct {
	// Response object describing the incomplete state
	Response ResponseObject `json:"response,required"`
	// Sequential number for ordering streaming events
	SequenceNumber int64 `json:"sequence_number,required"`
	// Event type identifier, always "response.incomplete"
	Type constant.ResponseIncomplete `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Response       respjson.Field
		SequenceNumber respjson.Field
		Type           respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Streaming event emitted when a response ends in an incomplete state.

func (ResponseObjectStreamResponseIncomplete) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseIncomplete) UnmarshalJSON

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

type ResponseObjectStreamResponseMcpCallArgumentsDelta

type ResponseObjectStreamResponseMcpCallArgumentsDelta struct {
	Delta          string                                 `json:"delta,required"`
	ItemID         string                                 `json:"item_id,required"`
	OutputIndex    int64                                  `json:"output_index,required"`
	SequenceNumber int64                                  `json:"sequence_number,required"`
	Type           constant.ResponseMcpCallArgumentsDelta `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Delta          respjson.Field
		ItemID         respjson.Field
		OutputIndex    respjson.Field
		SequenceNumber respjson.Field
		Type           respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ResponseObjectStreamResponseMcpCallArgumentsDelta) RawJSON

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 ResponseObjectStreamResponseOutputItemAddedItemMcpApprovalRequest

type ResponseObjectStreamResponseOutputItemAddedItemMcpApprovalRequest struct {
	ID          string                      `json:"id,required"`
	Arguments   string                      `json:"arguments,required"`
	Name        string                      `json:"name,required"`
	ServerLabel string                      `json:"server_label,required"`
	Type        constant.McpApprovalRequest `json:"type,required"`
	// 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
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request for human approval of a tool invocation.

func (ResponseObjectStreamResponseOutputItemAddedItemMcpApprovalRequest) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMcpApprovalRequest) 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 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 ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputFile

type ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputFile struct {
	// The type of the input item. Always `input_file`.
	Type constant.InputFile `json:"type,required"`
	// The data of the file to be sent to the model.
	FileData string `json:"file_data"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// The URL of the file to be sent to the model.
	FileURL string `json:"file_url"`
	// The name of the file to be sent to the model.
	Filename string `json:"filename"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		FileData    respjson.Field
		FileID      respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File content for input messages in OpenAI response format.

func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputFile) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputFile) UnmarshalJSON

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) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// (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
		FileID      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", "input_file".
	Type string `json:"type"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage].
	Detail ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImageDetail `json:"detail"`
	FileID string                                                                                 `json:"file_id"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage].
	ImageURL string `json:"image_url"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputFile].
	FileData string `json:"file_data"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputFile].
	FileURL string `json:"file_url"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputFile].
	Filename string `json:"filename"`
	JSON     struct {
		Text     respjson.Field
		Type     respjson.Field
		Detail   respjson.Field
		FileID   respjson.Field
		ImageURL respjson.Field
		FileData respjson.Field
		FileURL  respjson.Field
		Filename respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion contains all possible properties and values from ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputText, ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputImage, ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputFile.

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:
case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemInputFile:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion) AsInputFile

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.
	OfVariant2 []ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion `json:",inline"`
	JSON       struct {
		OfString   respjson.Field
		OfVariant2 respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectStreamResponseOutputItemAddedItemMessageContentUnion contains all possible properties and values from [string], [[]ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion], [[]ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion].

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 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", "mcp_approval_request".
	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, ResponseObjectStreamResponseOutputItemAddedItemMcpApprovalRequest.

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:
case llamastackclient.ResponseObjectStreamResponseOutputItemAddedItemMcpApprovalRequest:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsFileSearchCall

func (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsFunctionCall

func (ResponseObjectStreamResponseOutputItemAddedItemUnion) AsMcpApprovalRequest

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 ResponseObjectStreamResponseOutputItemDoneItemMcpApprovalRequest

type ResponseObjectStreamResponseOutputItemDoneItemMcpApprovalRequest struct {
	ID          string                      `json:"id,required"`
	Arguments   string                      `json:"arguments,required"`
	Name        string                      `json:"name,required"`
	ServerLabel string                      `json:"server_label,required"`
	Type        constant.McpApprovalRequest `json:"type,required"`
	// 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
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A request for human approval of a tool invocation.

func (ResponseObjectStreamResponseOutputItemDoneItemMcpApprovalRequest) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMcpApprovalRequest) 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 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 ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputFile

type ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputFile struct {
	// The type of the input item. Always `input_file`.
	Type constant.InputFile `json:"type,required"`
	// The data of the file to be sent to the model.
	FileData string `json:"file_data"`
	// (Optional) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// The URL of the file to be sent to the model.
	FileURL string `json:"file_url"`
	// The name of the file to be sent to the model.
	Filename string `json:"filename"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type        respjson.Field
		FileData    respjson.Field
		FileID      respjson.Field
		FileURL     respjson.Field
		Filename    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File content for input messages in OpenAI response format.

func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputFile) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputFile) UnmarshalJSON

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) The ID of the file to be sent to the model.
	FileID string `json:"file_id"`
	// (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
		FileID      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", "input_file".
	Type string `json:"type"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage].
	Detail ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImageDetail `json:"detail"`
	FileID string                                                                                `json:"file_id"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage].
	ImageURL string `json:"image_url"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputFile].
	FileData string `json:"file_data"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputFile].
	FileURL string `json:"file_url"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputFile].
	Filename string `json:"filename"`
	JSON     struct {
		Text     respjson.Field
		Type     respjson.Field
		Detail   respjson.Field
		FileID   respjson.Field
		ImageURL respjson.Field
		FileData respjson.Field
		FileURL  respjson.Field
		Filename respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion contains all possible properties and values from ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputText, ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputImage, ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputFile.

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:
case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemInputFile:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion) AsInputFile

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.
	OfVariant2 []ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion `json:",inline"`
	JSON       struct {
		OfString   respjson.Field
		OfVariant2 respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectStreamResponseOutputItemDoneItemMessageContentUnion contains all possible properties and values from [string], [[]ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion], [[]ResponseObjectStreamResponseOutputItemDoneItemMessageContentArrayItemUnion].

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 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", "mcp_approval_request".
	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, ResponseObjectStreamResponseOutputItemDoneItemMcpApprovalRequest.

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:
case llamastackclient.ResponseObjectStreamResponseOutputItemDoneItemMcpApprovalRequest:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsFileSearchCall

func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsFunctionCall

func (ResponseObjectStreamResponseOutputItemDoneItemUnion) AsMcpApprovalRequest

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 ResponseObjectStreamResponseOutputTextAnnotationAdded

type ResponseObjectStreamResponseOutputTextAnnotationAdded struct {
	// The annotation object being added
	Annotation ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion `json:"annotation,required"`
	// Index of the annotation within the content part
	AnnotationIndex int64 `json:"annotation_index,required"`
	// Index position of the content part within the output item
	ContentIndex int64 `json:"content_index,required"`
	// Unique identifier of the item to which the annotation is being added
	ItemID string `json:"item_id,required"`
	// Index position of the output item in the response's output array
	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.annotation.added"
	Type constant.ResponseOutputTextAnnotationAdded `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Annotation      respjson.Field
		AnnotationIndex respjson.Field
		ContentIndex    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 an annotation is added to output text.

func (ResponseObjectStreamResponseOutputTextAnnotationAdded) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputTextAnnotationAdded) UnmarshalJSON

type ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationContainerFileCitation

type ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationContainerFileCitation 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 (ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationContainerFileCitation) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationContainerFileCitation) UnmarshalJSON

type ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationFileCitation

type ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationFileCitation 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 (ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationFileCitation) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationFileCitation) UnmarshalJSON

type ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationFilePath

type ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationFilePath 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 (ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationFilePath) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationFilePath) UnmarshalJSON

type ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationURLCitation

type ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationURLCitation 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 (ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationURLCitation) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationURLCitation) UnmarshalJSON

type ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion

type ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion 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
	// [ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationURLCitation].
	Title string `json:"title"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationURLCitation].
	URL string `json:"url"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationContainerFileCitation].
	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:"-"`
}

ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion contains all possible properties and values from ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationFileCitation, ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationURLCitation, ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationContainerFileCitation, ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationFilePath.

Use the ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion) AsAny

func (u ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion) AsAny() anyResponseObjectStreamResponseOutputTextAnnotationAddedAnnotation

Use the following switch statement to find the correct variant

switch variant := ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion.AsAny().(type) {
case llamastackclient.ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationFileCitation:
case llamastackclient.ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationURLCitation:
case llamastackclient.ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationContainerFileCitation:
case llamastackclient.ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationFilePath:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion) AsContainerFileCitation

func (ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion) AsFileCitation

func (ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion) AsFilePath

func (ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion) AsURLCitation

func (ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion) 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 ResponseObjectStreamResponseReasoningSummaryPartAdded

type ResponseObjectStreamResponseReasoningSummaryPartAdded struct {
	// Unique identifier of the output item
	ItemID string `json:"item_id,required"`
	// Index position of the output item
	OutputIndex int64 `json:"output_index,required"`
	// The summary part that was added
	Part ResponseObjectStreamResponseReasoningSummaryPartAddedPart `json:"part,required"`
	// Sequential number for ordering streaming events
	SequenceNumber int64 `json:"sequence_number,required"`
	// Index of the summary part within the reasoning summary
	SummaryIndex int64 `json:"summary_index,required"`
	// Event type identifier, always "response.reasoning_summary_part.added"
	Type constant.ResponseReasoningSummaryPartAdded `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ItemID         respjson.Field
		OutputIndex    respjson.Field
		Part           respjson.Field
		SequenceNumber respjson.Field
		SummaryIndex   respjson.Field
		Type           respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Streaming event for when a new reasoning summary part is added.

func (ResponseObjectStreamResponseReasoningSummaryPartAdded) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseReasoningSummaryPartAdded) UnmarshalJSON

type ResponseObjectStreamResponseReasoningSummaryPartAddedPart

type ResponseObjectStreamResponseReasoningSummaryPartAddedPart struct {
	// Summary text
	Text string `json:"text,required"`
	// Content part type identifier, always "summary_text"
	Type constant.SummaryText `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:"-"`
}

The summary part that was added

func (ResponseObjectStreamResponseReasoningSummaryPartAddedPart) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseReasoningSummaryPartAddedPart) UnmarshalJSON

type ResponseObjectStreamResponseReasoningSummaryPartDone

type ResponseObjectStreamResponseReasoningSummaryPartDone struct {
	// Unique identifier of the output item
	ItemID string `json:"item_id,required"`
	// Index position of the output item
	OutputIndex int64 `json:"output_index,required"`
	// The completed summary part
	Part ResponseObjectStreamResponseReasoningSummaryPartDonePart `json:"part,required"`
	// Sequential number for ordering streaming events
	SequenceNumber int64 `json:"sequence_number,required"`
	// Index of the summary part within the reasoning summary
	SummaryIndex int64 `json:"summary_index,required"`
	// Event type identifier, always "response.reasoning_summary_part.done"
	Type constant.ResponseReasoningSummaryPartDone `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ItemID         respjson.Field
		OutputIndex    respjson.Field
		Part           respjson.Field
		SequenceNumber respjson.Field
		SummaryIndex   respjson.Field
		Type           respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Streaming event for when a reasoning summary part is completed.

func (ResponseObjectStreamResponseReasoningSummaryPartDone) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseReasoningSummaryPartDone) UnmarshalJSON

type ResponseObjectStreamResponseReasoningSummaryPartDonePart

type ResponseObjectStreamResponseReasoningSummaryPartDonePart struct {
	// Summary text
	Text string `json:"text,required"`
	// Content part type identifier, always "summary_text"
	Type constant.SummaryText `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:"-"`
}

The completed summary part

func (ResponseObjectStreamResponseReasoningSummaryPartDonePart) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseReasoningSummaryPartDonePart) UnmarshalJSON

type ResponseObjectStreamResponseReasoningSummaryTextDelta

type ResponseObjectStreamResponseReasoningSummaryTextDelta struct {
	// Incremental summary text being added
	Delta string `json:"delta,required"`
	// Unique identifier of the output item
	ItemID string `json:"item_id,required"`
	// Index position of the output item
	OutputIndex int64 `json:"output_index,required"`
	// Sequential number for ordering streaming events
	SequenceNumber int64 `json:"sequence_number,required"`
	// Index of the summary part within the reasoning summary
	SummaryIndex int64 `json:"summary_index,required"`
	// Event type identifier, always "response.reasoning_summary_text.delta"
	Type constant.ResponseReasoningSummaryTextDelta `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
		SummaryIndex   respjson.Field
		Type           respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Streaming event for incremental reasoning summary text updates.

func (ResponseObjectStreamResponseReasoningSummaryTextDelta) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseReasoningSummaryTextDelta) UnmarshalJSON

type ResponseObjectStreamResponseReasoningSummaryTextDone

type ResponseObjectStreamResponseReasoningSummaryTextDone struct {
	// Unique identifier of the output item
	ItemID string `json:"item_id,required"`
	// Index position of the output item
	OutputIndex int64 `json:"output_index,required"`
	// Sequential number for ordering streaming events
	SequenceNumber int64 `json:"sequence_number,required"`
	// Index of the summary part within the reasoning summary
	SummaryIndex int64 `json:"summary_index,required"`
	// Final complete summary text
	Text string `json:"text,required"`
	// Event type identifier, always "response.reasoning_summary_text.done"
	Type constant.ResponseReasoningSummaryTextDone `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
		SummaryIndex   respjson.Field
		Text           respjson.Field
		Type           respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Streaming event for when reasoning summary text is completed.

func (ResponseObjectStreamResponseReasoningSummaryTextDone) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseReasoningSummaryTextDone) UnmarshalJSON

type ResponseObjectStreamResponseReasoningTextDelta

type ResponseObjectStreamResponseReasoningTextDelta struct {
	// Index position of the reasoning content part
	ContentIndex int64 `json:"content_index,required"`
	// Incremental reasoning text 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.reasoning_text.delta"
	Type constant.ResponseReasoningTextDelta `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 reasoning text updates.

func (ResponseObjectStreamResponseReasoningTextDelta) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseReasoningTextDelta) UnmarshalJSON

type ResponseObjectStreamResponseReasoningTextDone

type ResponseObjectStreamResponseReasoningTextDone struct {
	// Index position of the reasoning content part
	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 reasoning text
	Text string `json:"text,required"`
	// Event type identifier, always "response.reasoning_text.done"
	Type constant.ResponseReasoningTextDone `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 reasoning text is completed.

func (ResponseObjectStreamResponseReasoningTextDone) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseReasoningTextDone) UnmarshalJSON

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

type ResponseObjectStreamResponseRefusalDelta

type ResponseObjectStreamResponseRefusalDelta struct {
	// Index position of the content part
	ContentIndex int64 `json:"content_index,required"`
	// Incremental refusal text being added
	Delta string `json:"delta,required"`
	// Unique identifier of the 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"`
	// Event type identifier, always "response.refusal.delta"
	Type constant.ResponseRefusalDelta `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 refusal text updates.

func (ResponseObjectStreamResponseRefusalDelta) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseRefusalDelta) UnmarshalJSON

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

type ResponseObjectStreamResponseRefusalDone

type ResponseObjectStreamResponseRefusalDone struct {
	// Index position of the content part
	ContentIndex int64 `json:"content_index,required"`
	// Unique identifier of the output item
	ItemID string `json:"item_id,required"`
	// Index position of the item in the output list
	OutputIndex int64 `json:"output_index,required"`
	// Final complete refusal text
	Refusal string `json:"refusal,required"`
	// Sequential number for ordering streaming events
	SequenceNumber int64 `json:"sequence_number,required"`
	// Event type identifier, always "response.refusal.done"
	Type constant.ResponseRefusalDone `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
		Refusal        respjson.Field
		SequenceNumber respjson.Field
		Type           respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Streaming event for when refusal text is completed.

func (ResponseObjectStreamResponseRefusalDone) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectStreamResponseRefusalDone) UnmarshalJSON

func (r *ResponseObjectStreamResponseRefusalDone) 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.in_progress", "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.reasoning_text.delta", "response.reasoning_text.done",
	// "response.reasoning_summary_part.added", "response.reasoning_summary_part.done",
	// "response.reasoning_summary_text.delta", "response.reasoning_summary_text.done",
	// "response.refusal.delta", "response.refusal.done",
	// "response.output_text.annotation.added",
	// "response.file_search_call.in_progress", "response.file_search_call.searching",
	// "response.file_search_call.completed", "response.incomplete", "response.failed",
	// "response.completed".
	Type           string `json:"type"`
	SequenceNumber int64  `json:"sequence_number"`
	// This field is a union of [ResponseObjectStreamResponseOutputItemAddedItemUnion],
	// [ResponseObjectStreamResponseOutputItemDoneItemUnion]
	Item         ResponseObjectStreamUnionItem `json:"item"`
	OutputIndex  int64                         `json:"output_index"`
	ResponseID   string                        `json:"response_id"`
	ContentIndex int64                         `json:"content_index"`
	Delta        string                        `json:"delta"`
	ItemID       string                        `json:"item_id"`
	Text         string                        `json:"text"`
	Arguments    string                        `json:"arguments"`
	// This field is a union of
	// [ResponseObjectStreamResponseContentPartAddedPartUnion],
	// [ResponseObjectStreamResponseContentPartDonePartUnion],
	// [ResponseObjectStreamResponseReasoningSummaryPartAddedPart],
	// [ResponseObjectStreamResponseReasoningSummaryPartDonePart]
	Part         ResponseObjectStreamUnionPart `json:"part"`
	SummaryIndex int64                         `json:"summary_index"`
	// This field is from variant [ResponseObjectStreamResponseRefusalDone].
	Refusal string `json:"refusal"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputTextAnnotationAdded].
	Annotation ResponseObjectStreamResponseOutputTextAnnotationAddedAnnotationUnion `json:"annotation"`
	// This field is from variant
	// [ResponseObjectStreamResponseOutputTextAnnotationAdded].
	AnnotationIndex int64 `json:"annotation_index"`
	JSON            struct {
		Response        respjson.Field
		Type            respjson.Field
		SequenceNumber  respjson.Field
		Item            respjson.Field
		OutputIndex     respjson.Field
		ResponseID      respjson.Field
		ContentIndex    respjson.Field
		Delta           respjson.Field
		ItemID          respjson.Field
		Text            respjson.Field
		Arguments       respjson.Field
		Part            respjson.Field
		SummaryIndex    respjson.Field
		Refusal         respjson.Field
		Annotation      respjson.Field
		AnnotationIndex respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectStreamUnion contains all possible properties and values from ResponseObjectStreamResponseCreated, ResponseObjectStreamResponseInProgress, ResponseObjectStreamResponseOutputItemAdded, ResponseObjectStreamResponseOutputItemDone, ResponseObjectStreamResponseOutputTextDelta, ResponseObjectStreamResponseOutputTextDone, ResponseObjectStreamResponseFunctionCallArgumentsDelta, ResponseObjectStreamResponseFunctionCallArgumentsDone, ResponseObjectStreamResponseWebSearchCallInProgress, ResponseObjectStreamResponseWebSearchCallSearching, ResponseObjectStreamResponseWebSearchCallCompleted, ResponseObjectStreamResponseMcpListToolsInProgress, ResponseObjectStreamResponseMcpListToolsFailed, ResponseObjectStreamResponseMcpListToolsCompleted, ResponseObjectStreamResponseMcpCallArgumentsDelta, ResponseObjectStreamResponseMcpCallArgumentsDone, ResponseObjectStreamResponseMcpCallInProgress, ResponseObjectStreamResponseMcpCallFailed, ResponseObjectStreamResponseMcpCallCompleted, ResponseObjectStreamResponseContentPartAdded, ResponseObjectStreamResponseContentPartDone, ResponseObjectStreamResponseReasoningTextDelta, ResponseObjectStreamResponseReasoningTextDone, ResponseObjectStreamResponseReasoningSummaryPartAdded, ResponseObjectStreamResponseReasoningSummaryPartDone, ResponseObjectStreamResponseReasoningSummaryTextDelta, ResponseObjectStreamResponseReasoningSummaryTextDone, ResponseObjectStreamResponseRefusalDelta, ResponseObjectStreamResponseRefusalDone, ResponseObjectStreamResponseOutputTextAnnotationAdded, ResponseObjectStreamResponseFileSearchCallInProgress, ResponseObjectStreamResponseFileSearchCallSearching, ResponseObjectStreamResponseFileSearchCallCompleted, ResponseObjectStreamResponseIncomplete, ResponseObjectStreamResponseFailed, 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.ResponseObjectStreamResponseInProgress:
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.ResponseObjectStreamResponseReasoningTextDelta:
case llamastackclient.ResponseObjectStreamResponseReasoningTextDone:
case llamastackclient.ResponseObjectStreamResponseReasoningSummaryPartAdded:
case llamastackclient.ResponseObjectStreamResponseReasoningSummaryPartDone:
case llamastackclient.ResponseObjectStreamResponseReasoningSummaryTextDelta:
case llamastackclient.ResponseObjectStreamResponseReasoningSummaryTextDone:
case llamastackclient.ResponseObjectStreamResponseRefusalDelta:
case llamastackclient.ResponseObjectStreamResponseRefusalDone:
case llamastackclient.ResponseObjectStreamResponseOutputTextAnnotationAdded:
case llamastackclient.ResponseObjectStreamResponseFileSearchCallInProgress:
case llamastackclient.ResponseObjectStreamResponseFileSearchCallSearching:
case llamastackclient.ResponseObjectStreamResponseFileSearchCallCompleted:
case llamastackclient.ResponseObjectStreamResponseIncomplete:
case llamastackclient.ResponseObjectStreamResponseFailed:
case llamastackclient.ResponseObjectStreamResponseCompleted:
default:
  fmt.Errorf("no variant present")
}

func (ResponseObjectStreamUnion) AsResponseCompleted

func (ResponseObjectStreamUnion) AsResponseContentPartAdded

func (ResponseObjectStreamUnion) AsResponseContentPartDone

func (ResponseObjectStreamUnion) AsResponseCreated

func (ResponseObjectStreamUnion) AsResponseFailed

func (ResponseObjectStreamUnion) AsResponseFileSearchCallCompleted

func (u ResponseObjectStreamUnion) AsResponseFileSearchCallCompleted() (v ResponseObjectStreamResponseFileSearchCallCompleted)

func (ResponseObjectStreamUnion) AsResponseFileSearchCallInProgress

func (u ResponseObjectStreamUnion) AsResponseFileSearchCallInProgress() (v ResponseObjectStreamResponseFileSearchCallInProgress)

func (ResponseObjectStreamUnion) AsResponseFileSearchCallSearching

func (u ResponseObjectStreamUnion) AsResponseFileSearchCallSearching() (v ResponseObjectStreamResponseFileSearchCallSearching)

func (ResponseObjectStreamUnion) AsResponseFunctionCallArgumentsDelta

func (u ResponseObjectStreamUnion) AsResponseFunctionCallArgumentsDelta() (v ResponseObjectStreamResponseFunctionCallArgumentsDelta)

func (ResponseObjectStreamUnion) AsResponseFunctionCallArgumentsDone

func (u ResponseObjectStreamUnion) AsResponseFunctionCallArgumentsDone() (v ResponseObjectStreamResponseFunctionCallArgumentsDone)

func (ResponseObjectStreamUnion) AsResponseInProgress

func (ResponseObjectStreamUnion) AsResponseIncomplete

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

func (u ResponseObjectStreamUnion) AsResponseOutputTextAnnotationAdded() (v ResponseObjectStreamResponseOutputTextAnnotationAdded)

func (ResponseObjectStreamUnion) AsResponseOutputTextDelta

func (ResponseObjectStreamUnion) AsResponseOutputTextDone

func (ResponseObjectStreamUnion) AsResponseReasoningSummaryPartAdded

func (u ResponseObjectStreamUnion) AsResponseReasoningSummaryPartAdded() (v ResponseObjectStreamResponseReasoningSummaryPartAdded)

func (ResponseObjectStreamUnion) AsResponseReasoningSummaryPartDone

func (u ResponseObjectStreamUnion) AsResponseReasoningSummaryPartDone() (v ResponseObjectStreamResponseReasoningSummaryPartDone)

func (ResponseObjectStreamUnion) AsResponseReasoningSummaryTextDelta

func (u ResponseObjectStreamUnion) AsResponseReasoningSummaryTextDelta() (v ResponseObjectStreamResponseReasoningSummaryTextDelta)

func (ResponseObjectStreamUnion) AsResponseReasoningSummaryTextDone

func (u ResponseObjectStreamUnion) AsResponseReasoningSummaryTextDone() (v ResponseObjectStreamResponseReasoningSummaryTextDone)

func (ResponseObjectStreamUnion) AsResponseReasoningTextDelta

func (ResponseObjectStreamUnion) AsResponseReasoningTextDone

func (ResponseObjectStreamUnion) AsResponseRefusalDelta

func (ResponseObjectStreamUnion) AsResponseRefusalDone

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.
	OfVariant2 []ResponseObjectStreamResponseOutputItemAddedItemMessageContentArrayItemUnion `json:",inline"`
	JSON       struct {
		OfString   respjson.Field
		OfVariant2 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 OfVariant2]

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 {
	// This field is a union of
	// [[]ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion],
	// [[]ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion]
	Annotations ResponseObjectStreamUnionPartAnnotations `json:"annotations"`
	Text        string                                   `json:"text"`
	Type        string                                   `json:"type"`
	// This field is a union of
	// [[]map[string]ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion],
	// [[]map[string]ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion]
	Logprobs ResponseObjectStreamUnionPartLogprobs `json:"logprobs"`
	Refusal  string                                `json:"refusal"`
	JSON     struct {
		Annotations respjson.Field
		Text        respjson.Field
		Type        respjson.Field
		Logprobs    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 ResponseObjectStreamUnionPartAnnotations

type ResponseObjectStreamUnionPartAnnotations struct {
	// This field will be present if the value is a
	// [[]ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion]
	// instead of an object.
	OfResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotations []ResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotationUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion]
	// instead of an object.
	OfResponseObjectStreamResponseContentPartDonePartOutputTextAnnotations []ResponseObjectStreamResponseContentPartDonePartOutputTextAnnotationUnion `json:",inline"`
	JSON                                                                   struct {
		OfResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotations respjson.Field
		OfResponseObjectStreamResponseContentPartDonePartOutputTextAnnotations  respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectStreamUnionPartAnnotations is an implicit subunion of ResponseObjectStreamUnion. ResponseObjectStreamUnionPartAnnotations 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: OfResponseObjectStreamResponseContentPartAddedPartOutputTextAnnotations OfResponseObjectStreamResponseContentPartDonePartOutputTextAnnotations]

func (*ResponseObjectStreamUnionPartAnnotations) UnmarshalJSON

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

type ResponseObjectStreamUnionPartLogprobs

type ResponseObjectStreamUnionPartLogprobs struct {
	// This field will be present if the value is a
	// [[]map[string]ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion]
	// instead of an object.
	OfMapOfResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobMap []map[string]ResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobUnion `json:",inline"`
	// This field will be present if the value is a
	// [[]map[string]ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion]
	// instead of an object.
	OfMapOfResponseObjectStreamResponseContentPartDonePartOutputTextLogprobMap []map[string]ResponseObjectStreamResponseContentPartDonePartOutputTextLogprobUnion `json:",inline"`
	JSON                                                                       struct {
		OfMapOfResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobMap respjson.Field
		OfMapOfResponseObjectStreamResponseContentPartDonePartOutputTextLogprobMap  respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectStreamUnionPartLogprobs is an implicit subunion of ResponseObjectStreamUnion. ResponseObjectStreamUnionPartLogprobs 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: OfMapOfResponseObjectStreamResponseContentPartAddedPartOutputTextLogprobMap OfMapOfResponseObjectStreamResponseContentPartDonePartOutputTextLogprobMap]

func (*ResponseObjectStreamUnionPartLogprobs) UnmarshalJSON

func (r *ResponseObjectStreamUnionPartLogprobs) 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 ResponseObjectToolFileSearch

type ResponseObjectToolFileSearch struct {
	// Tool type identifier, always "file_search"
	Type constant.FileSearch `json:"type,required"`
	// List of vector store identifiers to search within
	VectorStoreIDs []string `json:"vector_store_ids,required"`
	// (Optional) Additional filters to apply to the search
	Filters map[string]ResponseObjectToolFileSearchFilterUnion `json:"filters"`
	// (Optional) Maximum number of search results to return (1-50)
	MaxNumResults int64 `json:"max_num_results"`
	// (Optional) Options for ranking and scoring search results
	RankingOptions ResponseObjectToolFileSearchRankingOptions `json:"ranking_options"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type           respjson.Field
		VectorStoreIDs respjson.Field
		Filters        respjson.Field
		MaxNumResults  respjson.Field
		RankingOptions respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

File search tool configuration for OpenAI response inputs.

func (ResponseObjectToolFileSearch) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectToolFileSearch) UnmarshalJSON

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

type ResponseObjectToolFileSearchFilterUnion

type ResponseObjectToolFileSearchFilterUnion 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:"-"`
}

ResponseObjectToolFileSearchFilterUnion 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 (ResponseObjectToolFileSearchFilterUnion) AsAnyArray

func (u ResponseObjectToolFileSearchFilterUnion) AsAnyArray() (v []any)

func (ResponseObjectToolFileSearchFilterUnion) AsBool

func (ResponseObjectToolFileSearchFilterUnion) AsFloat

func (ResponseObjectToolFileSearchFilterUnion) AsString

func (ResponseObjectToolFileSearchFilterUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectToolFileSearchFilterUnion) UnmarshalJSON

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

type ResponseObjectToolFileSearchRankingOptions

type ResponseObjectToolFileSearchRankingOptions struct {
	// (Optional) Name of the ranking algorithm to use
	Ranker string `json:"ranker"`
	// (Optional) Minimum relevance score threshold for results
	ScoreThreshold float64 `json:"score_threshold"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Ranker         respjson.Field
		ScoreThreshold respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

(Optional) Options for ranking and scoring search results

func (ResponseObjectToolFileSearchRankingOptions) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectToolFileSearchRankingOptions) UnmarshalJSON

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

type ResponseObjectToolFunction

type ResponseObjectToolFunction struct {
	// Name of the function that can be called
	Name string `json:"name,required"`
	// Tool type identifier, always "function"
	Type constant.Function `json:"type,required"`
	// (Optional) Description of what the function does
	Description string `json:"description"`
	// (Optional) JSON schema defining the function's parameters
	Parameters map[string]ResponseObjectToolFunctionParameterUnion `json:"parameters"`
	// (Optional) Whether to enforce strict parameter validation
	Strict bool `json:"strict"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		Type        respjson.Field
		Description respjson.Field
		Parameters  respjson.Field
		Strict      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Function tool configuration for OpenAI response inputs.

func (ResponseObjectToolFunction) RawJSON

func (r ResponseObjectToolFunction) RawJSON() string

Returns the unmodified JSON received from the API

func (*ResponseObjectToolFunction) UnmarshalJSON

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

type ResponseObjectToolFunctionParameterUnion

type ResponseObjectToolFunctionParameterUnion 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:"-"`
}

ResponseObjectToolFunctionParameterUnion 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 (ResponseObjectToolFunctionParameterUnion) AsAnyArray

func (u ResponseObjectToolFunctionParameterUnion) AsAnyArray() (v []any)

func (ResponseObjectToolFunctionParameterUnion) AsBool

func (ResponseObjectToolFunctionParameterUnion) AsFloat

func (ResponseObjectToolFunctionParameterUnion) AsString

func (ResponseObjectToolFunctionParameterUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectToolFunctionParameterUnion) UnmarshalJSON

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

type ResponseObjectToolMcp

type ResponseObjectToolMcp struct {
	// Label to identify this MCP server
	ServerLabel string `json:"server_label,required"`
	// Tool type identifier, always "mcp"
	Type constant.Mcp `json:"type,required"`
	// (Optional) Restriction on which tools can be used from this server
	AllowedTools ResponseObjectToolMcpAllowedToolsUnion `json:"allowed_tools"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ServerLabel  respjson.Field
		Type         respjson.Field
		AllowedTools respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Model Context Protocol (MCP) tool configuration for OpenAI response object.

func (ResponseObjectToolMcp) RawJSON

func (r ResponseObjectToolMcp) RawJSON() string

Returns the unmodified JSON received from the API

func (*ResponseObjectToolMcp) UnmarshalJSON

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

type ResponseObjectToolMcpAllowedToolsAllowedToolsFilter

type ResponseObjectToolMcpAllowedToolsAllowedToolsFilter struct {
	// (Optional) List of specific tool names that are allowed
	ToolNames []string `json:"tool_names"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ToolNames   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Filter configuration for restricting which MCP tools can be used.

func (ResponseObjectToolMcpAllowedToolsAllowedToolsFilter) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectToolMcpAllowedToolsAllowedToolsFilter) UnmarshalJSON

type ResponseObjectToolMcpAllowedToolsUnion

type ResponseObjectToolMcpAllowedToolsUnion struct {
	// This field will be present if the value is a [[]string] instead of an object.
	OfStringArray []string `json:",inline"`
	// This field is from variant
	// [ResponseObjectToolMcpAllowedToolsAllowedToolsFilter].
	ToolNames []string `json:"tool_names"`
	JSON      struct {
		OfStringArray respjson.Field
		ToolNames     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectToolMcpAllowedToolsUnion contains all possible properties and values from [[]string], ResponseObjectToolMcpAllowedToolsAllowedToolsFilter.

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: OfStringArray]

func (ResponseObjectToolMcpAllowedToolsUnion) AsAllowedToolsFilter

func (ResponseObjectToolMcpAllowedToolsUnion) AsStringArray

func (u ResponseObjectToolMcpAllowedToolsUnion) AsStringArray() (v []string)

func (ResponseObjectToolMcpAllowedToolsUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectToolMcpAllowedToolsUnion) UnmarshalJSON

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

type ResponseObjectToolOpenAIResponseInputToolWebSearch

type ResponseObjectToolOpenAIResponseInputToolWebSearch struct {
	// Web search tool type variant to use
	//
	// Any of "web_search", "web_search_preview", "web_search_preview_2025_03_11",
	// "web_search_2025_08_26".
	Type ResponseObjectToolOpenAIResponseInputToolWebSearchType `json:"type,required"`
	// (Optional) Size of search context, must be "low", "medium", or "high"
	SearchContextSize string `json:"search_context_size"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type              respjson.Field
		SearchContextSize respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Web search tool configuration for OpenAI response inputs.

func (ResponseObjectToolOpenAIResponseInputToolWebSearch) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectToolOpenAIResponseInputToolWebSearch) UnmarshalJSON

type ResponseObjectToolOpenAIResponseInputToolWebSearchType

type ResponseObjectToolOpenAIResponseInputToolWebSearchType string

Web search tool type variant to use

const (
	ResponseObjectToolOpenAIResponseInputToolWebSearchTypeWebSearch                  ResponseObjectToolOpenAIResponseInputToolWebSearchType = "web_search"
	ResponseObjectToolOpenAIResponseInputToolWebSearchTypeWebSearchPreview           ResponseObjectToolOpenAIResponseInputToolWebSearchType = "web_search_preview"
	ResponseObjectToolOpenAIResponseInputToolWebSearchTypeWebSearchPreview2025_03_11 ResponseObjectToolOpenAIResponseInputToolWebSearchType = "web_search_preview_2025_03_11"
	ResponseObjectToolOpenAIResponseInputToolWebSearchTypeWebSearch2025_08_26        ResponseObjectToolOpenAIResponseInputToolWebSearchType = "web_search_2025_08_26"
)

type ResponseObjectToolType

type ResponseObjectToolType string

Web search tool type variant to use

const (
	ResponseObjectToolTypeWebSearch                  ResponseObjectToolType = "web_search"
	ResponseObjectToolTypeWebSearchPreview           ResponseObjectToolType = "web_search_preview"
	ResponseObjectToolTypeWebSearchPreview2025_03_11 ResponseObjectToolType = "web_search_preview_2025_03_11"
	ResponseObjectToolTypeWebSearch2025_08_26        ResponseObjectToolType = "web_search_2025_08_26"
	ResponseObjectToolTypeFileSearch                 ResponseObjectToolType = "file_search"
	ResponseObjectToolTypeFunction                   ResponseObjectToolType = "function"
	ResponseObjectToolTypeMcp                        ResponseObjectToolType = "mcp"
)

type ResponseObjectToolUnion

type ResponseObjectToolUnion struct {
	// Any of nil, "file_search", "function", "mcp".
	Type string `json:"type"`
	// This field is from variant [ResponseObjectToolOpenAIResponseInputToolWebSearch].
	SearchContextSize string `json:"search_context_size"`
	// This field is from variant [ResponseObjectToolFileSearch].
	VectorStoreIDs []string `json:"vector_store_ids"`
	// This field is from variant [ResponseObjectToolFileSearch].
	Filters map[string]ResponseObjectToolFileSearchFilterUnion `json:"filters"`
	// This field is from variant [ResponseObjectToolFileSearch].
	MaxNumResults int64 `json:"max_num_results"`
	// This field is from variant [ResponseObjectToolFileSearch].
	RankingOptions ResponseObjectToolFileSearchRankingOptions `json:"ranking_options"`
	// This field is from variant [ResponseObjectToolFunction].
	Name string `json:"name"`
	// This field is from variant [ResponseObjectToolFunction].
	Description string `json:"description"`
	// This field is from variant [ResponseObjectToolFunction].
	Parameters map[string]ResponseObjectToolFunctionParameterUnion `json:"parameters"`
	// This field is from variant [ResponseObjectToolFunction].
	Strict bool `json:"strict"`
	// This field is from variant [ResponseObjectToolMcp].
	ServerLabel string `json:"server_label"`
	// This field is from variant [ResponseObjectToolMcp].
	AllowedTools ResponseObjectToolMcpAllowedToolsUnion `json:"allowed_tools"`
	JSON         struct {
		Type              respjson.Field
		SearchContextSize respjson.Field
		VectorStoreIDs    respjson.Field
		Filters           respjson.Field
		MaxNumResults     respjson.Field
		RankingOptions    respjson.Field
		Name              respjson.Field
		Description       respjson.Field
		Parameters        respjson.Field
		Strict            respjson.Field
		ServerLabel       respjson.Field
		AllowedTools      respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

ResponseObjectToolUnion contains all possible properties and values from ResponseObjectToolOpenAIResponseInputToolWebSearch, ResponseObjectToolFileSearch, ResponseObjectToolFunction, ResponseObjectToolMcp.

Use the [ResponseObjectToolUnion.AsAny] method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (ResponseObjectToolUnion) AsFileSearch

func (ResponseObjectToolUnion) AsFunction

func (ResponseObjectToolUnion) AsMcp

func (ResponseObjectToolUnion) AsOpenAIResponseInputToolWebSearch

func (u ResponseObjectToolUnion) AsOpenAIResponseInputToolWebSearch() (v ResponseObjectToolOpenAIResponseInputToolWebSearch)

func (ResponseObjectToolUnion) RawJSON

func (u ResponseObjectToolUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ResponseObjectToolUnion) UnmarshalJSON

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

type ResponseObjectUsage

type ResponseObjectUsage struct {
	// Number of tokens in the input
	InputTokens int64 `json:"input_tokens,required"`
	// Number of tokens in the output
	OutputTokens int64 `json:"output_tokens,required"`
	// Total tokens used (input + output)
	TotalTokens int64 `json:"total_tokens,required"`
	// Detailed breakdown of input token usage
	InputTokensDetails ResponseObjectUsageInputTokensDetails `json:"input_tokens_details"`
	// Detailed breakdown of output token usage
	OutputTokensDetails ResponseObjectUsageOutputTokensDetails `json:"output_tokens_details"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InputTokens         respjson.Field
		OutputTokens        respjson.Field
		TotalTokens         respjson.Field
		InputTokensDetails  respjson.Field
		OutputTokensDetails respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

(Optional) Token usage information for the response

func (ResponseObjectUsage) RawJSON

func (r ResponseObjectUsage) RawJSON() string

Returns the unmodified JSON received from the API

func (*ResponseObjectUsage) UnmarshalJSON

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

type ResponseObjectUsageInputTokensDetails

type ResponseObjectUsageInputTokensDetails struct {
	// Number of tokens retrieved from cache
	CachedTokens int64 `json:"cached_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CachedTokens respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Detailed breakdown of input token usage

func (ResponseObjectUsageInputTokensDetails) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectUsageInputTokensDetails) UnmarshalJSON

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

type ResponseObjectUsageOutputTokensDetails

type ResponseObjectUsageOutputTokensDetails struct {
	// Number of tokens used for reasoning (o1/o3 models)
	ReasoningTokens int64 `json:"reasoning_tokens"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ReasoningTokens respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Detailed breakdown of output token usage

func (ResponseObjectUsageOutputTokensDetails) RawJSON

Returns the unmodified JSON received from the API

func (*ResponseObjectUsageOutputTokensDetails) UnmarshalJSON

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

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

func (r *ResponseService) Delete(ctx context.Context, responseID string, opts ...option.RequestOption) (res *ResponseDeleteResponse, err error)

Delete a response.

func (*ResponseService) Get

func (r *ResponseService) Get(ctx context.Context, responseID string, opts ...option.RequestOption) (res *ResponseObject, err error)

Get a model response.

func (*ResponseService) List

List all responses.

func (*ResponseService) ListAutoPaging

List all responses.

func (*ResponseService) New

Create a model response.

func (*ResponseService) NewStreaming

Create a model response.

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 RouteListParams

type RouteListParams struct {
	// Optional filter to control which routes are returned. Can be an API level ('v1',
	// 'v1alpha', 'v1beta') to show non-deprecated routes at that level, or
	// 'deprecated' to show deprecated routes across all levels. If not specified,
	// returns all non-deprecated routes.
	//
	// Any of "v1", "v1alpha", "v1beta", "deprecated".
	APIFilter RouteListParamsAPIFilter `query:"api_filter,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (RouteListParams) URLQuery

func (r RouteListParams) URLQuery() (v url.Values, err error)

URLQuery serializes RouteListParams's query parameters as `url.Values`.

type RouteListParamsAPIFilter

type RouteListParamsAPIFilter string

Optional filter to control which routes are returned. Can be an API level ('v1', 'v1alpha', 'v1beta') to show non-deprecated routes at that level, or 'deprecated' to show deprecated routes across all levels. If not specified, returns all non-deprecated routes.

const (
	RouteListParamsAPIFilterV1         RouteListParamsAPIFilter = "v1"
	RouteListParamsAPIFilterV1alpha    RouteListParamsAPIFilter = "v1alpha"
	RouteListParamsAPIFilterV1beta     RouteListParamsAPIFilter = "v1beta"
	RouteListParamsAPIFilterDeprecated RouteListParamsAPIFilter = "deprecated"
)

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, query RouteListParams, opts ...option.RequestOption) (res *[]RouteInfo, err error)

List routes. 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 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 []SafetyRunShieldParamsMessageUnion `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 SafetyRunShieldParamsMessageAssistant

type SafetyRunShieldParamsMessageAssistant struct {
	// (Optional) The name of the assistant message participant.
	Name param.Opt[string] `json:"name,omitzero"`
	// The content of the model's response
	Content SafetyRunShieldParamsMessageAssistantContentUnion `json:"content,omitzero"`
	// List of tool calls. Each tool call is an OpenAIChatCompletionToolCall object.
	ToolCalls []SafetyRunShieldParamsMessageAssistantToolCall `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 (SafetyRunShieldParamsMessageAssistant) MarshalJSON

func (r SafetyRunShieldParamsMessageAssistant) MarshalJSON() (data []byte, err error)

func (*SafetyRunShieldParamsMessageAssistant) UnmarshalJSON

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

type SafetyRunShieldParamsMessageAssistantContentArrayItem

type SafetyRunShieldParamsMessageAssistantContentArrayItem 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 (SafetyRunShieldParamsMessageAssistantContentArrayItem) MarshalJSON

func (*SafetyRunShieldParamsMessageAssistantContentArrayItem) UnmarshalJSON

type SafetyRunShieldParamsMessageAssistantContentUnion

type SafetyRunShieldParamsMessageAssistantContentUnion struct {
	OfString                                       param.Opt[string]                                       `json:",omitzero,inline"`
	OfSafetyRunShieldsMessageAssistantContentArray []SafetyRunShieldParamsMessageAssistantContentArrayItem `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 (SafetyRunShieldParamsMessageAssistantContentUnion) MarshalJSON

func (*SafetyRunShieldParamsMessageAssistantContentUnion) UnmarshalJSON

type SafetyRunShieldParamsMessageAssistantToolCall

type SafetyRunShieldParamsMessageAssistantToolCall 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 SafetyRunShieldParamsMessageAssistantToolCallFunction `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 (SafetyRunShieldParamsMessageAssistantToolCall) MarshalJSON

func (r SafetyRunShieldParamsMessageAssistantToolCall) MarshalJSON() (data []byte, err error)

func (*SafetyRunShieldParamsMessageAssistantToolCall) UnmarshalJSON

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

type SafetyRunShieldParamsMessageAssistantToolCallFunction

type SafetyRunShieldParamsMessageAssistantToolCallFunction 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 (SafetyRunShieldParamsMessageAssistantToolCallFunction) MarshalJSON

func (*SafetyRunShieldParamsMessageAssistantToolCallFunction) UnmarshalJSON

type SafetyRunShieldParamsMessageDeveloper

type SafetyRunShieldParamsMessageDeveloper struct {
	// The content of the developer message
	Content SafetyRunShieldParamsMessageDeveloperContentUnion `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 (SafetyRunShieldParamsMessageDeveloper) MarshalJSON

func (r SafetyRunShieldParamsMessageDeveloper) MarshalJSON() (data []byte, err error)

func (*SafetyRunShieldParamsMessageDeveloper) UnmarshalJSON

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

type SafetyRunShieldParamsMessageDeveloperContentArrayItem

type SafetyRunShieldParamsMessageDeveloperContentArrayItem 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 (SafetyRunShieldParamsMessageDeveloperContentArrayItem) MarshalJSON

func (*SafetyRunShieldParamsMessageDeveloperContentArrayItem) UnmarshalJSON

type SafetyRunShieldParamsMessageDeveloperContentUnion

type SafetyRunShieldParamsMessageDeveloperContentUnion struct {
	OfString                                       param.Opt[string]                                       `json:",omitzero,inline"`
	OfSafetyRunShieldsMessageDeveloperContentArray []SafetyRunShieldParamsMessageDeveloperContentArrayItem `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 (SafetyRunShieldParamsMessageDeveloperContentUnion) MarshalJSON

func (*SafetyRunShieldParamsMessageDeveloperContentUnion) UnmarshalJSON

type SafetyRunShieldParamsMessageSystem

type SafetyRunShieldParamsMessageSystem 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 SafetyRunShieldParamsMessageSystemContentUnion `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 (SafetyRunShieldParamsMessageSystem) MarshalJSON

func (r SafetyRunShieldParamsMessageSystem) MarshalJSON() (data []byte, err error)

func (*SafetyRunShieldParamsMessageSystem) UnmarshalJSON

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

type SafetyRunShieldParamsMessageSystemContentArrayItem

type SafetyRunShieldParamsMessageSystemContentArrayItem 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 (SafetyRunShieldParamsMessageSystemContentArrayItem) MarshalJSON

func (r SafetyRunShieldParamsMessageSystemContentArrayItem) MarshalJSON() (data []byte, err error)

func (*SafetyRunShieldParamsMessageSystemContentArrayItem) UnmarshalJSON

type SafetyRunShieldParamsMessageSystemContentUnion

type SafetyRunShieldParamsMessageSystemContentUnion struct {
	OfString                                    param.Opt[string]                                    `json:",omitzero,inline"`
	OfSafetyRunShieldsMessageSystemContentArray []SafetyRunShieldParamsMessageSystemContentArrayItem `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 (SafetyRunShieldParamsMessageSystemContentUnion) MarshalJSON

func (*SafetyRunShieldParamsMessageSystemContentUnion) UnmarshalJSON

type SafetyRunShieldParamsMessageTool

type SafetyRunShieldParamsMessageTool struct {
	// The response content from the tool
	Content SafetyRunShieldParamsMessageToolContentUnion `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 (SafetyRunShieldParamsMessageTool) MarshalJSON

func (r SafetyRunShieldParamsMessageTool) MarshalJSON() (data []byte, err error)

func (*SafetyRunShieldParamsMessageTool) UnmarshalJSON

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

type SafetyRunShieldParamsMessageToolContentArrayItem

type SafetyRunShieldParamsMessageToolContentArrayItem 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 (SafetyRunShieldParamsMessageToolContentArrayItem) MarshalJSON

func (r SafetyRunShieldParamsMessageToolContentArrayItem) MarshalJSON() (data []byte, err error)

func (*SafetyRunShieldParamsMessageToolContentArrayItem) UnmarshalJSON

type SafetyRunShieldParamsMessageToolContentUnion

type SafetyRunShieldParamsMessageToolContentUnion struct {
	OfString                                  param.Opt[string]                                  `json:",omitzero,inline"`
	OfSafetyRunShieldsMessageToolContentArray []SafetyRunShieldParamsMessageToolContentArrayItem `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 (SafetyRunShieldParamsMessageToolContentUnion) MarshalJSON

func (*SafetyRunShieldParamsMessageToolContentUnion) UnmarshalJSON

func (u *SafetyRunShieldParamsMessageToolContentUnion) UnmarshalJSON(data []byte) error

type SafetyRunShieldParamsMessageUnion

type SafetyRunShieldParamsMessageUnion struct {
	OfUser      *SafetyRunShieldParamsMessageUser      `json:",omitzero,inline"`
	OfSystem    *SafetyRunShieldParamsMessageSystem    `json:",omitzero,inline"`
	OfAssistant *SafetyRunShieldParamsMessageAssistant `json:",omitzero,inline"`
	OfTool      *SafetyRunShieldParamsMessageTool      `json:",omitzero,inline"`
	OfDeveloper *SafetyRunShieldParamsMessageDeveloper `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 (SafetyRunShieldParamsMessageUnion) GetContent

func (u SafetyRunShieldParamsMessageUnion) GetContent() (res safetyRunShieldParamsMessageUnionContent)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (SafetyRunShieldParamsMessageUnion) GetName

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

func (SafetyRunShieldParamsMessageUnion) GetRole

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

func (SafetyRunShieldParamsMessageUnion) GetToolCallID

func (u SafetyRunShieldParamsMessageUnion) GetToolCallID() *string

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

func (SafetyRunShieldParamsMessageUnion) GetToolCalls

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

func (SafetyRunShieldParamsMessageUnion) MarshalJSON

func (u SafetyRunShieldParamsMessageUnion) MarshalJSON() ([]byte, error)

func (*SafetyRunShieldParamsMessageUnion) UnmarshalJSON

func (u *SafetyRunShieldParamsMessageUnion) UnmarshalJSON(data []byte) error

type SafetyRunShieldParamsMessageUser

type SafetyRunShieldParamsMessageUser struct {
	// The content of the message, which can include text and other media
	Content SafetyRunShieldParamsMessageUserContentUnion `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 (SafetyRunShieldParamsMessageUser) MarshalJSON

func (r SafetyRunShieldParamsMessageUser) MarshalJSON() (data []byte, err error)

func (*SafetyRunShieldParamsMessageUser) UnmarshalJSON

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

type SafetyRunShieldParamsMessageUserContentArrayItemFile

type SafetyRunShieldParamsMessageUserContentArrayItemFile struct {
	File SafetyRunShieldParamsMessageUserContentArrayItemFileFile `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 (SafetyRunShieldParamsMessageUserContentArrayItemFile) MarshalJSON

func (r SafetyRunShieldParamsMessageUserContentArrayItemFile) MarshalJSON() (data []byte, err error)

func (*SafetyRunShieldParamsMessageUserContentArrayItemFile) UnmarshalJSON

type SafetyRunShieldParamsMessageUserContentArrayItemFileFile

type SafetyRunShieldParamsMessageUserContentArrayItemFileFile 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 (SafetyRunShieldParamsMessageUserContentArrayItemFileFile) MarshalJSON

func (*SafetyRunShieldParamsMessageUserContentArrayItemFileFile) UnmarshalJSON

type SafetyRunShieldParamsMessageUserContentArrayItemImageURL

type SafetyRunShieldParamsMessageUserContentArrayItemImageURL struct {
	// Image URL specification and processing details
	ImageURL SafetyRunShieldParamsMessageUserContentArrayItemImageURLImageURL `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 (SafetyRunShieldParamsMessageUserContentArrayItemImageURL) MarshalJSON

func (*SafetyRunShieldParamsMessageUserContentArrayItemImageURL) UnmarshalJSON

type SafetyRunShieldParamsMessageUserContentArrayItemImageURLImageURL

type SafetyRunShieldParamsMessageUserContentArrayItemImageURLImageURL 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 (SafetyRunShieldParamsMessageUserContentArrayItemImageURLImageURL) MarshalJSON

func (*SafetyRunShieldParamsMessageUserContentArrayItemImageURLImageURL) UnmarshalJSON

type SafetyRunShieldParamsMessageUserContentArrayItemText

type SafetyRunShieldParamsMessageUserContentArrayItemText 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 (SafetyRunShieldParamsMessageUserContentArrayItemText) MarshalJSON

func (r SafetyRunShieldParamsMessageUserContentArrayItemText) MarshalJSON() (data []byte, err error)

func (*SafetyRunShieldParamsMessageUserContentArrayItemText) UnmarshalJSON

type SafetyRunShieldParamsMessageUserContentArrayItemUnion

type SafetyRunShieldParamsMessageUserContentArrayItemUnion struct {
	OfText     *SafetyRunShieldParamsMessageUserContentArrayItemText     `json:",omitzero,inline"`
	OfImageURL *SafetyRunShieldParamsMessageUserContentArrayItemImageURL `json:",omitzero,inline"`
	OfFile     *SafetyRunShieldParamsMessageUserContentArrayItemFile     `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 (SafetyRunShieldParamsMessageUserContentArrayItemUnion) GetFile

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

func (SafetyRunShieldParamsMessageUserContentArrayItemUnion) GetImageURL

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

func (SafetyRunShieldParamsMessageUserContentArrayItemUnion) GetText

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

func (SafetyRunShieldParamsMessageUserContentArrayItemUnion) GetType

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

func (SafetyRunShieldParamsMessageUserContentArrayItemUnion) MarshalJSON

func (*SafetyRunShieldParamsMessageUserContentArrayItemUnion) UnmarshalJSON

type SafetyRunShieldParamsMessageUserContentUnion

type SafetyRunShieldParamsMessageUserContentUnion struct {
	OfString                                  param.Opt[string]                                       `json:",omitzero,inline"`
	OfSafetyRunShieldsMessageUserContentArray []SafetyRunShieldParamsMessageUserContentArrayItemUnion `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 (SafetyRunShieldParamsMessageUserContentUnion) MarshalJSON

func (*SafetyRunShieldParamsMessageUserContentUnion) UnmarshalJSON

func (u *SafetyRunShieldParamsMessageUserContentUnion) 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 shield. Run a shield.

type SafetyViolation

type SafetyViolation struct {
	// Additional metadata including specific violation codes for debugging and
	// telemetry
	Metadata map[string]SafetyViolationMetadataUnion `json:"metadata,required"`
	// Severity level of the violation
	//
	// Any of "info", "warn", "error".
	ViolationLevel SafetyViolationViolationLevel `json:"violation_level,required"`
	// (Optional) Message to convey to the user about the violation
	UserMessage string `json:"user_message"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Metadata       respjson.Field
		ViolationLevel respjson.Field
		UserMessage    respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Details of a safety violation detected by content moderation.

func (SafetyViolation) RawJSON

func (r SafetyViolation) RawJSON() string

Returns the unmodified JSON received from the API

func (*SafetyViolation) UnmarshalJSON

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

type SafetyViolationMetadataUnion

type SafetyViolationMetadataUnion 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:"-"`
}

SafetyViolationMetadataUnion 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 (SafetyViolationMetadataUnion) AsAnyArray

func (u SafetyViolationMetadataUnion) AsAnyArray() (v []any)

func (SafetyViolationMetadataUnion) AsBool

func (u SafetyViolationMetadataUnion) AsBool() (v bool)

func (SafetyViolationMetadataUnion) AsFloat

func (u SafetyViolationMetadataUnion) AsFloat() (v float64)

func (SafetyViolationMetadataUnion) AsString

func (u SafetyViolationMetadataUnion) AsString() (v string)

func (SafetyViolationMetadataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*SafetyViolationMetadataUnion) UnmarshalJSON

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

type SafetyViolationViolationLevel

type SafetyViolationViolationLevel string

Severity level of the violation

const (
	SafetyViolationViolationLevelInfo  SafetyViolationViolationLevel = "info"
	SafetyViolationViolationLevelWarn  SafetyViolationViolationLevel = "warn"
	SafetyViolationViolationLevelError SafetyViolationViolationLevel = "error"
)

type SamplingParams

type SamplingParams struct {
	// The sampling strategy.
	Strategy SamplingParamsStrategyUnion `json:"strategy,omitzero,required"`
	// The maximum number of tokens that can be generated in the completion. The token
	// count of your prompt plus max_tokens cannot exceed the model's context length.
	MaxTokens param.Opt[int64] `json:"max_tokens,omitzero"`
	// Number between -2.0 and 2.0. Positive values penalize new tokens based on
	// whether they appear in the text so far, increasing the model's likelihood to
	// talk about new topics.
	RepetitionPenalty param.Opt[float64] `json:"repetition_penalty,omitzero"`
	// Up to 4 sequences where the API will stop generating further tokens. The
	// returned text will not contain the stop sequence.
	Stop []string `json:"stop,omitzero"`
	// contains filtered or unexported fields
}

Sampling parameters.

The property Strategy is required.

func (SamplingParams) MarshalJSON

func (r SamplingParams) MarshalJSON() (data []byte, err error)

func (*SamplingParams) UnmarshalJSON

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

type SamplingParamsStrategyGreedy

type SamplingParamsStrategyGreedy struct {
	// Must be "greedy" to identify this sampling strategy
	Type constant.Greedy `json:"type,required"`
	// contains filtered or unexported fields
}

Greedy sampling strategy that selects the highest probability token at each step.

This struct has a constant value, construct it with NewSamplingParamsStrategyGreedy.

func NewSamplingParamsStrategyGreedy

func NewSamplingParamsStrategyGreedy() SamplingParamsStrategyGreedy

func (SamplingParamsStrategyGreedy) MarshalJSON

func (r SamplingParamsStrategyGreedy) MarshalJSON() (data []byte, err error)

func (*SamplingParamsStrategyGreedy) UnmarshalJSON

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

type SamplingParamsStrategyTopK

type SamplingParamsStrategyTopK struct {
	// Number of top tokens to consider for sampling. Must be at least 1
	TopK int64 `json:"top_k,required"`
	// Must be "top_k" to identify this sampling strategy
	//
	// This field can be elided, and will marshal its zero value as "top_k".
	Type constant.TopK `json:"type,required"`
	// contains filtered or unexported fields
}

Top-k sampling strategy that restricts sampling to the k most likely tokens.

The properties TopK, Type are required.

func (SamplingParamsStrategyTopK) MarshalJSON

func (r SamplingParamsStrategyTopK) MarshalJSON() (data []byte, err error)

func (*SamplingParamsStrategyTopK) UnmarshalJSON

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

type SamplingParamsStrategyTopP

type SamplingParamsStrategyTopP struct {
	// Controls randomness in sampling. Higher values increase randomness
	Temperature param.Opt[float64] `json:"temperature,omitzero"`
	// Cumulative probability threshold for nucleus sampling. Defaults to 0.95
	TopP param.Opt[float64] `json:"top_p,omitzero"`
	// Must be "top_p" to identify this sampling strategy
	//
	// This field can be elided, and will marshal its zero value as "top_p".
	Type constant.TopP `json:"type,required"`
	// contains filtered or unexported fields
}

Top-p (nucleus) sampling strategy that samples from the smallest set of tokens with cumulative probability >= p.

The property Type is required.

func (SamplingParamsStrategyTopP) MarshalJSON

func (r SamplingParamsStrategyTopP) MarshalJSON() (data []byte, err error)

func (*SamplingParamsStrategyTopP) UnmarshalJSON

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

type SamplingParamsStrategyUnion

type SamplingParamsStrategyUnion struct {
	OfGreedy *SamplingParamsStrategyGreedy `json:",omitzero,inline"`
	OfTopP   *SamplingParamsStrategyTopP   `json:",omitzero,inline"`
	OfTopK   *SamplingParamsStrategyTopK   `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 (SamplingParamsStrategyUnion) GetTemperature

func (u SamplingParamsStrategyUnion) GetTemperature() *float64

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

func (SamplingParamsStrategyUnion) GetTopK

func (u SamplingParamsStrategyUnion) GetTopK() *int64

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

func (SamplingParamsStrategyUnion) GetTopP

func (u SamplingParamsStrategyUnion) GetTopP() *float64

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

func (SamplingParamsStrategyUnion) GetType

func (u SamplingParamsStrategyUnion) GetType() *string

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

func (SamplingParamsStrategyUnion) MarshalJSON

func (u SamplingParamsStrategyUnion) MarshalJSON() ([]byte, error)

func (*SamplingParamsStrategyUnion) UnmarshalJSON

func (u *SamplingParamsStrategyUnion) UnmarshalJSON(data []byte) error

type ScoringFn

type ScoringFn struct {
	Identifier string                            `json:"identifier,required"`
	Metadata   map[string]ScoringFnMetadataUnion `json:"metadata,required"`
	ProviderID string                            `json:"provider_id,required"`
	ReturnType ScoringFnReturnType               `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 ScoringFnReturnType

type ScoringFnReturnType struct {
	// Any of "string", "number", "boolean", "array", "object", "json", "union",
	// "chat_completion_input", "completion_input", "agent_turn_input".
	Type string `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:"-"`
}

func (ScoringFnReturnType) RawJSON

func (r ScoringFnReturnType) RawJSON() string

Returns the unmodified JSON received from the API

func (*ScoringFnReturnType) UnmarshalJSON

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

type ScoringFunctionRegisterParams

type ScoringFunctionRegisterParams struct {
	// The description of the scoring function.
	Description string                                  `json:"description,required"`
	ReturnType  ScoringFunctionRegisterParamsReturnType `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 ScoringFunctionRegisterParamsReturnType

type ScoringFunctionRegisterParamsReturnType struct {
	// Any of "string", "number", "boolean", "array", "object", "json", "union",
	// "chat_completion_input", "completion_input", "agent_turn_input".
	Type string `json:"type,omitzero,required"`
	// contains filtered or unexported fields
}

The property Type is required.

func (ScoringFunctionRegisterParamsReturnType) MarshalJSON

func (r ScoringFunctionRegisterParamsReturnType) MarshalJSON() (data []byte, err error)

func (*ScoringFunctionRegisterParamsReturnType) UnmarshalJSON

func (r *ScoringFunctionRegisterParamsReturnType) 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 deprecated

Register a scoring function.

Deprecated: deprecated

type ScoringResult

type ScoringResult struct {
	// Map of metric name to aggregated value
	AggregatedResults map[string]ScoringResultAggregatedResultUnion `json:"aggregated_results,required"`
	// The scoring result for each row. Each row is a map of column name to value.
	ScoreRows []map[string]ScoringResultScoreRowUnion `json:"score_rows,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AggregatedResults respjson.Field
		ScoreRows         respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A scoring result for a single row.

func (ScoringResult) RawJSON

func (r ScoringResult) RawJSON() string

Returns the unmodified JSON received from the API

func (*ScoringResult) UnmarshalJSON

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

type ScoringResultAggregatedResultUnion

type ScoringResultAggregatedResultUnion 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:"-"`
}

ScoringResultAggregatedResultUnion 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 (ScoringResultAggregatedResultUnion) AsAnyArray

func (u ScoringResultAggregatedResultUnion) AsAnyArray() (v []any)

func (ScoringResultAggregatedResultUnion) AsBool

func (ScoringResultAggregatedResultUnion) AsFloat

func (ScoringResultAggregatedResultUnion) AsString

func (u ScoringResultAggregatedResultUnion) AsString() (v string)

func (ScoringResultAggregatedResultUnion) RawJSON

Returns the unmodified JSON received from the API

func (*ScoringResultAggregatedResultUnion) UnmarshalJSON

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

type ScoringResultScoreRowUnion

type ScoringResultScoreRowUnion 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:"-"`
}

ScoringResultScoreRowUnion 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 (ScoringResultScoreRowUnion) AsAnyArray

func (u ScoringResultScoreRowUnion) AsAnyArray() (v []any)

func (ScoringResultScoreRowUnion) AsBool

func (u ScoringResultScoreRowUnion) AsBool() (v bool)

func (ScoringResultScoreRowUnion) AsFloat

func (u ScoringResultScoreRowUnion) AsFloat() (v float64)

func (ScoringResultScoreRowUnion) AsString

func (u ScoringResultScoreRowUnion) AsString() (v string)

func (ScoringResultScoreRowUnion) RawJSON

func (u ScoringResultScoreRowUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ScoringResultScoreRowUnion) UnmarshalJSON

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

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]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]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 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 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) Delete deprecated

func (r *ShieldService) Delete(ctx context.Context, identifier string, opts ...option.RequestOption) (err error)

Unregister a shield.

Deprecated: deprecated

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 deprecated

func (r *ShieldService) Register(ctx context.Context, body ShieldRegisterParams, opts ...option.RequestOption) (res *Shield, err error)

Register a shield.

Deprecated: deprecated

type SystemMessageParam

type SystemMessageParam 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 InterleavedContentUnionParam `json:"content,omitzero,required"`
	// 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 (SystemMessageParam) MarshalJSON

func (r SystemMessageParam) MarshalJSON() (data []byte, err error)

func (*SystemMessageParam) UnmarshalJSON

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

type ToolDef

type ToolDef struct {
	// Name of the tool
	Name string `json:"name,required"`
	// (Optional) Human-readable description of what the tool does
	Description string `json:"description"`
	// (Optional) JSON Schema for tool inputs (MCP inputSchema)
	InputSchema map[string]ToolDefInputSchemaUnion `json:"input_schema"`
	// (Optional) Additional metadata about the tool
	Metadata map[string]ToolDefMetadataUnion `json:"metadata"`
	// (Optional) JSON Schema for tool outputs (MCP outputSchema)
	OutputSchema map[string]ToolDefOutputSchemaUnion `json:"output_schema"`
	// (Optional) ID of the tool group this tool belongs to
	ToolgroupID string `json:"toolgroup_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name         respjson.Field
		Description  respjson.Field
		InputSchema  respjson.Field
		Metadata     respjson.Field
		OutputSchema respjson.Field
		ToolgroupID  respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Tool definition used in runtime contexts.

func (ToolDef) RawJSON

func (r ToolDef) RawJSON() string

Returns the unmodified JSON received from the API

func (*ToolDef) UnmarshalJSON

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

type ToolDefInputSchemaUnion

type ToolDefInputSchemaUnion 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:"-"`
}

ToolDefInputSchemaUnion 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 (ToolDefInputSchemaUnion) AsAnyArray

func (u ToolDefInputSchemaUnion) AsAnyArray() (v []any)

func (ToolDefInputSchemaUnion) AsBool

func (u ToolDefInputSchemaUnion) AsBool() (v bool)

func (ToolDefInputSchemaUnion) AsFloat

func (u ToolDefInputSchemaUnion) AsFloat() (v float64)

func (ToolDefInputSchemaUnion) AsString

func (u ToolDefInputSchemaUnion) AsString() (v string)

func (ToolDefInputSchemaUnion) RawJSON

func (u ToolDefInputSchemaUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ToolDefInputSchemaUnion) UnmarshalJSON

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

type ToolDefMetadataUnion

type ToolDefMetadataUnion 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:"-"`
}

ToolDefMetadataUnion 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 (ToolDefMetadataUnion) AsAnyArray

func (u ToolDefMetadataUnion) AsAnyArray() (v []any)

func (ToolDefMetadataUnion) AsBool

func (u ToolDefMetadataUnion) AsBool() (v bool)

func (ToolDefMetadataUnion) AsFloat

func (u ToolDefMetadataUnion) AsFloat() (v float64)

func (ToolDefMetadataUnion) AsString

func (u ToolDefMetadataUnion) AsString() (v string)

func (ToolDefMetadataUnion) RawJSON

func (u ToolDefMetadataUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ToolDefMetadataUnion) UnmarshalJSON

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

type ToolDefOutputSchemaUnion

type ToolDefOutputSchemaUnion 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:"-"`
}

ToolDefOutputSchemaUnion 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 (ToolDefOutputSchemaUnion) AsAnyArray

func (u ToolDefOutputSchemaUnion) AsAnyArray() (v []any)

func (ToolDefOutputSchemaUnion) AsBool

func (u ToolDefOutputSchemaUnion) AsBool() (v bool)

func (ToolDefOutputSchemaUnion) AsFloat

func (u ToolDefOutputSchemaUnion) AsFloat() (v float64)

func (ToolDefOutputSchemaUnion) AsString

func (u ToolDefOutputSchemaUnion) AsString() (v string)

func (ToolDefOutputSchemaUnion) RawJSON

func (u ToolDefOutputSchemaUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*ToolDefOutputSchemaUnion) UnmarshalJSON

func (r *ToolDefOutputSchemaUnion) 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 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 ToolListResponseEnvelope

type ToolListResponseEnvelope struct {
	// List of tool definitions
	Data []ToolDef `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 (ToolListResponseEnvelope) RawJSON

func (r ToolListResponseEnvelope) RawJSON() string

Returns the unmodified JSON received from the API

func (*ToolListResponseEnvelope) UnmarshalJSON

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

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"`
	// (Optional) OAuth access token for authenticating with the MCP server.
	Authorization param.Opt[string] `json:"authorization,omitzero"`
	// 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 {
	// (Optional) OAuth access token for authenticating with the MCP server.
	Authorization param.Opt[string] `query:"authorization,omitzero" json:"-"`
	// 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 []ToolDef `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 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.

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

func (r *ToolRuntimeService) ListTools(ctx context.Context, query ToolRuntimeListToolsParams, opts ...option.RequestOption) (res *[]ToolDef, err error)

List all tools in the runtime.

type ToolService

type ToolService struct {
	Options []option.RequestOption
}

ToolService contains methods and other services that help with interacting with the llama-stack-client API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewToolService method instead.

func NewToolService

func NewToolService(opts ...option.RequestOption) (r ToolService)

NewToolService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ToolService) Get

func (r *ToolService) Get(ctx context.Context, toolName string, opts ...option.RequestOption) (res *ToolDef, err error)

Get a tool by its name.

func (*ToolService) List

func (r *ToolService) List(ctx context.Context, query ToolListParams, opts ...option.RequestOption) (res *[]ToolDef, 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 deprecated

func (r *ToolgroupService) Register(ctx context.Context, body ToolgroupRegisterParams, opts ...option.RequestOption) (err error)

Register a tool group.

Deprecated: deprecated

func (*ToolgroupService) Unregister deprecated

func (r *ToolgroupService) Unregister(ctx context.Context, toolgroupID string, opts ...option.RequestOption) (err error)

Unregister a tool group.

Deprecated: deprecated

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.
	VectorStoreID string `json:"vector_store_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 {
	// Unique identifier for the chunk. Must be provided explicitly.
	ChunkID string `json:"chunk_id,required"`
	// The content of the chunk, which can be interleaved text, images, or other types.
	Content 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"`
	// 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 ChunkID, 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 InterleavedContentUnionParam `json:"query,omitzero,required"`
	// The identifier of the vector database to query.
	VectorStoreID string `json:"vector_store_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 VectorStoreFileBatchCancelParams

type VectorStoreFileBatchCancelParams struct {
	VectorStoreID string `path:"vector_store_id,required" json:"-"`
	// contains filtered or unexported fields
}

type VectorStoreFileBatchGetParams

type VectorStoreFileBatchGetParams struct {
	VectorStoreID string `path:"vector_store_id,required" json:"-"`
	// contains filtered or unexported fields
}

type VectorStoreFileBatchListFilesParams

type VectorStoreFileBatchListFilesParams struct {
	VectorStoreID string `path:"vector_store_id,required" json:"-"`
	// 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:"-"`
	// Filter by file status. One of in_progress, completed, failed, cancelled.
	Filter param.Opt[string] `query:"filter,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 (VectorStoreFileBatchListFilesParams) URLQuery

func (r VectorStoreFileBatchListFilesParams) URLQuery() (v url.Values, err error)

URLQuery serializes VectorStoreFileBatchListFilesParams's query parameters as `url.Values`.

type VectorStoreFileBatchNewParams

type VectorStoreFileBatchNewParams struct {
	// A list of File IDs that the vector store should use
	FileIDs []string `json:"file_ids,omitzero,required"`
	// (Optional) Key-value attributes to store with the files
	Attributes map[string]VectorStoreFileBatchNewParamsAttributeUnion `json:"attributes,omitzero"`
	// (Optional) The chunking strategy used to chunk the file(s). Defaults to auto
	ChunkingStrategy VectorStoreFileBatchNewParamsChunkingStrategyUnion `json:"chunking_strategy,omitzero"`
	// contains filtered or unexported fields
}

func (VectorStoreFileBatchNewParams) MarshalJSON

func (r VectorStoreFileBatchNewParams) MarshalJSON() (data []byte, err error)

func (*VectorStoreFileBatchNewParams) UnmarshalJSON

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

type VectorStoreFileBatchNewParamsAttributeUnion

type VectorStoreFileBatchNewParamsAttributeUnion 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 (VectorStoreFileBatchNewParamsAttributeUnion) MarshalJSON

func (*VectorStoreFileBatchNewParamsAttributeUnion) UnmarshalJSON

func (u *VectorStoreFileBatchNewParamsAttributeUnion) UnmarshalJSON(data []byte) error

type VectorStoreFileBatchNewParamsChunkingStrategyAuto

type VectorStoreFileBatchNewParamsChunkingStrategyAuto 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 NewVectorStoreFileBatchNewParamsChunkingStrategyAuto.

func NewVectorStoreFileBatchNewParamsChunkingStrategyAuto

func NewVectorStoreFileBatchNewParamsChunkingStrategyAuto() VectorStoreFileBatchNewParamsChunkingStrategyAuto

func (VectorStoreFileBatchNewParamsChunkingStrategyAuto) MarshalJSON

func (r VectorStoreFileBatchNewParamsChunkingStrategyAuto) MarshalJSON() (data []byte, err error)

func (*VectorStoreFileBatchNewParamsChunkingStrategyAuto) UnmarshalJSON

type VectorStoreFileBatchNewParamsChunkingStrategyStatic

type VectorStoreFileBatchNewParamsChunkingStrategyStatic struct {
	// Configuration parameters for the static chunking strategy
	Static VectorStoreFileBatchNewParamsChunkingStrategyStaticStatic `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 (VectorStoreFileBatchNewParamsChunkingStrategyStatic) MarshalJSON

func (r VectorStoreFileBatchNewParamsChunkingStrategyStatic) MarshalJSON() (data []byte, err error)

func (*VectorStoreFileBatchNewParamsChunkingStrategyStatic) UnmarshalJSON

type VectorStoreFileBatchNewParamsChunkingStrategyStaticStatic

type VectorStoreFileBatchNewParamsChunkingStrategyStaticStatic 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 (VectorStoreFileBatchNewParamsChunkingStrategyStaticStatic) MarshalJSON

func (*VectorStoreFileBatchNewParamsChunkingStrategyStaticStatic) UnmarshalJSON

type VectorStoreFileBatchNewParamsChunkingStrategyUnion

type VectorStoreFileBatchNewParamsChunkingStrategyUnion struct {
	OfAuto   *VectorStoreFileBatchNewParamsChunkingStrategyAuto   `json:",omitzero,inline"`
	OfStatic *VectorStoreFileBatchNewParamsChunkingStrategyStatic `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 (VectorStoreFileBatchNewParamsChunkingStrategyUnion) GetStatic

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

func (VectorStoreFileBatchNewParamsChunkingStrategyUnion) GetType

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

func (VectorStoreFileBatchNewParamsChunkingStrategyUnion) MarshalJSON

func (*VectorStoreFileBatchNewParamsChunkingStrategyUnion) UnmarshalJSON

type VectorStoreFileBatchService

type VectorStoreFileBatchService struct {
	Options []option.RequestOption
}

VectorStoreFileBatchService 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 NewVectorStoreFileBatchService method instead.

func NewVectorStoreFileBatchService

func NewVectorStoreFileBatchService(opts ...option.RequestOption) (r VectorStoreFileBatchService)

NewVectorStoreFileBatchService 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 (*VectorStoreFileBatchService) Cancel

Cancels a vector store file batch.

func (*VectorStoreFileBatchService) Get

Retrieve a vector store file batch.

func (*VectorStoreFileBatchService) ListFiles

Returns a list of vector store files in a batch.

func (*VectorStoreFileBatchService) ListFilesAutoPaging

Returns a list of vector store files in a batch.

func (*VectorStoreFileBatchService) New

Create a vector store file batch. Generate an OpenAI-compatible vector store file batch for the given vector store.

type VectorStoreFileBatches

type VectorStoreFileBatches struct {
	// Unique identifier for the file batch
	ID string `json:"id,required"`
	// Timestamp when the file batch was created
	CreatedAt int64 `json:"created_at,required"`
	// File processing status counts for the batch
	FileCounts VectorStoreFileBatchesFileCounts `json:"file_counts,required"`
	// Object type identifier, always "vector_store.file_batch"
	Object string `json:"object,required"`
	// Current processing status of the file batch
	//
	// Any of "completed", "in_progress", "cancelled", "failed".
	Status VectorStoreFileBatchesStatus `json:"status,required"`
	// ID of the vector store containing the file batch
	VectorStoreID string `json:"vector_store_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		CreatedAt     respjson.Field
		FileCounts    respjson.Field
		Object        respjson.Field
		Status        respjson.Field
		VectorStoreID respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

OpenAI Vector Store File Batch object.

func (VectorStoreFileBatches) RawJSON

func (r VectorStoreFileBatches) RawJSON() string

Returns the unmodified JSON received from the API

func (*VectorStoreFileBatches) UnmarshalJSON

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

type VectorStoreFileBatchesFileCounts

type VectorStoreFileBatchesFileCounts 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 batch

func (VectorStoreFileBatchesFileCounts) RawJSON

Returns the unmodified JSON received from the API

func (*VectorStoreFileBatchesFileCounts) UnmarshalJSON

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

type VectorStoreFileBatchesStatus

type VectorStoreFileBatchesStatus string

Current processing status of the file batch

const (
	VectorStoreFileBatchesStatusCompleted  VectorStoreFileBatchesStatus = "completed"
	VectorStoreFileBatchesStatusInProgress VectorStoreFileBatchesStatus = "in_progress"
	VectorStoreFileBatchesStatusCancelled  VectorStoreFileBatchesStatus = "cancelled"
	VectorStoreFileBatchesStatusFailed     VectorStoreFileBatchesStatus = "failed"
)

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:"-"`
	// Whether to include embedding vectors in the response.
	IncludeEmbeddings param.Opt[bool] `query:"include_embeddings,omitzero" json:"-"`
	// Whether to include chunk metadata in the response.
	IncludeMetadata param.Opt[bool] `query:"include_metadata,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (VectorStoreFileContentParams) URLQuery

func (r VectorStoreFileContentParams) URLQuery() (v url.Values, err error)

URLQuery serializes VectorStoreFileContentParams's query parameters as `url.Values`.

type VectorStoreFileContentResponse

type VectorStoreFileContentResponse struct {
	// Parsed content of the file
	Data []VectorStoreFileContentResponseData `json:"data,required"`
	// Indicates if there are more content pages to fetch
	HasMore bool `json:"has_more,required"`
	// The object type, which is always `vector_store.file_content.page`
	Object constant.VectorStoreFileContentPage `json:"object,required"`
	// The token for the next page, if any
	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
		NextPage    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Represents the parsed content 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 VectorStoreFileContentResponseData

type VectorStoreFileContentResponseData struct {
	// The actual text content
	Text string `json:"text,required"`
	// Content type, currently only "text" is supported
	Type constant.Text `json:"type,required"`
	// Optional chunk metadata
	ChunkMetadata VectorStoreFileContentResponseDataChunkMetadata `json:"chunk_metadata"`
	// Optional embedding vector for this content chunk
	Embedding []float64 `json:"embedding"`
	// Optional user-defined metadata
	Metadata map[string]VectorStoreFileContentResponseDataMetadataUnion `json:"metadata"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Text          respjson.Field
		Type          respjson.Field
		ChunkMetadata respjson.Field
		Embedding     respjson.Field
		Metadata      respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Content item from a vector store file or search result.

func (VectorStoreFileContentResponseData) RawJSON

Returns the unmodified JSON received from the API

func (*VectorStoreFileContentResponseData) UnmarshalJSON

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

type VectorStoreFileContentResponseDataChunkMetadata

type VectorStoreFileContentResponseDataChunkMetadata 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:"-"`
}

Optional chunk metadata

func (VectorStoreFileContentResponseDataChunkMetadata) RawJSON

Returns the unmodified JSON received from the API

func (*VectorStoreFileContentResponseDataChunkMetadata) UnmarshalJSON

type VectorStoreFileContentResponseDataMetadataUnion

type VectorStoreFileContentResponseDataMetadataUnion 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:"-"`
}

VectorStoreFileContentResponseDataMetadataUnion 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 (VectorStoreFileContentResponseDataMetadataUnion) AsAnyArray

func (VectorStoreFileContentResponseDataMetadataUnion) AsBool

func (VectorStoreFileContentResponseDataMetadataUnion) AsFloat

func (VectorStoreFileContentResponseDataMetadataUnion) AsString

func (VectorStoreFileContentResponseDataMetadataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*VectorStoreFileContentResponseDataMetadataUnion) UnmarshalJSON

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 {
	// (Optional) A name for the vector store
	Name param.Opt[string] `json:"name,omitzero"`
	// (Optional) Strategy for splitting files into chunks
	ChunkingStrategy VectorStoreNewParamsChunkingStrategyUnion `json:"chunking_strategy,omitzero"`
	// (Optional) Expiration policy for the vector store
	ExpiresAfter map[string]VectorStoreNewParamsExpiresAfterUnion `json:"expires_after,omitzero"`
	// List of file IDs to include in the vector store
	FileIDs []string `json:"file_ids,omitzero"`
	// Set of key-value pairs that can be attached to the vector store
	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 VectorStoreNewParamsChunkingStrategyAuto

type VectorStoreNewParamsChunkingStrategyAuto 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 NewVectorStoreNewParamsChunkingStrategyAuto.

func NewVectorStoreNewParamsChunkingStrategyAuto

func NewVectorStoreNewParamsChunkingStrategyAuto() VectorStoreNewParamsChunkingStrategyAuto

func (VectorStoreNewParamsChunkingStrategyAuto) MarshalJSON

func (r VectorStoreNewParamsChunkingStrategyAuto) MarshalJSON() (data []byte, err error)

func (*VectorStoreNewParamsChunkingStrategyAuto) UnmarshalJSON

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

type VectorStoreNewParamsChunkingStrategyStatic

type VectorStoreNewParamsChunkingStrategyStatic struct {
	// Configuration parameters for the static chunking strategy
	Static VectorStoreNewParamsChunkingStrategyStaticStatic `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 (VectorStoreNewParamsChunkingStrategyStatic) MarshalJSON

func (r VectorStoreNewParamsChunkingStrategyStatic) MarshalJSON() (data []byte, err error)

func (*VectorStoreNewParamsChunkingStrategyStatic) UnmarshalJSON

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

type VectorStoreNewParamsChunkingStrategyStaticStatic

type VectorStoreNewParamsChunkingStrategyStaticStatic 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 (VectorStoreNewParamsChunkingStrategyStaticStatic) MarshalJSON

func (r VectorStoreNewParamsChunkingStrategyStaticStatic) MarshalJSON() (data []byte, err error)

func (*VectorStoreNewParamsChunkingStrategyStaticStatic) UnmarshalJSON

type VectorStoreNewParamsChunkingStrategyUnion

type VectorStoreNewParamsChunkingStrategyUnion struct {
	OfAuto   *VectorStoreNewParamsChunkingStrategyAuto   `json:",omitzero,inline"`
	OfStatic *VectorStoreNewParamsChunkingStrategyStatic `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) GetStatic

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

func (VectorStoreNewParamsChunkingStrategyUnion) GetType

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

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"`
	// Optional chunk metadata
	ChunkMetadata VectorStoreSearchResponseDataContentChunkMetadata `json:"chunk_metadata"`
	// Optional embedding vector for this content chunk
	Embedding []float64 `json:"embedding"`
	// Optional user-defined metadata
	Metadata map[string]VectorStoreSearchResponseDataContentMetadataUnion `json:"metadata"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Text          respjson.Field
		Type          respjson.Field
		ChunkMetadata respjson.Field
		Embedding     respjson.Field
		Metadata      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 VectorStoreSearchResponseDataContentChunkMetadata

type VectorStoreSearchResponseDataContentChunkMetadata 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:"-"`
}

Optional chunk metadata

func (VectorStoreSearchResponseDataContentChunkMetadata) RawJSON

Returns the unmodified JSON received from the API

func (*VectorStoreSearchResponseDataContentChunkMetadata) UnmarshalJSON

type VectorStoreSearchResponseDataContentMetadataUnion

type VectorStoreSearchResponseDataContentMetadataUnion 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:"-"`
}

VectorStoreSearchResponseDataContentMetadataUnion 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 (VectorStoreSearchResponseDataContentMetadataUnion) AsAnyArray

func (VectorStoreSearchResponseDataContentMetadataUnion) AsBool

func (VectorStoreSearchResponseDataContentMetadataUnion) AsFloat

func (VectorStoreSearchResponseDataContentMetadataUnion) AsString

func (VectorStoreSearchResponseDataContentMetadataUnion) RawJSON

Returns the unmodified JSON received from the API

func (*VectorStoreSearchResponseDataContentMetadataUnion) UnmarshalJSON

type VectorStoreService

type VectorStoreService struct {
	Options     []option.RequestOption
	Files       VectorStoreFileService
	FileBatches VectorStoreFileBatchService
}

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. Generate an OpenAI-compatible vector store with the given parameters.

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.22, 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.22, and used by the Go 1.24 encoding/json package.
packages
shared

Jump to

Keyboard shortcuts

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