Open jakedetels opened 9 months ago
Hey @jakedetels - thanks for the bug report & the kind words!
I've added an example for getting the full Mistral response: https://github.com/lgrammel/modelfusion/blob/main/examples/basic/src/model-provider/mistral/mistral-chat-generate-text-full-response-example.ts
Let know if this works for you.
For streamText I still need to add this. I plan to do so in the next few days, since it's a bit more complicated than in the basic case.
Hey there. Love the ModelFusion library. Thanks for creating it, Lars!
According to the docs, setting
fullResponse
totrue
in the options forgenerateText(model, messages, options)
is supposed to include the model's original response. In my case, I want to usestreamText()
instead ofgenerateText()
. I see in this example thatstreamText()
also supports thefullResponse
property. When setting that prop totrue
, I do observe an additionalmetadata
object is included, but thatmetadata
object doesn't appear to include the expected original response from the selected model provider (e.g., OpenAI or Mistral).In my case, I'm using Mistral and their docs indicate an expected response looks like this:
When I set
fullResponse
to true, I don't see any of the above expected response properties. Instead, ModelFusion returns a response with ametadata
object that looks like this:This seems like a bug, based on the wording of the docs which suggest one would get the original response (presumably from whichever LLM provider is selected).
Here's the ModelFusion docs I was referencing regarding
fullResponse
:Thanks in advance! I'm hoping we can get the original LLM provider's response.