mirror of
https://github.com/coaidev/coai.git
synced 2025-05-31 19:00:22 +09:00
grammer fixed
This commit is contained in:
parent
3136a9fd7c
commit
86cae7a46d
@ -131,14 +131,17 @@ func (c *ChatInstance) GetChatBody(props *adaptercommon.ChatProps, stream bool)
|
|||||||
var systemStr string
|
var systemStr string
|
||||||
for _, message := range messages {
|
for _, message := range messages {
|
||||||
if message.Role == globals.System {
|
if message.Role == globals.System {
|
||||||
systemStr += message.Content
|
content, ok := message.Content.(string)
|
||||||
|
if ok {
|
||||||
|
systemStr += content
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return &ChatBody{
|
return &ChatBody{
|
||||||
Messages: messages,
|
Messages: messages,
|
||||||
MaxTokens: c.GetTokens(props),
|
MaxTokens: c.GetTokens(props),
|
||||||
Model: props.Model,
|
Model: props.Model,
|
||||||
System: systemStr
|
System: systemStr,
|
||||||
Stream: stream,
|
Stream: stream,
|
||||||
Temperature: props.Temperature,
|
Temperature: props.Temperature,
|
||||||
TopP: props.TopP,
|
TopP: props.TopP,
|
||||||
|
Loading…
Reference in New Issue
Block a user