Documentation
¶
Index ¶
- Constants
- func AIClientFromObject(obj object.Object) mcpai.Client
- func GetChatStreamClass() *object.Class
- func GetOpenAIClientClass() *object.Class
- func GetPipelineClass() *object.Class
- func GetResponseStreamClass() *object.Class
- func Register(registrar interface{ ... })
- func WrapClient(c ai.Client) object.Object
- type ChatStreamInstance
- type ClientInstance
- type PipelineInstance
- type ResponseStreamInstance
Constants ¶
const ( AILibraryName = "scriptling.ai" AILibraryDesc = "AI and LLM functions for interacting with multiple AI provider APIs" )
Variables ¶
This section is empty.
Functions ¶
func AIClientFromObject ¶ added in v0.2.23
AIClientFromObject extracts the underlying ai.Client from a Scriptling object.Instance created by ai.Client(...). Returns nil if the object is not a valid AI client instance.
func GetChatStreamClass ¶
func GetOpenAIClientClass ¶
GetOpenAIClientClass returns the OpenAI Client class (thread-safe singleton)
func GetPipelineClass ¶ added in v0.9.0
GetPipelineClass returns the Pipeline class singleton.
func GetResponseStreamClass ¶ added in v0.2.0
GetResponseStreamClass returns the ResponseStream class (thread-safe singleton)
Types ¶
type ChatStreamInstance ¶
type ChatStreamInstance struct {
// contains filtered or unexported fields
}
ChatStreamInstance wraps an AI chat stream for use in scriptling
type ClientInstance ¶
type ClientInstance struct {
// contains filtered or unexported fields
}
ClientInstance wraps an AI client for use in scriptling
type PipelineInstance ¶ added in v0.9.0
type PipelineInstance struct {
// contains filtered or unexported fields
}
PipelineInstance holds the state for a running pipeline. Workers are started immediately at construction and drain the queue until it is closed by flush() / complete().
type ResponseStreamInstance ¶ added in v0.2.0
type ResponseStreamInstance struct {
// contains filtered or unexported fields
}
ResponseStreamInstance wraps an AI response stream for use in scriptling