Skip to content

Commit

Permalink
Merge pull request #58 from cubenlp/rex
Browse files Browse the repository at this point in the history
fix debug log and print log
  • Loading branch information
RexWzh authored Oct 20, 2023
2 parents 6165f3f + 37c05b9 commit 6424933
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# ChatAPI Toolkit
[![PyPI version](https://img.shields.io/pypi/v/chattool.svg)](https://pypi.python.org/pypi/chattool)
[![Tests](https://github.com/cubenlp/chatapi_toolkit/actions/workflows/test.yml/badge.svg)](https://github.com/cubenlp/chatapi_toolkit/actions/workflows/test.yml/)
[![Documentation Status](https://img.shields.io/badge/docs-github_pages-blue.svg)](https://apicall.wzhecnu.cn)
[![Documentation Status](https://img.shields.io/badge/docs-github_pages-blue.svg)](https://chattool.cubenlp.com)
[![Coverage](https://codecov.io/gh/cubenlp/chatapi_toolkit/branch/master/graph/badge.svg)](https://codecov.io/gh/cubenlp/chatapi_toolkit)

<!--
Expand Down
4 changes: 2 additions & 2 deletions chattool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = """Rex Wang"""
__email__ = '1073853456@qq.com'
__version__ = '2.3.1'
__version__ = '2.3.2'

import os, sys, requests
from .chattool import Chat, Resp
Expand Down Expand Up @@ -90,7 +90,7 @@ def debug_log( net_url:str="https://www.baidu.com"
print("\nCheck your base url:")
show_base_url()
print("\nCheck the OpenAI Base url:")
print(os.environ.get("OPENAI_BASE_URL"))
print(os.environ.get("OPENAI_API_BASE"))

## Please check your API key
if test_apikey:
Expand Down
2 changes: 1 addition & 1 deletion chattool/chattool.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def display_role_content(dic:dict, sep:Union[str, None]=None):
if role == 'user' or role == 'system' or (role == 'assistant' and 'function_call' not in dic):
return f"{sep}{role}{sep}{dic['content']}"
elif role == 'function':
return f"{sep}{role}{sep}function:\n\t{dic['name']}\nparams:\n\t{content}"
return f"{sep}{role}{sep}function:\n\t{dic['name']}\nresult:\n\t{content}"
elif role == 'assistant':
return f"{sep}{role}{sep}calling function:\n\t{dic['function_call']}\ncontent:\n\t{content}"
else:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
with open('README.md') as readme_file:
readme = readme_file.read()

VERSION = '2.3.1'
VERSION = '2.3.2'

requirements = [
'Click>=7.0', 'requests>=2.20', "responses>=0.23",
Expand Down

0 comments on commit 6424933

Please sign in to comment.