Files
gooseek/backend/internal/learning/mock_llm_test.go
home ab48a0632b
Some checks failed
Build and Deploy GooSeek / build-backend (push) Failing after 1m4s
Build and Deploy GooSeek / build-webui (push) Failing after 1m2s
Build and Deploy GooSeek / deploy (push) Has been skipped
feat: CI/CD pipeline + Learning/Medicine/Travel services
- Add Gitea Actions workflow for automated build & deploy
- Add K8s manifests: webui, travel-svc, medicine-svc, sandbox-svc
- Update kustomization for localhost:5000 registry
- Add ingress for gooseek.ru and api.gooseek.ru
- Learning cabinet with onboarding, courses, sandbox integration
- Medicine service with symptom analysis and doctor matching
- Travel service with itinerary planning
- Server setup scripts (NVIDIA/CUDA, K3s, Gitea runner)

Made-with: Cursor
2026-03-02 20:25:44 +03:00

37 lines
848 B
Go

package learning
import (
"context"
"github.com/gooseek/backend/internal/llm"
)
type mockLLMClient struct {
generateFunc func(ctx context.Context, req llm.StreamRequest) (string, error)
streamFunc func(ctx context.Context, req llm.StreamRequest) (<-chan llm.StreamChunk, error)
}
func (m *mockLLMClient) StreamText(ctx context.Context, req llm.StreamRequest) (<-chan llm.StreamChunk, error) {
if m.streamFunc != nil {
return m.streamFunc(ctx, req)
}
ch := make(chan llm.StreamChunk)
close(ch)
return ch, nil
}
func (m *mockLLMClient) GenerateText(ctx context.Context, req llm.StreamRequest) (string, error) {
if m.generateFunc != nil {
return m.generateFunc(ctx, req)
}
return "", nil
}
func (m *mockLLMClient) GetProviderID() string {
return "mock"
}
func (m *mockLLMClient) GetModelKey() string {
return "mock-model"
}