Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/chattool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = """Rex Wang"""
__email__ = '[email protected]'
__version__ = '4.1.0'
__version__ = '4.1.1'


from chattool.core import (
Expand Down
9 changes: 4 additions & 5 deletions src/chattool/core/chattype.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,7 @@ def pop(self, index: int = -1) -> Dict:
return self._chat_log.pop(index)

# === 核心对话功能 - 子类实现 ===
def get_response(
self,
update_history: bool = True,
**kwargs
) -> ChatResponse:
def get_response(self, update_history: bool = True, **kwargs) -> ChatResponse:
"""获取对话响应(同步)"""
response_data = self.chat_completion(
messages=self._chat_log,
Expand All @@ -296,6 +292,9 @@ def get_response(
self._chat_log.append(response.message)
return response

def getresponse(self, update_history: bool = True, **kwargs):
return self.get_response(update_history, **kwargs)

async def async_get_response(
self,
update_history: bool = True,
Expand Down