fix: add getModel to SAP AI Core provider for correct SDK initialization (#5086)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
This commit is contained in:
parent
095a1ab041
commit
bef4fdfc4b
1 changed files with 4 additions and 1 deletions
|
|
@ -279,7 +279,7 @@ export namespace Provider {
|
||||||
project,
|
project,
|
||||||
location,
|
location,
|
||||||
},
|
},
|
||||||
async getModel(sdk, modelID) {
|
async getModel(sdk: any, modelID) {
|
||||||
const id = String(modelID).trim()
|
const id = String(modelID).trim()
|
||||||
return sdk.languageModel(id)
|
return sdk.languageModel(id)
|
||||||
},
|
},
|
||||||
|
|
@ -294,6 +294,9 @@ export namespace Provider {
|
||||||
return {
|
return {
|
||||||
autoload: !!serviceKey,
|
autoload: !!serviceKey,
|
||||||
options: serviceKey ? { serviceKey, deploymentId, resourceGroup } : {},
|
options: serviceKey ? { serviceKey, deploymentId, resourceGroup } : {},
|
||||||
|
async getModel(sdk: any, modelID: string) {
|
||||||
|
return sdk(modelID)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
zenmux: async () => {
|
zenmux: async () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue