You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can see below that I'm fetching history from my DB and passing it into the model as instructed, however based on the response it doesn't seem to have seen that context at all
The messages array is not appending the messages, this is probably just due to issue 1
history: [{"role":"system","content":[{"text":"\nYou are friendly and conversational.\n\n"}]},{"role":"user","content":[{"text":"\nhello my
name is dan,\n\n"}]},{"role":"model","content":[{"text":"Hi"},{"text":" Dan, it's nice to meet you! How can I help you"},{"text":" today?\
n"}]}]
messages: [{"role":"system","content":[{"text":"\nYou are friendly and conversational.\n\n"}]},{"role":"user","content":[{"text":"\nwhat di
d I say my name is?,\n\n"}]},{"role":"model","content":[{"text":"As"},{"text":" an AI, I have no memory of past conversations. To know your
name"},{"text":", you'll need to tell me! What is your name?\n"},{"text":""}]}]
The doc comments on the messages array states that it appends the message generated, which I'm not seeing happening (probably due to message history not being accounted for).
/** * Appends the message generated by the selected candidate to the messages already * present in the generation request. The result of this method can be safely * serialized to JSON for persistence in a database. * @param index The candidate index to utilize during conversion, defaults to first candidate. * @returns A serializable list of messages compatible with `generate({history})`. */getmessages(): MessageData[];
To Reproduce
Setup a dotprompt prompt
Set up a message history store of some sort
Use the .stream() method and follow the example that I showed above
Expected behavior
I expect the "messages" array to be accounted for when calling the .stream() method on the prompt.
Runtime (please complete the following information):
MacOS Version 15.1
Genkit 0.9.7
** Node version
v20.18.1
The text was updated successfully, but these errors were encountered:
Describe the bug
Hey All, I created a thread in Discord already (https://discord.com/channels/1255578482214305893/1310805406188044379) but will recap here.
The doc comments on the messages array states that it appends the message generated, which I'm not seeing happening (probably due to message history not being accounted for).
To Reproduce
Expected behavior
I expect the "messages" array to be accounted for when calling the .stream() method on the prompt.
Runtime (please complete the following information):
** Node version
The text was updated successfully, but these errors were encountered: