Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamoDB ¶
type DynamoDB struct {
// contains filtered or unexported fields
}
func NewDynamoDB ¶
func NewDynamoDB(client DynamoDBClient, tableName, sessionID string) *DynamoDB
func (*DynamoDB) AddAIMessage ¶
func (*DynamoDB) AddMessage ¶
func (mh *DynamoDB) AddMessage(message schema.ChatMessage) error
func (*DynamoDB) AddUserMessage ¶
type DynamoDBClient ¶ added in v0.0.11
type DynamoDBClient interface { GetItem(ctx context.Context, params *dynamodb.GetItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error) PutItem(ctx context.Context, params *dynamodb.PutItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error) DeleteItem(ctx context.Context, params *dynamodb.DeleteItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.DeleteItemOutput, error) }
type InMemory ¶
type InMemory struct {
// contains filtered or unexported fields
}
func NewInMemory ¶
func NewInMemory() *InMemory
func NewInMemoryWithMessages ¶
func NewInMemoryWithMessages(messages schema.ChatMessages) *InMemory
func (*InMemory) AddAIMessage ¶
func (*InMemory) AddMessage ¶
func (mh *InMemory) AddMessage(message schema.ChatMessage) error
func (*InMemory) AddUserMessage ¶
type Redis ¶ added in v0.0.12
type Redis struct {
// contains filtered or unexported fields
}
func NewRedis ¶ added in v0.0.12
func NewRedis(redisClient RedisClient, sessionID string) *Redis
func (*Redis) AddAIMessage ¶ added in v0.0.12
func (*Redis) AddMessage ¶ added in v0.0.12
func (mh *Redis) AddMessage(message schema.ChatMessage) error
func (*Redis) AddUserMessage ¶ added in v0.0.12
type RedisClient ¶ added in v0.0.12
type RedisClient interface { LRange(ctx context.Context, key string, start, stop int64) *redis.StringSliceCmd LPush(ctx context.Context, key string, values ...interface{}) *redis.IntCmd Del(ctx context.Context, keys ...string) *redis.IntCmd Expire(ctx context.Context, key string, expiration time.Duration) *redis.BoolCmd }
type RedisOptions ¶ added in v0.0.12
Click to show internal directories.
Click to hide internal directories.