deepset-ai / haystack

:mag: AI orchestration framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data. With advanced retrieval methods, it's best suited for building RAG, question answering, semantic search or conversational agent chatbots.
https://haystack.deepset.ai
Apache License 2.0
16.94k stars 1.85k forks source link

Deprecate `to_openai_format` and provid specific implementations in Chat Generators #8144

Closed anakin87 closed 1 month ago

anakin87 commented 1 month ago

Currently, the to_openai_format is a utility method of ChatMessage: it takes the message and converts it to an OpenAI-compatible dict.

Working on #7674, we noticed that this method should be present in every chat generator, so that each of them can have its specific implementation, without affecting the others.

### Tasks
- [x] haystack repo
- [x] core integrations