MCPcopy
hub / github.com/Tencent/WeKnora / Chat

Interface Chat

internal/models/chat/chat.go:87–99  ·  view source on GitHub ↗

Chat 定义了聊天接口

Source from the content-addressed store, hash-verified

85
86// Chat 定义了聊天接口
87type Chat interface {
88 // Chat 进行非流式聊天
89 Chat(ctx context.Context, messages []Message, opts *ChatOptions) (*types.ChatResponse, error)
90
91 // ChatStream 进行流式聊天
92 ChatStream(ctx context.Context, messages []Message, opts *ChatOptions) (<-chan types.StreamResponse, error)
93
94 // GetModelName 获取模型名称
95 GetModelName() string
96
97 // GetModelID 获取模型ID
98 GetModelID() string
99}
100
101type ChatConfig struct {
102 Source types.ModelSource

Callers 25

generateSmartReplyMethod · 0.65
generateWithTemplateMethod · 0.65
GenerateTitleMethod · 0.65
extractEntitiesMethod · 0.65
extractRelationshipsMethod · 0.65
streamSmartReplyMethod · 0.65
handleModelFallbackMethod · 0.65
OnEventMethod · 0.65
ChatStreamMethod · 0.65

Implementers 9

captureChatModelinternal/application/service/session_k
templateCaptureChatModelinternal/application/service/wiki_inge
RemoteAPIChatinternal/models/chat/remote_api.go
OllamaChatinternal/models/chat/ollama.go
AnthropicChatinternal/models/chat/anthropic.go
debugChatinternal/models/chat/llm_debug_wrapper
langfuseChatinternal/models/chat/langfuse_wrapper.
mockChatinternal/agent/engine_test.go
stubChatinternal/agent/memory/consolidator_tes

Calls

no outgoing calls

Tested by

no test coverage detected