diff --git a/chat_service_integration_test.go b/chat_service_integration_test.go index a7c1e50..db19353 100644 --- a/chat_service_integration_test.go +++ b/chat_service_integration_test.go @@ -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 { diff --git a/handlechat_integration_test.go b/handlechat_integration_test.go index 82e9e95..54249f9 100644 --- a/handlechat_integration_test.go +++ b/handlechat_integration_test.go @@ -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 { diff --git a/llm_test.go b/llm_test.go index 83396d5..2a0eed2 100644 --- a/llm_test.go +++ b/llm_test.go @@ -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