assistants

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, assistantId string) (*common.DeletionStatus, error)

func List

func List(ctx context.Context, param ...*common.ListParam) (*common.ListResult[Assistant], error)

Types

type Assistant

type Assistant interface {
	GetId() string
	GetCreatedAt() int64
	GetDescription() *string
	GetFileIds() []string
	GetInstructions() *string
	GetMetadata() map[string]string
	GetModel() string
	GetName() *string
	GetObject() string
	GetTools() []tools.Tool
}

func Create

func Create(ctx context.Context, param *AssistantParam) (Assistant, error)

func NewAssistantFromJson

func NewAssistantFromJson(json *gjson.Json) Assistant

func Retrieve

func Retrieve(ctx context.Context, assistantId string) (Assistant, error)

func Update

func Update(ctx context.Context, assistantId string, param *AssistantParam) (Assistant, error)

type AssistantParam

type AssistantParam struct {
	Model        string            `json:"model,omitempty" v:"required"`
	Name         string            `json:"name,omitempty"`
	Description  string            `json:"description,omitempty"`
	Instructions string            `json:"instructions,omitempty"`
	Tools        []tools.Tool      `json:"tools,omitempty"`
	FileIds      []string          `json:"file_ids,omitempty"`
	Metadata     map[string]string `json:"metadata,omitempty"`
}

Jump to

Keyboard shortcuts

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