Documentation
¶
Overview ¶
Pachage schema include BaseIOSchema etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToMessage ¶ added in v1.6.4
func ToMessage(s Schema, dist *instructor.Message)
Types ¶
type Attachement ¶
type Attachement struct {
// ImageURL attached image_url
ImageURLs []string `json:"image_url,omitempty"`
// Files attached file
Files []io.Reader `json:"file,omitempty"`
// FileIDs llm FileIDs
FileIDs []string `json:"file_id,omitempty"`
// VideoURLs
VideoURLs []string `json:"video_url,omitempty"`
}
Attachement message attachement
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
Base is a base schema
func (Base) Attachement ¶
func (r Base) Attachement() *Attachement
Attachement returns schema attachement
func (*Base) SetAttachement ¶ added in v1.0.1
func (r *Base) SetAttachement(attach *Attachement)
Attachement returns schema attachement
func (*Base) SetExtraBody ¶ added in v1.4.7
type Input ¶
type Input struct {
Base
// ChatMessage is the chat message sent by the user to the assistant.
ChatMessage string `` /* 134-byte string literal not displayed */
}
Input implements BaseAgentInputSchema This schema represents the input from the user to the AI agent.
func CreateInput ¶ added in v1.0.1
CreateeInput returns a BaseAgentInput
type Output ¶
type Output struct {
Base
// ChatMessage is the chat message exchanged between the user and the chat agent.
// contains the markdown-enabled response generated by the chat agent.
ChatMessage string `` /* 218-byte string literal not displayed */
}
Output implements BaseAgentOutputSchema This schema represents the response generated by the chat agent.
func CreateOutput ¶ added in v1.0.1
CreateOutput returns a BaseAgentOutput
type Schema ¶
type Schema interface {
// Attachement() returns schema attchement
Attachement() *Attachement
// Chunks() returns additional schema chunks
Chunks() []Schema
// ExtraBody
ExtraBody() map[string]any
}
Schema is message schema interface
type SchemaPointer ¶ added in v1.0.8
type SchemaPointer interface {
Schema
SetAttachement(*Attachement)
SetExtraBody(map[string]any)
}
type String ¶
type String struct {
Base
// contains filtered or unexported fields
}
func (String) MarshalYAML ¶ added in v1.5.0
Click to show internal directories.
Click to hide internal directories.