mirror of
https://github.com/Direct-Dev-Ru/go-lcg.git
synced 2025-11-16 09:39:56 +00:00
Исправления в ветке main
This commit is contained in:
@@ -200,12 +200,26 @@ func (p *ProxyAPIProvider) Health() error {
|
||||
|
||||
// Chat для OllamaProvider
|
||||
func (o *OllamaProvider) Chat(messages []Chat) (string, error) {
|
||||
payload := Gpt3Request{
|
||||
|
||||
think := config.AppConfig.Think
|
||||
|
||||
var payload interface{}
|
||||
if think {
|
||||
payload = Gpt3Request{
|
||||
Model: o.Model,
|
||||
Messages: messages,
|
||||
Stream: false,
|
||||
Stream: false,
|
||||
Options: Gpt3Options{o.Temperature},
|
||||
}
|
||||
} else {
|
||||
payload = Gpt3ThinkRequest{
|
||||
Model: o.Model,
|
||||
Messages: messages,
|
||||
Stream: false,
|
||||
Think: false,
|
||||
Options: Gpt3Options{o.Temperature},
|
||||
}
|
||||
}
|
||||
|
||||
jsonData, err := json.Marshal(payload)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user