mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[PR #1137] [CLOSED] Refactor the chat interface to support tool calling and parameter pro… #1569
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#1569
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/ktransformers/pull/1137
Author: @344303947
Created: 4/14/2025
Status: ❌ Closed
Base:
main← Head:features/add-function-calling📝 Commits (1)
8699109Refactor the chat interface to support tool calling and parameter processing📊 Changes
6 files changed (+574 additions, -99 deletions)
View changed files
📝
ktransformers/server/api/openai/endpoints/chat.py(+392 -65)📝
ktransformers/server/backend/interfaces/balance_serve.py(+19 -9)📝
ktransformers/server/backend/interfaces/ktransformers.py(+3 -2)📝
ktransformers/server/backend/interfaces/transformers.py(+115 -10)📝
ktransformers/server/config/config.py(+1 -1)📝
ktransformers/server/schemas/endpoints/chat.py(+44 -12)📄 Description
…cessing
Defined new data structures in chat.py to replace OpenAI's original implementation, adding support for tool calling.
Implemented logic for extracting and processing tool calls, enabling dynamic function invocation during conversations.
Added methods in balance_serve.py to retrieve sampling parameters, handling default values and edge cases.
Updated ktransformers.py and transformers.py to support the passing of tool parameters.
Modified the default value of top_p in config.py to 1.0 to increase generation diversity.
Extended the message model in chat.py to support the transmission of tool call information.
These changes enhance the system's flexibility and functionality, enabling more complex interaction patterns.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.