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

[BUG] Cohere: invalid request: list of documents must not be empty #770

Closed
langchain4j opened this issue Mar 16, 2024 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@langchain4j
Copy link
Owner

java.lang.RuntimeException: status code: 400; body: {"message":"invalid request: list of documents must not be empty"}
at dev.langchain4j.model.cohere.CohereClient.toException(CohereClient.java:71) ~[langchain4j-cohere-0.28.0.jar:na]
at dev.langchain4j.model.cohere.CohereClient.rerank(CohereClient.java:60) ~[langchain4j-cohere-0.28.0.jar:na]
at dev.langchain4j.model.cohere.CohereScoringModel.lambda$scoreAll$0(CohereScoringModel.java:67) ~[langchain4j-cohere-0.28.0.jar:na]
at dev.langchain4j.internal.RetryUtils$RetryPolicy.withRetry(RetryUtils.java:192) ~[langchain4j-core-0.28.0.jar:na]
at dev.langchain4j.internal.RetryUtils.withRetry(RetryUtils.java:229) ~[langchain4j-core-0.28.0.jar:na]
at dev.langchain4j.model.cohere.CohereScoringModel.scoreAll(CohereScoringModel.java:67) ~[langchain4j-cohere-0.28.0.jar:na]
at dev.langchain4j.rag.content.aggregator.ReRankingContentAggregator.reRankAndFilter(ReRankingContentAggregator.java:110) ~[langchain4j-core-0.28.0.jar:na]
at dev.langchain4j.rag.content.aggregator.ReRankingContentAggregator.aggregate(ReRankingContentAggregator.java:88) ~[langchain4j-core-0.28.0.jar:na]
at dev.langchain4j.rag.DefaultRetrievalAugmentor.augment(DefaultRetrievalAugmentor.java:146) ~[langchain4j-core-0.28.0.jar:na]
at dev.langchain4j.service.DefaultAiServices$1.invoke(DefaultAiServices.java:100) ~[langchain4j-0.28.0.jar:na]
at jdk.proxy2/jdk.proxy2.$Proxy172.answer(Unknown Source) ~[na:na]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant