Documentation
¶
Index ¶
- type ExternalConversationPersistence
- func (p *ExternalConversationPersistence) LoadMessages(ctx context.Context, namespace string, previousMessageId string) ([]conversation.ConversationMessage, error)
- func (p *ExternalConversationPersistence) NewRunID(ctx context.Context) string
- func (p *ExternalConversationPersistence) SaveMessages(ctx context.Context, namespace, msgId, previousMsgId, conversationId string, ...) error
- func (p *ExternalConversationPersistence) SaveSummary(ctx context.Context, namespace string, summary conversation.Summary) error
- type ExternalLLMGateway
- func (p *ExternalLLMGateway) NewChatCompletion(ctx context.Context, providerName llm.ProviderName, ...) (*chat_completion.Response, error)
- func (p *ExternalLLMGateway) NewEmbedding(ctx context.Context, providerName llm.ProviderName, req *embeddings.Request) (*embeddings.Response, error)
- func (p *ExternalLLMGateway) NewResponses(ctx context.Context, providerName llm.ProviderName, req *responses.Request) (*responses.Response, error)
- func (p *ExternalLLMGateway) NewSpeech(ctx context.Context, providerName llm.ProviderName, req *speech.Request) (*speech.Response, error)
- func (p *ExternalLLMGateway) NewStreamingChatCompletion(ctx context.Context, providerName llm.ProviderName, ...) (chan *chat_completion.ResponseChunk, error)
- func (p *ExternalLLMGateway) NewStreamingResponses(ctx context.Context, providerName llm.ProviderName, req *responses.Request) (chan *responses.ResponseChunk, error)
- func (p *ExternalLLMGateway) NewStreamingSpeech(ctx context.Context, providerName llm.ProviderName, req *speech.Request) (chan *speech.ResponseChunk, error)
- type ExternalPromptPersistence
- type InMemoryConversationPersistence
- func (p *InMemoryConversationPersistence) Clear()
- func (p *InMemoryConversationPersistence) GetMessageCount() int
- func (p *InMemoryConversationPersistence) GetThreadCount() int
- func (p *InMemoryConversationPersistence) LoadMessages(ctx context.Context, namespace string, previousMessageId string) ([]conversation.ConversationMessage, error)
- func (p *InMemoryConversationPersistence) NewRunID(ctx context.Context) string
- func (p *InMemoryConversationPersistence) SaveMessages(ctx context.Context, namespace, msgId, previousMsgId, conversationId string, ...) error
- func (p *InMemoryConversationPersistence) SaveSummary(ctx context.Context, namespace string, summary conversation.Summary) error
- type LangfusePromptPersistence
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalConversationPersistence ¶
type ExternalConversationPersistence struct {
Endpoint string
// contains filtered or unexported fields
}
func NewExternalConversationPersistence ¶
func NewExternalConversationPersistence(endpoint string, projectID uuid.UUID) *ExternalConversationPersistence
func (*ExternalConversationPersistence) LoadMessages ¶
func (p *ExternalConversationPersistence) LoadMessages(ctx context.Context, namespace string, previousMessageId string) ([]conversation.ConversationMessage, error)
LoadMessages implements core.ChatHistory
func (*ExternalConversationPersistence) NewRunID ¶ added in v0.1.11
func (p *ExternalConversationPersistence) NewRunID(ctx context.Context) string
NewRunID generates a unique ID for a run
func (*ExternalConversationPersistence) SaveMessages ¶
func (p *ExternalConversationPersistence) SaveMessages(ctx context.Context, namespace, msgId, previousMsgId, conversationId string, messages []responses.InputMessageUnion, meta map[string]any) error
SaveMessages implements core.ChatHistory
func (*ExternalConversationPersistence) SaveSummary ¶
func (p *ExternalConversationPersistence) SaveSummary(ctx context.Context, namespace string, summary conversation.Summary) error
SaveSummary
type ExternalLLMGateway ¶
type ExternalLLMGateway struct {
// contains filtered or unexported fields
}
ExternalLLMGateway calls the agent-server's gateway API via HTTP. Use this when you're an SDK consumer calling the agent-server remotely.
func NewExternalLLMGateway ¶
func NewExternalLLMGateway(endpoint, virtualKey string) *ExternalLLMGateway
NewExternalLLMGateway creates a provider that calls agent-server via HTTP.
func (*ExternalLLMGateway) NewChatCompletion ¶
func (p *ExternalLLMGateway) NewChatCompletion(ctx context.Context, providerName llm.ProviderName, req *chat_completion.Request) (*chat_completion.Response, error)
func (*ExternalLLMGateway) NewEmbedding ¶
func (p *ExternalLLMGateway) NewEmbedding(ctx context.Context, providerName llm.ProviderName, req *embeddings.Request) (*embeddings.Response, error)
func (*ExternalLLMGateway) NewResponses ¶
func (p *ExternalLLMGateway) NewResponses(ctx context.Context, providerName llm.ProviderName, req *responses.Request) (*responses.Response, error)
func (*ExternalLLMGateway) NewSpeech ¶ added in v0.1.11
func (p *ExternalLLMGateway) NewSpeech(ctx context.Context, providerName llm.ProviderName, req *speech.Request) (*speech.Response, error)
func (*ExternalLLMGateway) NewStreamingChatCompletion ¶
func (p *ExternalLLMGateway) NewStreamingChatCompletion(ctx context.Context, providerName llm.ProviderName, req *chat_completion.Request) (chan *chat_completion.ResponseChunk, error)
func (*ExternalLLMGateway) NewStreamingResponses ¶
func (p *ExternalLLMGateway) NewStreamingResponses(ctx context.Context, providerName llm.ProviderName, req *responses.Request) (chan *responses.ResponseChunk, error)
func (*ExternalLLMGateway) NewStreamingSpeech ¶ added in v0.1.11
func (p *ExternalLLMGateway) NewStreamingSpeech(ctx context.Context, providerName llm.ProviderName, req *speech.Request) (chan *speech.ResponseChunk, error)
type ExternalPromptPersistence ¶
type ExternalPromptPersistence struct {
Endpoint string
// contains filtered or unexported fields
}
func (*ExternalPromptPersistence) LoadPrompt ¶
func (p *ExternalPromptPersistence) LoadPrompt(ctx context.Context) (string, error)
type InMemoryConversationPersistence ¶
type InMemoryConversationPersistence struct {
// contains filtered or unexported fields
}
InMemoryConversationPersistence is a simple in-memory implementation of ConversationPersistenceAdapter
func NewInMemoryConversationPersistence ¶
func NewInMemoryConversationPersistence() *InMemoryConversationPersistence
NewInMemoryConversationPersistence creates a new in-memory conversation persistence adapter
func (*InMemoryConversationPersistence) Clear ¶
func (p *InMemoryConversationPersistence) Clear()
Clear removes all stored data (useful for testing)
func (*InMemoryConversationPersistence) GetMessageCount ¶
func (p *InMemoryConversationPersistence) GetMessageCount() int
GetMessageCount returns the total number of messages (useful for testing)
func (*InMemoryConversationPersistence) GetThreadCount ¶
func (p *InMemoryConversationPersistence) GetThreadCount() int
GetThreadCount returns the total number of threads (useful for testing)
func (*InMemoryConversationPersistence) LoadMessages ¶
func (p *InMemoryConversationPersistence) LoadMessages(ctx context.Context, namespace string, previousMessageId string) ([]conversation.ConversationMessage, error)
LoadMessages retrieves all messages up to and including the previousMessageID
func (*InMemoryConversationPersistence) NewRunID ¶ added in v0.1.11
func (p *InMemoryConversationPersistence) NewRunID(ctx context.Context) string
NewRunID generates a unique ID for a run
func (*InMemoryConversationPersistence) SaveMessages ¶
func (p *InMemoryConversationPersistence) SaveMessages(ctx context.Context, namespace, msgId, previousMsgId, conversationId string, messages []responses.InputMessageUnion, meta map[string]any) error
SaveMessages saves messages with support for conversations and threads
func (*InMemoryConversationPersistence) SaveSummary ¶
func (p *InMemoryConversationPersistence) SaveSummary(ctx context.Context, namespace string, summary conversation.Summary) error
SaveSummary saves a conversation summary for a thread
type LangfusePromptPersistence ¶
type LangfusePromptPersistence struct {
// contains filtered or unexported fields
}
func NewLangfusePromptProvider ¶
func NewLangfusePromptProvider(endpoint, username, password string, name string, label string) *LangfusePromptPersistence
func (*LangfusePromptPersistence) LoadPrompt ¶
func (p *LangfusePromptPersistence) LoadPrompt(ctx context.Context) (string, error)