AbanteAI / spice

accelerant
Apache License 2.0
4 stars 2 forks source link

Fix regression with Azure OpenAI content filtering metadata #103

Closed mentatai[bot] closed 3 months ago

mentatai[bot] commented 3 months ago

Resolved an issue where Azure OpenAI content filtering metadata was not being handled correctly due to recent refactoring. Added checks and processing for content_filter_results in WrappedAnthropicClient to ensure proper handling of content filtering metadata. This fix aligns with the previous solution implemented in mentat.

Closes #102

Thanks for using MentatBot. Give comments a :+1: or :-1: to help me improve!

laszlovandenhoek commented 3 months ago

Nice try, but this is not a fix. Wrong file, for starters :)

laszlovandenhoek commented 3 months ago

Just check if chunk.choices is empty in StreamingSpiceResponse.__anext__(self), and if it is, continue to the next chunk.