mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 09:20:15 +01:00
🐛 fix: Assistants Endpoint Handling in createPayload Function (#8123)
* 📦 chore: bump librechat-data-provider version to 0.7.89 * 🐛 fix: Assistants endpoint handling in createPayload function
This commit is contained in:
parent
dd67e463e4
commit
1060ae8040
3 changed files with 7 additions and 6 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -46717,7 +46717,7 @@
|
||||||
},
|
},
|
||||||
"packages/data-provider": {
|
"packages/data-provider": {
|
||||||
"name": "librechat-data-provider",
|
"name": "librechat-data-provider",
|
||||||
"version": "0.7.88",
|
"version": "0.7.89",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.8.2",
|
"axios": "^1.8.2",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "librechat-data-provider",
|
"name": "librechat-data-provider",
|
||||||
"version": "0.7.88",
|
"version": "0.7.89",
|
||||||
"description": "data services for librechat apps",
|
"description": "data services for librechat apps",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "dist/index.es.js",
|
"module": "dist/index.es.js",
|
||||||
|
|
|
||||||
|
|
@ -13,16 +13,17 @@ export default function createPayload(submission: t.TSubmission) {
|
||||||
ephemeralAgent,
|
ephemeralAgent,
|
||||||
} = submission;
|
} = submission;
|
||||||
const { conversationId } = s.tConvoUpdateSchema.parse(conversation);
|
const { conversationId } = s.tConvoUpdateSchema.parse(conversation);
|
||||||
const { endpoint: _e } = endpointOption as {
|
const { endpoint: _e, endpointType } = endpointOption as {
|
||||||
endpoint: s.EModelEndpoint;
|
endpoint: s.EModelEndpoint;
|
||||||
endpointType?: s.EModelEndpoint;
|
endpointType?: s.EModelEndpoint;
|
||||||
};
|
};
|
||||||
|
|
||||||
const endpoint = _e as s.EModelEndpoint;
|
const endpoint = _e as s.EModelEndpoint;
|
||||||
let server = `${EndpointURLs[s.EModelEndpoint.agents]}/${endpoint}`;
|
let server = `${EndpointURLs[s.EModelEndpoint.agents]}/${endpoint}`;
|
||||||
|
if (s.isAssistantsEndpoint(endpoint)) {
|
||||||
if (isEdited && s.isAssistantsEndpoint(endpoint)) {
|
server =
|
||||||
server += '/modify';
|
EndpointURLs[(endpointType ?? endpoint) as 'assistants' | 'azureAssistants'] +
|
||||||
|
(isEdited ? '/modify' : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
const payload: t.TPayload = {
|
const payload: t.TPayload = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue