mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +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": {
|
||||
"name": "librechat-data-provider",
|
||||
"version": "0.7.88",
|
||||
"version": "0.7.89",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"axios": "^1.8.2",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "librechat-data-provider",
|
||||
"version": "0.7.88",
|
||||
"version": "0.7.89",
|
||||
"description": "data services for librechat apps",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.es.js",
|
||||
|
|
|
|||
|
|
@ -13,16 +13,17 @@ export default function createPayload(submission: t.TSubmission) {
|
|||
ephemeralAgent,
|
||||
} = submission;
|
||||
const { conversationId } = s.tConvoUpdateSchema.parse(conversation);
|
||||
const { endpoint: _e } = endpointOption as {
|
||||
const { endpoint: _e, endpointType } = endpointOption as {
|
||||
endpoint: s.EModelEndpoint;
|
||||
endpointType?: s.EModelEndpoint;
|
||||
};
|
||||
|
||||
const endpoint = _e as s.EModelEndpoint;
|
||||
let server = `${EndpointURLs[s.EModelEndpoint.agents]}/${endpoint}`;
|
||||
|
||||
if (isEdited && s.isAssistantsEndpoint(endpoint)) {
|
||||
server += '/modify';
|
||||
if (s.isAssistantsEndpoint(endpoint)) {
|
||||
server =
|
||||
EndpointURLs[(endpointType ?? endpoint) as 'assistants' | 'azureAssistants'] +
|
||||
(isEdited ? '/modify' : '');
|
||||
}
|
||||
|
||||
const payload: t.TPayload = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue