Documentation
¶
Index ¶
- Constants
- Variables
- func AddMetadataToAnnotations(annotation map[string]string, metadata *map[string]any) error
- func AddToScheme(scheme *runtime.Scheme) error
- func AddToSchemeWithGV(scheme *runtime.Scheme, schemeGroupVersion schema.GroupVersion) error
- func MetadataFromAnnotation(anno map[string]string) *map[string]any
- type Assistant
- type AssistantList
- type AssistantSpec
- type AssistantStatus
- type Cache
- type CacheList
- type ChatMessageImageURL
- type ContentPart
- type FunctionCall
- type FunctionDefinition
- type Image
- type ImageList
- type ImageSpec
- type ImageStatus
- type ImageURLDetail
- type InvokeTool
- type InvokeToolList
- type InvokeToolSpec
- type InvokeToolStatus
- type Message
- type MessageBody
- type MessageInput
- type MessageList
- type MessageSpec
- type MessageStatus
- type NoOptions
- type RoleType
- type Thread
- type ThreadList
- type ThreadSpec
- type ThreadStatus
- type Tool
- type ToolCall
- type ToolType
Constants ¶
const ( RoleTypeUser = RoleType("user") RoleTypeAssistant = RoleType("assistant") RoleTypeTool = RoleType("tool") )
Chat message role defined by the OpenAI API.
const UserAnnotationPrefix = "user.ai.acorn.io/"
const Version = "v1"
Variables ¶
var SchemeGroupVersion = schema.GroupVersion{ Group: ai_acorn_io.Group, Version: Version, }
Functions ¶
func AddToScheme ¶
func AddToSchemeWithGV ¶
func AddToSchemeWithGV(scheme *runtime.Scheme, schemeGroupVersion schema.GroupVersion) error
Types ¶
type Assistant ¶
type Assistant struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AssistantSpec `json:"spec,omitempty"`
Status AssistantStatus `json:"status,omitempty"`
}
func (*Assistant) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Assistant.
func (*Assistant) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Assistant) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Assistant) GetConditions ¶
func (*Assistant) GetDescription ¶
type AssistantList ¶
type AssistantList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Assistant `json:"items"`
}
func (*AssistantList) DeepCopy ¶
func (in *AssistantList) DeepCopy() *AssistantList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssistantList.
func (*AssistantList) DeepCopyInto ¶
func (in *AssistantList) DeepCopyInto(out *AssistantList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AssistantList) DeepCopyObject ¶
func (in *AssistantList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AssistantSpec ¶
type AssistantSpec struct {
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Instructions string `json:"instructions,omitempty"`
Model string `json:"model,omitempty"`
Vision bool `json:"vision,omitempty"`
Tools []Tool `json:"tools,omitempty"`
Parameters *jsonschema.Schema `json:"parameters"`
MaxTokens int `json:"maxTokens,omitempty"`
JSONResponse bool `json:"jsonResponse,omitempty"`
Cache *bool `json:"cache,omitempty"`
}
func (*AssistantSpec) DeepCopy ¶
func (in *AssistantSpec) DeepCopy() *AssistantSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssistantSpec.
func (*AssistantSpec) DeepCopyInto ¶
func (in *AssistantSpec) DeepCopyInto(out *AssistantSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AssistantStatus ¶
func (*AssistantStatus) DeepCopy ¶
func (in *AssistantStatus) DeepCopy() *AssistantStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AssistantStatus.
func (*AssistantStatus) DeepCopyInto ¶
func (in *AssistantStatus) DeepCopyInto(out *AssistantStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Cache ¶
type Cache struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Content []byte `json:"content,omitempty"`
}
func (*Cache) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cache.
func (*Cache) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cache) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CacheList ¶
type CacheList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Cache `json:"items"`
}
func (*CacheList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CacheList.
func (*CacheList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CacheList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ChatMessageImageURL ¶
type ChatMessageImageURL struct {
Base64 string `json:"base64,omitempty"`
ContentType string `json:"contentType,omitempty"`
URL string `json:"url,omitempty"`
Detail ImageURLDetail `json:"detail,omitempty"`
}
func (*ChatMessageImageURL) DeepCopy ¶
func (in *ChatMessageImageURL) DeepCopy() *ChatMessageImageURL
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChatMessageImageURL.
func (*ChatMessageImageURL) DeepCopyInto ¶
func (in *ChatMessageImageURL) DeepCopyInto(out *ChatMessageImageURL)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ContentPart ¶
type ContentPart struct {
Text string `json:"text,omitempty"`
ToolCall *ToolCall `json:"toolCall,omitempty"`
Image *ChatMessageImageURL `json:"image,omitempty"`
}
func Text ¶
func Text(text string) []ContentPart
func (*ContentPart) DeepCopy ¶
func (in *ContentPart) DeepCopy() *ContentPart
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContentPart.
func (*ContentPart) DeepCopyInto ¶
func (in *ContentPart) DeepCopyInto(out *ContentPart)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ContentPart) HasContent ¶
func (in ContentPart) HasContent() bool
type FunctionCall ¶
type FunctionCall struct {
Name string `json:"name,omitempty"`
Arguments string `json:"arguments,omitempty"`
}
func (*FunctionCall) DeepCopy ¶
func (in *FunctionCall) DeepCopy() *FunctionCall
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionCall.
func (*FunctionCall) DeepCopyInto ¶
func (in *FunctionCall) DeepCopyInto(out *FunctionCall)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FunctionDefinition ¶
type FunctionDefinition struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Domain string `json:"domain,omitempty"`
Parameters *jsonschema.Schema `json:"parameters"`
}
func (*FunctionDefinition) DeepCopy ¶
func (in *FunctionDefinition) DeepCopy() *FunctionDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FunctionDefinition.
func (*FunctionDefinition) DeepCopyInto ¶
func (in *FunctionDefinition) DeepCopyInto(out *FunctionDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Image ¶
type Image struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ImageSpec `json:"spec,omitempty"`
Status ImageStatus `json:"status,omitempty"`
}
func (*Image) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image.
func (*Image) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Image) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Image) GetConditions ¶
type ImageList ¶
type ImageList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Image `json:"items"`
}
func (*ImageList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageList.
func (*ImageList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ImageList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ImageSpec ¶
type ImageSpec struct {
ContentType string `json:"contentType,omitempty"`
Content []byte `json:"content,omitempty"`
}
func (*ImageSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec.
func (*ImageSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageStatus ¶
func (*ImageStatus) DeepCopy ¶
func (in *ImageStatus) DeepCopy() *ImageStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStatus.
func (*ImageStatus) DeepCopyInto ¶
func (in *ImageStatus) DeepCopyInto(out *ImageStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageURLDetail ¶
type ImageURLDetail string
const ( ImageURLDetailHigh ImageURLDetail = "high" ImageURLDetailLow ImageURLDetail = "low" ImageURLDetailAuto ImageURLDetail = "auto" )
type InvokeTool ¶
type InvokeTool struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec InvokeToolSpec `json:"spec,omitempty"`
Status InvokeToolStatus `json:"status,omitempty"`
}
func (*InvokeTool) DeepCopy ¶
func (in *InvokeTool) DeepCopy() *InvokeTool
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvokeTool.
func (*InvokeTool) DeepCopyInto ¶
func (in *InvokeTool) DeepCopyInto(out *InvokeTool)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InvokeTool) DeepCopyObject ¶
func (in *InvokeTool) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*InvokeTool) GetConditions ¶
func (in *InvokeTool) GetConditions() *[]metav1.Condition
type InvokeToolList ¶
type InvokeToolList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []InvokeTool `json:"items"`
}
func (*InvokeToolList) DeepCopy ¶
func (in *InvokeToolList) DeepCopy() *InvokeToolList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvokeToolList.
func (*InvokeToolList) DeepCopyInto ¶
func (in *InvokeToolList) DeepCopyInto(out *InvokeToolList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InvokeToolList) DeepCopyObject ¶
func (in *InvokeToolList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InvokeToolSpec ¶
type InvokeToolSpec struct {
ThreadName string `json:"threadName,omitempty"`
ParentMessageName string `json:"parentMessageName,omitempty"`
ResponseMessageName string `json:"responseMessageName,omitempty"`
ToolCall ToolCall `json:"toolCall,omitempty"`
}
func (*InvokeToolSpec) DeepCopy ¶
func (in *InvokeToolSpec) DeepCopy() *InvokeToolSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvokeToolSpec.
func (*InvokeToolSpec) DeepCopyInto ¶
func (in *InvokeToolSpec) DeepCopyInto(out *InvokeToolSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InvokeToolStatus ¶
type InvokeToolStatus struct {
Content []ContentPart `json:"content,omitempty"`
AssistantMessageName string `json:"assistantMessageName,omitempty"`
Generation int64 `json:"generation,omitempty"`
InProgress bool `json:"inProgress,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
func (*InvokeToolStatus) DeepCopy ¶
func (in *InvokeToolStatus) DeepCopy() *InvokeToolStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InvokeToolStatus.
func (*InvokeToolStatus) DeepCopyInto ¶
func (in *InvokeToolStatus) DeepCopyInto(out *InvokeToolStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Message ¶
type Message struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MessageSpec `json:"spec,omitempty"`
Status MessageStatus `json:"status,omitempty"`
}
func (*Message) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Message.
func (*Message) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Message) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Message) GetConditions ¶
func (*Message) GetDescription ¶
type MessageBody ¶
type MessageBody struct {
Role RoleType `json:"role,omitempty"`
Content []ContentPart `json:"content,omitempty" column:"name=Message,jsonpath=.spec.content"`
ToolCall *ToolCall `json:"toolCall,omitempty"`
}
func (*MessageBody) DeepCopy ¶
func (in *MessageBody) DeepCopy() *MessageBody
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MessageBody.
func (*MessageBody) DeepCopyInto ¶
func (in *MessageBody) DeepCopyInto(out *MessageBody)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (MessageBody) HasContent ¶
func (in MessageBody) HasContent() bool
func (MessageBody) IsToolCall ¶
func (in MessageBody) IsToolCall() bool
func (MessageBody) String ¶
func (in MessageBody) String() string
type MessageInput ¶
type MessageInput struct {
Completion bool `json:"completion,omitempty"`
Content []ContentPart `json:"content,omitempty"`
ToolCall *ToolCall `json:"toolCall,omitempty"`
InProgress bool `json:"inProgress,omitempty"`
}
func (*MessageInput) DeepCopy ¶
func (in *MessageInput) DeepCopy() *MessageInput
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MessageInput.
func (*MessageInput) DeepCopyInto ¶
func (in *MessageInput) DeepCopyInto(out *MessageInput)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (MessageInput) Valid ¶
func (in MessageInput) Valid() error
type MessageList ¶
type MessageList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Message `json:"items"`
}
func (*MessageList) DeepCopy ¶
func (in *MessageList) DeepCopy() *MessageList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MessageList.
func (*MessageList) DeepCopyInto ¶
func (in *MessageList) DeepCopyInto(out *MessageList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MessageList) DeepCopyObject ¶
func (in *MessageList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MessageSpec ¶
type MessageSpec struct {
Input MessageInput `json:"input,omitempty"`
ParentMessageName string `json:"parentMessageName,omitempty"`
FileNames []string `json:"fileNames,omitempty"`
More bool `json:"more,omitempty"`
}
func (*MessageSpec) DeepCopy ¶
func (in *MessageSpec) DeepCopy() *MessageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MessageSpec.
func (*MessageSpec) DeepCopyInto ¶
func (in *MessageSpec) DeepCopyInto(out *MessageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MessageStatus ¶
type MessageStatus struct {
Message MessageBody `json:"message,omitempty"`
InProgress bool `json:"inProgress,omitempty"`
RunAfter *metav1.Time `json:"runAfter,omitempty"`
ThreadName string `json:"threadName,omitempty"`
NextMessageName string `json:"nextMessageName,omitempty"`
InvokeToolNames []string `json:"invokeToolNames,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
func (*MessageStatus) DeepCopy ¶
func (in *MessageStatus) DeepCopy() *MessageStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MessageStatus.
func (*MessageStatus) DeepCopyInto ¶
func (in *MessageStatus) DeepCopyInto(out *MessageStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NoOptions ¶
func (*NoOptions) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NoOptions.
func (*NoOptions) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NoOptions) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Thread ¶
type Thread struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ThreadSpec `json:"spec,omitempty"`
Status ThreadStatus `json:"status,omitempty"`
}
func (*Thread) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Thread.
func (*Thread) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Thread) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Thread) GetConditions ¶
func (*Thread) GetDescription ¶
type ThreadList ¶
type ThreadList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Thread `json:"items"`
}
func (*ThreadList) DeepCopy ¶
func (in *ThreadList) DeepCopy() *ThreadList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThreadList.
func (*ThreadList) DeepCopyInto ¶
func (in *ThreadList) DeepCopyInto(out *ThreadList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ThreadList) DeepCopyObject ¶
func (in *ThreadList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ThreadSpec ¶
type ThreadSpec struct {
ParentThreadName string `json:"parentThreadName,omitempty"`
StartMessageName string `json:"startMessageName,omitempty"`
AssistantName string `json:"assistantName,omitempty"`
}
func (*ThreadSpec) DeepCopy ¶
func (in *ThreadSpec) DeepCopy() *ThreadSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThreadSpec.
func (*ThreadSpec) DeepCopyInto ¶
func (in *ThreadSpec) DeepCopyInto(out *ThreadSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ThreadStatus ¶
type ThreadStatus struct {
Description string `json:"description,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
func (*ThreadStatus) DeepCopy ¶
func (in *ThreadStatus) DeepCopy() *ThreadStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThreadStatus.
func (*ThreadStatus) DeepCopyInto ¶
func (in *ThreadStatus) DeepCopyInto(out *ThreadStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Tool ¶
type Tool struct {
Type ToolType `json:"type"`
Function FunctionDefinition `json:"function,omitempty"`
}
func (*Tool) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tool.
func (*Tool) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ToolCall ¶
type ToolCall struct {
Index *int `json:"index,omitempty"`
ID string `json:"id,omitempty"`
Type ToolType `json:"type,omitempty"`
Function FunctionCall `json:"function,omitempty"`
}
func (*ToolCall) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ToolCall.
func (*ToolCall) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.