-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add improved support for chat history message insertion + documentation #264
Comments
Updating this feature request to be separate from tool call message param since the tool stuff is clear cut and the other stuff needs a little more thought. Will be tracking the tool stuff in #294 |
One thought I just had for this would be to add a new Mirascope We can have the generator return a tuple of values and then add those values to the generator object for easy access. For example, consider a generator that returns This would provide some much needed convenience around reinserting messages, which is particularly annoying when streaming. We can provide simlar convenience for normal calls as well e.g. Naming needs some thought, but I think the idea is there. |
Worth noting that we should also ensure that mypy and other type checkers don't get update with these chat history and MESSAGES flows. |
Plan of attack after further thinking discussion:
|
I've removed the |
@jbbakst I'm feeling less sold on this having implemented the |
Update: everything here is implemented and merged in. Only missing piece is docs, which I will add as part of the 0.17 release. |
Description
Right now users need to manually create the tools even though all of the information is generally already present in the tool. A method like
tool.message_param
would make this far more convenient (similar to how we can already toresponse.message.model_dump()
for the assistant message.We may also want to provide additional convenience, something like
response.user_message_param
, for inserting the user message back in. This one likely needs a little more thought than the tool call message feature.The text was updated successfully, but these errors were encountered: