Documentation
¶
Index ¶
- Variables
- func ChatCompletionNoTools(inv *hcommon.InvocationInfo, args interface{}) (interface{}, error)
- func ChatCompletionWithTools(inv *hcommon.InvocationInfo, args interface{}) (interface{}, error)
- func Embeddings(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func GetToolById(task task.Task, tid hcommon.ToolId) (*hcommon.ToolRegistry, bool)
- func GetToolByName(task task.Task, name string) (*hcommon.ToolRegistry, bool)
- func GetToolset(task task.Task, tsid hcommon.ToolsetId) (*hcommon.ToolsetRegistry, bool)
- func Input(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func MessagePassingLookup(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func MessagePassingRegister(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func MessagePassingSend(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func MessagePassingUnregister(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func NewTool(inv *hcommon.InvocationInfo, args interface{}) (interface{}, error)
- func NewToolset(inv *hcommon.InvocationInfo, args interface{}) (interface{}, error)
- func Record(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func Speak(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func SpeechToText(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func TextToImage(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func TextToSpeech(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func ToolsetInstallBuiltins(inv *hcommon.InvocationInfo, args interface{}) (interface{}, error)
- func Transform(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func TransformConfig(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func VectorStoreCreate(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func VectorStoreDelete(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func VectorStoreInsert(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- func VectorStoreSearch(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
- type ChatCompletionMemory
- type ChatMessage
- type EmbeddingFunc
- type MessagePassingRegistry
- type TransformRegistry
- type VectorStore
- type VectorStoreRegistry
- func (r *VectorStoreRegistry) Create(storeName string, dimensions uint64) (int, error)
- func (r *VectorStoreRegistry) Delete(vid int) error
- func (r *VectorStoreRegistry) Insert(vid int, vector []float32, payload []byte) error
- func (r *VectorStoreRegistry) Search(vid int, vector []float32, limit uint64) ([]*VectorStoreSearchResult, error)
- type VectorStoreSearchResult
Constants ¶
This section is empty.
Variables ¶
View Source
var Hostcalls = []*hostcalls.HostCall{ { Name: payload.HostCallTransform, Handler: Transform, }, { Name: payload.HostCallTransformConfig, Handler: TransformConfig, }, { Name: payload.HostCallToolNew, Handler: NewTool, }, { Name: payload.HostCallToolsetNew, Handler: NewToolset, }, { Name: payload.HostCallToolsetInstallBuiltins, Handler: ToolsetInstallBuiltins, }, { Name: payload.HostCallVectorStoreCreate, Handler: VectorStoreCreate, }, { Name: payload.HostCallVectorStoreDelete, Handler: VectorStoreDelete, }, { Name: payload.HostCallVectorStoreInsert, Handler: VectorStoreInsert, }, { Name: payload.HostCallVectorStoreSearch, Handler: VectorStoreSearch, }, { Name: payload.HostCallMessagePassingRegister, Handler: MessagePassingRegister, }, { Name: payload.HostCallMessagePassingUnregister, Handler: MessagePassingUnregister, }, { Name: payload.HostCallMessagePassingLookup, Handler: MessagePassingLookup, }, { Name: payload.HostCallMessagePassingSend, Handler: MessagePassingSend, }, { Name: payload.HostCallInput, Handler: Input, }, { Name: payload.HostCallSpeak, Handler: Speak, }, { Name: payload.HostCallRecord, Handler: Record, }, }
Functions ¶
func ChatCompletionNoTools ¶
func ChatCompletionNoTools(inv *hcommon.InvocationInfo, args interface{}) (interface{}, error)
func ChatCompletionWithTools ¶
func ChatCompletionWithTools(inv *hcommon.InvocationInfo, args interface{}) (interface{}, error)
func Embeddings ¶
func Embeddings(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func GetToolById ¶
func GetToolByName ¶
func GetToolset ¶
func Input ¶
func Input(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func MessagePassingLookup ¶
func MessagePassingLookup(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func MessagePassingRegister ¶
func MessagePassingRegister(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func MessagePassingSend ¶
func MessagePassingSend(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func MessagePassingUnregister ¶
func MessagePassingUnregister(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func NewTool ¶
func NewTool(inv *hcommon.InvocationInfo, args interface{}) (interface{}, error)
func NewToolset ¶
func NewToolset(inv *hcommon.InvocationInfo, args interface{}) (interface{}, error)
func Record ¶
func Record(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func Speak ¶
func Speak(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func SpeechToText ¶
func SpeechToText(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func TextToImage ¶
func TextToImage(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func TextToSpeech ¶
func TextToSpeech(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func ToolsetInstallBuiltins ¶
func ToolsetInstallBuiltins(inv *hcommon.InvocationInfo, args interface{}) (interface{}, error)
func Transform ¶
func Transform(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func TransformConfig ¶
func TransformConfig(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func VectorStoreCreate ¶
func VectorStoreCreate(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func VectorStoreDelete ¶
func VectorStoreDelete(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func VectorStoreInsert ¶
func VectorStoreInsert(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
func VectorStoreSearch ¶
func VectorStoreSearch(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
Types ¶
type ChatCompletionMemory ¶
type ChatCompletionMemory struct {
Messages []ChatMessage `json:"messages"`
}
func NewChatCompletionMemory ¶
func NewChatCompletionMemory() *ChatCompletionMemory
func (*ChatCompletionMemory) AddMessage ¶
func (m *ChatCompletionMemory) AddMessage(msg ChatMessage)
func (*ChatCompletionMemory) Clear ¶
func (m *ChatCompletionMemory) Clear()
func (*ChatCompletionMemory) GetMessages ¶
func (m *ChatCompletionMemory) GetMessages() []ChatMessage
type ChatMessage ¶
type EmbeddingFunc ¶
type EmbeddingFunc func(inv *hostcalls.InvocationInfo, args interface{}) (interface{}, error)
type MessagePassingRegistry ¶
type MessagePassingRegistry struct {
// contains filtered or unexported fields
}
type TransformRegistry ¶
type TransformRegistry struct {
// contains filtered or unexported fields
}
type VectorStore ¶
type VectorStoreRegistry ¶
type VectorStoreRegistry struct {
Stores []*VectorStore
Client *qdrant.Client
}
func NewVectorStoreRegistry ¶
func NewVectorStoreRegistry() (*VectorStoreRegistry, error)
func (*VectorStoreRegistry) Create ¶
func (r *VectorStoreRegistry) Create(storeName string, dimensions uint64) (int, error)
func (*VectorStoreRegistry) Delete ¶
func (r *VectorStoreRegistry) Delete(vid int) error
func (*VectorStoreRegistry) Insert ¶
func (r *VectorStoreRegistry) Insert(vid int, vector []float32, payload []byte) error
func (*VectorStoreRegistry) Search ¶
func (r *VectorStoreRegistry) Search(vid int, vector []float32, limit uint64) ([]*VectorStoreSearchResult, error)
type VectorStoreSearchResult ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.