@sap-ai-sdk/core
Advanced tools
Comparing version 0.0.1-20240823013012.0 to 0.0.1-20240824012959.0
@@ -1,2 +0,2 @@ | ||
import { Destination } from '@sap-cloud-sdk/connectivity'; | ||
import { HttpDestination } from '@sap-cloud-sdk/connectivity'; | ||
/** | ||
@@ -6,3 +6,3 @@ * Returns a destination object from AI Core service binding. | ||
*/ | ||
export declare function getAiCoreDestination(): Promise<Destination>; | ||
export declare function getAiCoreDestination(): Promise<HttpDestination>; | ||
//# sourceMappingURL=context.d.ts.map |
@@ -20,5 +20,5 @@ import { createLogger } from '@sap-cloud-sdk/util'; | ||
} | ||
const aiCoreDestination = await transformServiceBindingToDestination(aiCoreServiceBinding, { | ||
const aiCoreDestination = (await transformServiceBindingToDestination(aiCoreServiceBinding, { | ||
useCache: true | ||
}); | ||
})); | ||
return aiCoreDestination; | ||
@@ -25,0 +25,0 @@ } |
@@ -44,3 +44,3 @@ import { HttpRequestConfig, HttpResponse } from '@sap-cloud-sdk/http-client'; | ||
*/ | ||
export declare function executeRequest<Data extends BaseLlmParameters>(endpointOptions: EndpointOptions, data: Data, requestConfig?: CustomRequestConfig): Promise<HttpResponse>; | ||
export declare function executeRequest(endpointOptions: EndpointOptions, data: any, requestConfig?: CustomRequestConfig): Promise<HttpResponse>; | ||
//# sourceMappingURL=http-client.d.ts.map |
@@ -13,8 +13,6 @@ import { removeLeadingSlashes } from '@sap-cloud-sdk/util'; | ||
const aiCoreDestination = await getAiCoreDestination(); | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const { deploymentConfiguration, ...body } = data; | ||
const { url, apiVersion } = endpointOptions; | ||
const mergedRequestConfig = { | ||
...mergeWithDefaultRequestConfig(apiVersion, requestConfig), | ||
data: JSON.stringify(body) | ||
data: JSON.stringify(data) | ||
}; | ||
@@ -21,0 +19,0 @@ const targetUrl = aiCoreDestination.url + `/v2/${removeLeadingSlashes(url)}`; |
@@ -18,3 +18,3 @@ import { OpenApiRequestBuilder as CloudSDKOpenApiRequestBuilder } from '@sap-cloud-sdk/openapi'; | ||
// TODO: Remove explicit url! once we updated the type in the Cloud SDK, since url is always defined. | ||
return executeRequest({ url: url }, { deploymentConfiguration: {}, ...data }, { | ||
return executeRequest({ url: url }, data, { | ||
...rest | ||
@@ -21,0 +21,0 @@ }); |
{ | ||
"name": "@sap-ai-sdk/core", | ||
"version": "0.0.1-20240823013012.0", | ||
"version": "0.0.1-20240824012959.0", | ||
"description": "", | ||
@@ -17,3 +17,5 @@ "license": "Apache-2.0", | ||
"dist/**/*.d.ts", | ||
"dist/**/*.d.ts.map" | ||
"dist/**/*.d.ts.map", | ||
"internal.js", | ||
"internal.d.ts" | ||
], | ||
@@ -33,5 +35,5 @@ "dependencies": { | ||
"test": "NODE_OPTIONS=--experimental-vm-modules jest", | ||
"lint": "eslint . && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -c", | ||
"lint:fix": "eslint . --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error" | ||
"lint": "eslint \"**/*.ts\" && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -c", | ||
"lint:fix": "eslint \"**/*.ts\" --fix && prettier . --config ../../.prettierrc --ignore-path ../../.prettierignore -w --log-level error" | ||
} | ||
} |
@@ -16,4 +16,10 @@ # @sap-ai-sdk/core | ||
## Support, Feedback, Contribution | ||
This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/SAP/ai-sdk-js/issues). | ||
Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](https://github.com/SAP/ai-sdk-js/blob/main/CONTRIBUTING.md). | ||
## License | ||
The SAP AI SDK is released under the [Apache License Version 2.0.](http://www.apache.org/licenses/) | ||
The SAP Cloud SDK for AI is released under the [Apache License Version 2.0.](http://www.apache.org/licenses/) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
27698
25
222
25