make fmt
This commit is contained in:
@@ -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"`
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -324,7 +324,6 @@ func CreateProvider(cfg *config.Config) (LLMProvider, error) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Fallback: detect provider from model name
|
||||
|
||||
Reference in New Issue
Block a user