mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
feat: Nodejs sdk support auto rename conversation api (#2265)
This commit is contained in:
parent
cadc6b171e
commit
d76d1adb59
|
@ -27,8 +27,8 @@ export const routes = {
|
|||
url: () => `/conversations`,
|
||||
},
|
||||
renameConversation: {
|
||||
method: "PATCH",
|
||||
url: (conversation_id) => `/conversations/${conversation_id}`,
|
||||
method: "POST",
|
||||
url: (conversation_id) => `/conversations/${conversation_id}/name`,
|
||||
},
|
||||
deleteConversation: {
|
||||
method: "DELETE",
|
||||
|
@ -204,8 +204,8 @@ export class ChatClient extends DifyClient {
|
|||
);
|
||||
}
|
||||
|
||||
renameConversation(conversation_id, name, user) {
|
||||
const data = { name, user };
|
||||
renameConversation(conversation_id, name, user, auto_generate) {
|
||||
const data = { name, user, auto_generate };
|
||||
return this.sendRequest(
|
||||
routes.renameConversation.method,
|
||||
routes.renameConversation.url(conversation_id),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "dify-client",
|
||||
"version": "2.1.0",
|
||||
"version": "2.2.0",
|
||||
"description": "This is the Node.js SDK for the Dify.AI API, which allows you to easily integrate Dify.AI into your Node.js applications.",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
|
|
Loading…
Reference in New Issue
Block a user