fix: add ReasoningContent field to openai GenerateContent functio… (#1324)

fix: add `ReasoningContent` field to openai `GenerateContent` function choice response
This commit is contained in:
topjohncian
2025-08-18 21:53:19 +08:00
committed by GitHub
parent 168c3e58d1
commit 2a139b1e0d
+3 -2
View File
@@ -162,8 +162,9 @@ func (o *LLM) GenerateContent(ctx context.Context, messages []llms.MessageConten
choices := make([]*llms.ContentChoice, len(result.Choices))
for i, c := range result.Choices {
choices[i] = &llms.ContentChoice{
Content: c.Message.Content,
StopReason: fmt.Sprint(c.FinishReason),
Content: c.Message.Content,
ReasoningContent: c.Message.ReasoningContent,
StopReason: fmt.Sprint(c.FinishReason),
GenerationInfo: map[string]any{
"CompletionTokens": result.Usage.CompletionTokens,
"PromptTokens": result.Usage.PromptTokens,