Open dmvieira opened 3 months ago
I think we can easily add this data to meta dict of the ChatMessage, wdyt @dmvieira ? I doubt we'll make any changes to OpenAIGenerator as they are slowly becoming obsolete.
Great! I don't know if it's a pattern only for OpenAI, but adding requests headers for all generators perhaps make sense. What do you think?
Looking the code, headers will appear in every reply message and it's for the hole request. Idk if it's good...
Is your feature request related to a problem? Please describe. Now OpenAIGenerator and OpenAIChatGenerator only returns choices without the response HTTP headers with rate limit information.
Describe the solution you'd like Receive from OpenAIGenerator and OpenAIChatGenerator response headers or rate limit information.
Describe alternatives you've considered Using OpenAI lib without Haystack