Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #935: DefaultAiService compatibility for TokenUsage result is null #942

Closed
wants to merge 2 commits into from

Conversation

Kugaaa
Copy link
Contributor

@Kugaaa Kugaaa commented Apr 16, 2024

Context

See #935
LocalAiChatModel.generate the response of generate returned that tokenUsage is null

Change

  • LocalAiChatModel tried to return TokenUsage result
  • TokenUsage.add return if origin token usage is null, ensure AiService proxy successfully executed

Checklist

Before submitting this PR, please check the following points:

  • I have added unit and integration tests for my change
  • All unit and integration tests in the module I have added/changed are green
  • All unit and integration tests in the core and main modules are green
  • I have added/updated the documentation
  • I have added an example in the examples repo (only for "big" features)
  • I have added my new module in the BOM (only when a new module is added)

Checklist for adding new embedding store integration

  • I have added a {NameOfIntegration}EmbeddingStoreIT that extends from either EmbeddingStoreIT or EmbeddingStoreWithFilteringIT

@langchain4j langchain4j added the P3 Medium priority label Apr 23, 2024
@langchain4j
Copy link
Owner

@Kugaaa thank you, but this has been fixed already by another PR: #939

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Medium priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants