• sean.su's avatar
    Refactor the chat interface to support tool calling and parameter processing · 86991091
    sean.su authored
    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.
    86991091
chat.py 2.64 KB