Skip to content

Commit

Permalink
Merge pull request #57 from cubenlp/rex
Browse files Browse the repository at this point in the history
fix bug of async & update debug_log
  • Loading branch information
RexWzh authored Oct 9, 2023
2 parents 17a7d22 + d677921 commit 6165f3f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest]
include:
- python-version: "3.8"
os: macos-latest
- python-version: "3.8"
os: windows-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
4 changes: 3 additions & 1 deletion 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__ = '2.3.0'
__version__ = '2.3.1'

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

## Please check your API key
if test_apikey:
Expand Down
2 changes: 1 addition & 1 deletion chattool/asynctool.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def chat_complete(ind, locker, chatlog, chkpoint, **options):
resp = Resp(json.loads(response))
if not resp.is_valid():
warnings.warn(f"Invalid response: {resp.error_message}")
return False
return 0, 0
## saving files
chatlog.append(resp.message)
chat = Chat(chatlog)
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.0'
VERSION = '2.3.1'

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

0 comments on commit 6165f3f

Please sign in to comment.