Skip to content

Commit

Permalink
ollama[patch]: Include raw messages from API response in response met…
Browse files Browse the repository at this point in the history
…adata
  • Loading branch information
bracesproul committed Aug 5, 2024
1 parent 969d4f6 commit d26262a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libs/langchain-ollama/src/chat_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,10 @@ export class ChatOllama
yield new ChatGenerationChunk({
text: responseMessage.content,
message: convertOllamaMessagesToLangChain(responseMessage, {
responseMetadata: rest,
responseMetadata: {
...rest,
message: responseMessage,
},
usageMetadata,
}),
});
Expand Down

0 comments on commit d26262a

Please sign in to comment.