database

package
v0.0.0-...-3b0f332 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatDb

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

func NewChatDb

func NewChatDb() *ChatDb

func (*ChatDb) DeleteContext

func (s *ChatDb) DeleteContext(userId string)

DeleteContext 删除上下文

func (*ChatDb) GetContext

func (s *ChatDb) GetContext(userId string) []string

GetContext 获取会话上下文

func (*ChatDb) GetModel

func (s *ChatDb) GetModel(userId string) string

GetModel 获取会话Model

func (*ChatDb) GetTemperature

func (s *ChatDb) GetTemperature(userId string) float32

GetTemperature 获取会话Temperature

func (*ChatDb) GetTopP

func (s *ChatDb) GetTopP(userId string) float32

GetTopP 获取会话TopP

func (*ChatDb) SetContext

func (s *ChatDb) SetContext(userId string, content []string)

SetContext 设置会话上下文

func (*ChatDb) SetModel

func (s *ChatDb) SetModel(userId string, model string)

SetModel 设置会话Model

func (*ChatDb) SetTemperature

func (s *ChatDb) SetTemperature(userId string, temperature float32)

SetTemperature 设置会话Temperature

func (*ChatDb) SetTopP

func (s *ChatDb) SetTopP(userId string, topP float32)

SetTopP 设置会话TopP

Jump to

Keyboard shortcuts

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