conversation

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BingConversation

type BingConversation struct {
	ConversationId string
	ParentId       string // // parentId == res.Message.ID

	StrCookie string
	Cookies   []map[string]interface{}
	Prompt    string
	Proxy     string
	// contains filtered or unexported fields
}

func NewBingConversation

func NewBingConversation(conversationId, parentId, cookie string) *BingConversation

func (*BingConversation) AddMessage

func (s *BingConversation) AddMessage(message string)

func (*BingConversation) ConversionID

func (s *BingConversation) ConversionID() string

func (*BingConversation) GetMessage

func (s *BingConversation) GetMessage() interface{}

func (*BingConversation) ID

func (s *BingConversation) ID() string

func (*BingConversation) NotifyObservers

func (s *BingConversation) NotifyObservers(data interface{})

func (*BingConversation) RegisterObserver

func (s *BingConversation) RegisterObserver(observer observer.Observer)

func (*BingConversation) RemoveObserver

func (s *BingConversation) RemoveObserver(observer observer.Observer)

func (*BingConversation) SetLastMessage

func (s *BingConversation) SetLastMessage(msg string)

func (*BingConversation) SetStrategy

func (s *BingConversation) SetStrategy(strategyName string)

func (*BingConversation) StrategyName

func (s *BingConversation) StrategyName() string

type ChatConversation

type ChatConversation struct {
	ConversationId string
	ParentId       string

	SecretKey string
	SystemMsg string
	Prompt    string
	Proxy     string
	// contains filtered or unexported fields
}

func NewChatConversation

func NewChatConversation(conversationID, secretKey string) *ChatConversation

func (*ChatConversation) AddMessage

func (s *ChatConversation) AddMessage(message string)

func (*ChatConversation) ConversionID

func (s *ChatConversation) ConversionID() string

func (*ChatConversation) GetMessage

func (s *ChatConversation) GetMessage() interface{}

func (*ChatConversation) ID

func (s *ChatConversation) ID() string

func (*ChatConversation) NotifyObservers

func (s *ChatConversation) NotifyObservers(data interface{})

func (*ChatConversation) RegisterObserver

func (s *ChatConversation) RegisterObserver(observer observer.Observer)

func (*ChatConversation) RemoveObserver

func (s *ChatConversation) RemoveObserver(observer observer.Observer)

func (*ChatConversation) SetLastMessage

func (s *ChatConversation) SetLastMessage(msg string)

func (*ChatConversation) SetStrategy

func (s *ChatConversation) SetStrategy(strategyName string)

func (*ChatConversation) StrategyName

func (s *ChatConversation) StrategyName() string

type ChatGPTUnoConversation

type ChatGPTUnoConversation struct {
	ConversationId string
	ParentId       string // // parentId == res.Message.ID

	AccessToken string
	Prompt      string
	// contains filtered or unexported fields
}

func NewChatGPTUnoConversation

func NewChatGPTUnoConversation(conversationId, parentId, accessToken string) *ChatGPTUnoConversation

func (*ChatGPTUnoConversation) AddMessage

func (s *ChatGPTUnoConversation) AddMessage(message string)

func (*ChatGPTUnoConversation) ConversionID

func (s *ChatGPTUnoConversation) ConversionID() string

func (*ChatGPTUnoConversation) GetMessage

func (s *ChatGPTUnoConversation) GetMessage() interface{}

func (*ChatGPTUnoConversation) ID

func (*ChatGPTUnoConversation) NotifyObservers

func (s *ChatGPTUnoConversation) NotifyObservers(data interface{})

func (*ChatGPTUnoConversation) RegisterObserver

func (s *ChatGPTUnoConversation) RegisterObserver(observer observer.Observer)

func (*ChatGPTUnoConversation) RemoveObserver

func (s *ChatGPTUnoConversation) RemoveObserver(observer observer.Observer)

func (*ChatGPTUnoConversation) SetLastMessage

func (s *ChatGPTUnoConversation) SetLastMessage(msg string)

func (*ChatGPTUnoConversation) SetStrategy

func (s *ChatGPTUnoConversation) SetStrategy(strategyName string)

func (*ChatGPTUnoConversation) StrategyName

func (s *ChatGPTUnoConversation) StrategyName() string

type Conversation

type Conversation interface {
	ID() string
	ConversionID() string
	AddMessage(message string)
	GetMessage() interface{}
	SetLastMessage(msg string)
	StrategyName() string
	SetStrategy(strategyName string)
}

Jump to

Keyboard shortcuts

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