-
Notifications
You must be signed in to change notification settings - Fork 15.9k
feat: Add SAP AI Core provider support #5023
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
Changes from all commits
f4b1a42
bc0d490
5752e9d
0900876
bceb238
08f18d9
6001775
30726d9
9c16691
5873c6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -285,6 +285,17 @@ export namespace Provider { | |
| }, | ||
| } | ||
| }, | ||
| "sap-ai-core": async () => { | ||
| const auth = await Auth.get("sap-ai-core") | ||
| const serviceKey = Env.get("SAP_AI_SERVICE_KEY") || (auth?.type === "api" ? auth.key : undefined) | ||
| const deploymentId = Env.get("SAP_AI_DEPLOYMENT_ID") || "d65d81e7c077e583" | ||
| const resourceGroup = Env.get("SAP_AI_RESOURCE_GROUP") || "default" | ||
|
|
||
|
Comment on lines
+288
to
+293
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does your provider not automatically respect these env vars?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, no, |
||
| return { | ||
| autoload: !!serviceKey, | ||
| options: serviceKey ? { serviceKey, deploymentId, resourceGroup } : {}, | ||
| } | ||
| }, | ||
| zenmux: async () => { | ||
| return { | ||
| autoload: false, | ||
|
|
@@ -776,7 +787,7 @@ export namespace Provider { | |
| const mod = await import(installedPath) | ||
|
|
||
| const fn = mod[Object.keys(mod).find((key) => key.startsWith("create"))!] | ||
| const loaded = fn({ | ||
| const loaded = await fn({ | ||
| name: model.providerID, | ||
| ...options, | ||
| }) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.