You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From running the test in the repository, the following output is:
FAIL src/embeddings/tests/togetherai.int.test.ts (96.398 s)
✕ Test TogetherAIEmbeddings.embedQuery (96208 ms)
○ skipped Test TogetherAIEmbeddings.embedDocuments
● Test TogetherAIEmbeddings.embedQuery
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
90 | }
91 | else {
> 92 | throw new Error(error);
| ^
93 | }
94 | }), {
95 | onFailedAttempt: this.onFailedAttempt,
at ../../langchain-core/dist/utils/async_caller.js:92:23
at RetryOperation._fn (../../node_modules/p-retry/index.js:50:12)
Description
A timeout happens when the code retries the request to the async caller. This probably happens since the embeddings API URL is deprecated: https://api.together.xyz/api/v1/embeddings
Regarding the issue you're facing, it seems that the TogetherAIEmbeddings class is using a deprecated API URL. The current implementation uses the URL "https://api.together.xyz/api/v1/embeddings"[2]. You mentioned that the correct URL should be "https://api.together.xyz/v1/embeddings". Updating the API URL in the TogetherAIEmbeddings class to the new URL should resolve the issue.
Make sure to update the embeddingsAPIUrl property in the TogetherAIEmbeddings class to the new URL and test if the issue persists.
Checked other resources
Example Code
The following code from
togetherai.int.test.ts
breaks:Error Message and Stack Trace (if applicable)
From running the test in the repository, the following output is:
Description
A timeout happens when the code retries the request to the async caller. This probably happens since the embeddings API URL is deprecated:
https://api.together.xyz/api/v1/embeddings
The following replacement needs to be made:
https://api.together.xyz/v1/embeddings
System Info
The text was updated successfully, but these errors were encountered: