transitive-bullshit / agentic

AI agent stdlib that works with any LLM and TypeScript AI SDK.
https://agentic.so
MIT License
16.44k stars 2.14k forks source link

Support request-level getMessageById() and upsertMessage() opts #537

Closed alxmiron closed 4 months ago

alxmiron commented 1 year ago

Now custom getMessageById() and upsertMessage() can be provided only on constructor level, that makes impossible to set request-specific logic.

I propose to support those opts in sendMessage() call as well

transitive-bullshit commented 1 year ago

I'm not sure I understand the motivation around allowing these to be customized at the sendMessage level? Can you give more details about your use case?

Thanks!

alxmiron commented 1 year ago

@transitive-bullshit For instance, I store "enable chat history" flag in user preferences, so if it's false my upsertMessage() and getMessageById() should do nothing. But I cannot customize them on constructor level

transitive-bullshit commented 4 months ago

This project is undergoing a major revamp; closing out old PRs as part of the prep process.

The chatgpt package is pretty outdated at this point. I recommend that you use the openai package or the openai-fetch package.