Skip to content

Conversation

ilayaperumalg
Copy link
Member

  • Fix the chat model's call() to calculate the cumulative usage

    • Use an explicit internalCall to pass the previous chat response so that accumulation can be done
  • Fix the chat model's stream() to calculate the cumulative usage

    • Fix MistralAi API to include usgae in ChatCompletionChunk
    • Use internalStream() to accumulate the usage

Add/update tests

 - Fix the chat model's call() to calculate the cumulative usage
   - Use an explicit internalCall to pass the previous chat response so that accumulation can be done

 - Fix the chat model's stream() to calculate the cumulative usage
   - Fix MistralAi API to include usgae in ChatCompletionChunk
   - Use internalStream() to accumulate the usage

Add/update tests
@tzolov
Copy link
Contributor

tzolov commented Dec 17, 2024

Thanks @ilayaperumalg !

@tzolov
Copy link
Contributor

tzolov commented Dec 17, 2024

rebased and merged at 81dfd3b

@tzolov tzolov closed this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants