Enhance Code Consistency Across Repository with .editorconfig (#19023)

This commit is contained in:
QuantumGhost
2025-04-29 18:04:33 +08:00
committed by GitHub
parent 226afd4550
commit bd1bbfee4b
274 changed files with 1271 additions and 1217 deletions

View File

@@ -45,4 +45,4 @@ package-lock.json
.yarnrc.yml
# pmpm
pnpm-lock.yaml
pnpm-lock.yaml

View File

@@ -26,7 +26,7 @@ export declare class DifyClient {
params?: Params,
stream?: boolean,
headerParams?: HeaderParams
): Promise<any>;
): Promise<any>;
messageFeedback(message_id: string, rating: number, user: User): Promise<any>;
@@ -64,9 +64,9 @@ export declare class ChatClient extends DifyClient {
getConversations(
user: User,
first_id?: string | null,
limit?: number | null,
user: User,
first_id?: string | null,
limit?: number | null,
pinned?: boolean | null
): Promise<any>;
@@ -80,7 +80,7 @@ export declare class ChatClient extends DifyClient {
renameConversation(conversation_id: string, name: string, user: User,auto_generate:boolean): Promise<any>;
deleteConversation(conversation_id: string, user: User): Promise<any>;
audioToText(data: FormData): Promise<any>;
}
@@ -88,4 +88,4 @@ export declare class WorkflowClient extends DifyClient {
run(inputs: any, user: User, stream?: boolean,): Promise<any>;
stop(task_id: string, user: User): Promise<any>;
}
}

View File

@@ -334,12 +334,12 @@ export class ChatClient extends DifyClient {
export class WorkflowClient extends DifyClient {
run(inputs,user,stream) {
const data = {
inputs,
const data = {
inputs,
response_mode: stream ? "streaming" : "blocking",
user
user
};
return this.sendRequest(
routes.runWorkflow.method,
routes.runWorkflow.url(),
@@ -357,4 +357,4 @@ export class WorkflowClient extends DifyClient {
data
);
}
}
}

View File

@@ -62,4 +62,4 @@ describe('Send Requests', () => {
errorMessage
)
})
})
})

View File

@@ -32,4 +32,4 @@
"babel-jest": "^29.5.0",
"jest": "^29.5.0"
}
}
}

View File

@@ -92,4 +92,4 @@ Replace 'your-api-key-here' with your actual Dify API key.
## License
This SDK is released under the MIT License.
This SDK is released under the MIT License.

View File

@@ -119,14 +119,14 @@ class ChatClient extends DifyClient {
return $this->send_request('POST', 'chat-messages', $data, null, $response_mode === 'streaming');
}
public function get_suggestions($message_id, $user) {
$params = [
'user' => $user
];
return $this->send_request('GET', "messages/{$message_id}/suggested", null, $params);
}
public function stop_message($task_id, $user) {
$data = ['user' => $user];
return $this->send_request('POST', "chat-messages/{$task_id}/stop", $data);
@@ -157,7 +157,7 @@ class ChatClient extends DifyClient {
return $this->send_request('GET', 'messages', null, $params);
}
public function rename_conversation($conversation_id, $name,$auto_generate, $user) {
$data = [
'name' => $name,
@@ -202,5 +202,5 @@ class WorkflowClient extends DifyClient{
];
return $this->send_request('POST', "workflows/tasks/{$task_id}/stop",$data);
}
}
}

View File

@@ -1 +1 @@
recursive-include dify_client *.py
recursive-include dify_client *.py

View File

@@ -6,4 +6,4 @@ rm -rf build dist *.egg-info
pip install setuptools wheel twine
python setup.py sdist bdist_wheel
twine upload dist/*
twine upload dist/*