providers

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LangChainLLMProvider

type LangChainLLMProvider struct {
	// contains filtered or unexported fields
}

LangChainLLMProvider LangChain LLM provider

func NewLangChainLLMProvider

func NewLangChainLLMProvider(model llms.Model, modelName string) *LangChainLLMProvider

NewLangChainLLMProvider creates a new LangChain LLM provider

func (*LangChainLLMProvider) Chat

func (p *LangChainLLMProvider) Chat(messages []types.Message) (types.Message, error)

Chat basic chat functionality

func (*LangChainLLMProvider) ChatStream

func (p *LangChainLLMProvider) ChatStream(messages []types.Message) (<-chan types.StreamMessage, error)

ChatStream streaming chat functionality

func (*LangChainLLMProvider) ChatWithTools

func (p *LangChainLLMProvider) ChatWithTools(messages []types.Message, tools []types.Tool) (types.Message, error)

ChatWithTools chat with tools functionality

func (*LangChainLLMProvider) ChatWithToolsStream

func (p *LangChainLLMProvider) ChatWithToolsStream(messages []types.Message, tools []types.Tool) (<-chan types.StreamMessage, error)

ChatWithToolsStream streaming chat with tools functionality

func (*LangChainLLMProvider) GetModelMetadata

func (p *LangChainLLMProvider) GetModelMetadata() types.ModelMetadata

GetModelMetadata gets the model metadata

func (*LangChainLLMProvider) GetModelName

func (p *LangChainLLMProvider) GetModelName() string

GetModelName gets the model name

type SimpleMemoryProvider

type SimpleMemoryProvider struct {
	// contains filtered or unexported fields
}

SimpleMemoryProvider simple memory provider implementation

func NewSimpleMemoryProvider

func NewSimpleMemoryProvider() *SimpleMemoryProvider

NewSimpleMemoryProvider creates a new simple memory provider

func (*SimpleMemoryProvider) AddMessage

func (p *SimpleMemoryProvider) AddMessage(ctx context.Context, message types.Message) error

AddMessage adds a message

func (*SimpleMemoryProvider) Clear

func (p *SimpleMemoryProvider) Clear(ctx context.Context) error

Clear clears memory

func (*SimpleMemoryProvider) GetMessages

func (p *SimpleMemoryProvider) GetMessages(ctx context.Context, limit int) ([]types.Message, error)

GetMessages gets messages

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL