mirror of
https://github.com/vxcontrol/langchaingo.git
synced 2026-07-19 21:54:17 -04:00
fix: add ReasoningContent field to openai GenerateContent functio… (#1324)
fix: add `ReasoningContent` field to openai `GenerateContent` function choice response
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user