Skip to content

Commit

Permalink
chore: increase the timeout for mistral operations (due to concurrenc…
Browse files Browse the repository at this point in the history
…y it may be a bit slower)
  • Loading branch information
sneko committed Mar 20, 2024
1 parent 7c666e1 commit e7a8bf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions patches/@mistralai+mistralai+0.1.3.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/@mistralai/mistralai/src/client.js b/node_modules/@mistralai/mistralai/src/client.js
index 10def72..cb9c60c 100644
index 10def72..8bdcbcc 100644
--- a/node_modules/@mistralai/mistralai/src/client.js
+++ b/node_modules/@mistralai/mistralai/src/client.js
@@ -53,8 +53,8 @@ class MistralClient {
Expand All @@ -9,7 +9,7 @@ index 10def72..cb9c60c 100644
- maxRetries = 5,
- timeout = 120,
+ maxRetries = 1,
+ timeout = 30,
+ timeout = 60,
) {
this.endpoint = endpoint;
this.apiKey = apiKey;
Expand Down
4 changes: 2 additions & 2 deletions src/features/llm-langchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ CONTEXTE :
// Those specific settings cannot be set into the global instance directly
.bind({
// [IMPORTANT] `timeout` is not passed to the underlying Mistral client, so we had to patch the module directly with `patch-package`
timeout: secondsToMilliseconds(30), // It's unlikely the total call duration would take that much time, setting a limit to not block the process
timeout: secondsToMilliseconds(60), // It's unlikely the total call duration would take that much time, setting a limit to not block the process
callbacks: [
{
handleLLMEnd: (output, runId, parentRunId?, tags?) => {
Expand Down Expand Up @@ -789,7 +789,7 @@ CONTEXTE :
// Those specific settings cannot be set into the global instance directly
.bind({
// [IMPORTANT] `timeout` is not passed to the underlying Mistral client, so we had to patch the module directly with `patch-package`
timeout: secondsToMilliseconds(30), // It's unlikely the total call duration would take that much time, setting a limit to not block the process and warn the user soemtimes wrong is happening
timeout: secondsToMilliseconds(60), // It's unlikely the total call duration would take that much time, setting a limit to not block the process and warn the user soemtimes wrong is happening
configurable: {
verbose: false,
},
Expand Down

0 comments on commit e7a8bf5

Please sign in to comment.