Abraxas-365 / langchain-rust

🦜️🔗LangChain for Rust, the easiest way to write LLM-based programs in Rust
MIT License
491 stars 63 forks source link

feat: PromptValue support add message #161

Closed eng-cc closed 2 months ago

eng-cc commented 3 months ago

Add add_message method for PromptValue.

Abraxas-365 commented 3 months ago

Can you explain the use case for this, please? :)

eng-cc commented 3 months ago

Can you explain the use case for this, please? :)

I'm building an AI agent application and I'm not using the full langchain process, just using PromptValue as a base dependency. There was a scenario where messages needed to be assembled dynamically, so I added this method. If you feel that this method has no practical use in the current repository, I can close this PR.