This commit is contained in:
Lixeer
2026-02-15 06:55:20 +08:00
parent ecbe31599e
commit 7a9659971d
3 changed files with 49 additions and 60 deletions

View File

@@ -179,8 +179,6 @@ type ProviderConfig struct {
ConnectMode string `json:"connect_mode,omitempty" env:"PICOCLAW_PROVIDERS_{{.Name}}_CONNECT_MODE"` //only for Github Copilot, `stdio` or `grpc`
}
type GatewayConfig struct {
Host string `json:"host" env:"PICOCLAW_GATEWAY_HOST"`
Port int `json:"port" env:"PICOCLAW_GATEWAY_PORT"`

View File

@@ -7,7 +7,6 @@ import (
json "encoding/json"
copilot "github.com/github/copilot-sdk/go"
)
type GitHubCopilotProvider struct {
@@ -37,9 +36,7 @@ func NewGitHubCopilotProvider(uri string, connectMode string, model string) *Git
defer client.Stop()
session, _ = client.CreateSession(context.Background(), &copilot.SessionConfig{
Model: model,
Hooks: &copilot.SessionHooks{
},
Hooks: &copilot.SessionHooks{},
})
}
@@ -69,14 +66,10 @@ func (p *GitHubCopilotProvider) Chat(ctx context.Context, messages []Message, to
fullcontent, _ := json.Marshal(out)
content, _ := p.session.Send(ctx, copilot.MessageOptions{
Prompt: string(fullcontent),
})
return &LLMResponse{
FinishReason: "stop",
Content: content,
@@ -84,7 +77,6 @@ func (p *GitHubCopilotProvider) Chat(ctx context.Context, messages []Message, to
}
func (p *GitHubCopilotProvider) GetDefaultModel() string {
return "gpt-4.1"

View File

@@ -324,7 +324,6 @@ func CreateProvider(cfg *config.Config) (LLMProvider, error) {
}
}
// Fallback: detect provider from model name