This commit is contained in:
lehel 2025-10-08 15:09:36 +02:00
parent 2bd7333233
commit 46a4374e69
No known key found for this signature in database
GPG Key ID: 9C4F9D6111EE5CFA
3 changed files with 10 additions and 0 deletions

View File

@ -32,6 +32,9 @@ func (m *mockLLM) DisambiguateBestMatch(ctx context.Context, msg string, candida
func (m *mockLLM) GetEmbeddings(ctx context.Context, input string) ([]float64, error) {
return m.embeddings, m.embeddingErr
}
func (m *mockLLM) TranslateToEnglish(ctx context.Context, msg string) (string, error) {
return msg, nil
}
// --- Test VisitDB ---
type testVisitDB struct {

View File

@ -33,6 +33,9 @@ func (m *mockHandleChatLLM) DisambiguateBestMatch(ctx context.Context, msg strin
func (m *mockHandleChatLLM) GetEmbeddings(ctx context.Context, input string) ([]float64, error) {
return m.embeddings, m.embeddingErr
}
func (m *mockHandleChatLLM) TranslateToEnglish(ctx context.Context, msg string) (string, error) {
return msg, nil
}
// mapChatRepo is an in-memory implementation of ChatRepositoryAPI for tests.
type mapChatRepo struct {

View File

@ -47,6 +47,10 @@ func (m *MockLLMClient) GetEmbeddings(ctx context.Context, input string) ([]floa
return []float64{0.1, 0.2, 0.3}, nil
}
func (m *MockLLMClient) TranslateToEnglish(ctx context.Context, message string) (string, error) {
return message, nil
}
func TestNewLLMClientFromEnv(t *testing.T) {
tests := []struct {
name string