Skip to content
Snippets Groups Projects
Unverified Commit 402152f9 authored by yisding's avatar yisding Committed by GitHub
Browse files

Merge pull request #70 from swk777/larry/session

Fix OpenAIEmbedding Fails to Retrieve Session from Parameters When No…
parents a43d76d4 978ef781
No related branches found
No related tags found
No related merge requests found
......@@ -259,11 +259,13 @@ export class OpenAIEmbedding extends BaseEmbedding {
});
} else {
this.apiKey = init?.apiKey ?? undefined;
this.session = getOpenAISession({
apiKey: this.apiKey,
maxRetries: this.maxRetries,
timeout: this.timeout,
});
this.session =
init?.session ??
getOpenAISession({
apiKey: this.apiKey,
maxRetries: this.maxRetries,
timeout: this.timeout,
});
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment