Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
aiyuechuang committed Jun 20, 2022
1 parent 9db67a0 commit ed384e6
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 9 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
API_KEY="6537ea28dbad4927be5601377c84d675"
API_KEY="27f4569b10c84a73aadb819b3b3598b0"
44 changes: 41 additions & 3 deletions TuringRobots.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Metadata-Version: 2.1
Name: TuringRobots
Version: 1.2.5
Version: 1.2.6
Summary: Simple dialogue test Turing robot.
Home-page: https://github.com/AndersonHJB/TuringRobots
Author: Bornforthis
Author-email: bornforthis@bornforthis.cn
License: MIT
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Expand All @@ -19,9 +20,31 @@ License-File: LICENSE

# TuringRobots

## What?

Simple dialogue test Turing robot.

## 异常返回码
## Install

```cmd
pip install TuringRobots
```

## Usage/Example

```python
from TuringRobots import TuringRobots

while True:
userinput = input(":>>>")
if userinput == "0":
break
else:
code, content = TuringRobots(userinput, over_print=False)
print("回答:", content)
```

## Exception return code

| 5000 | 无解析结果 |
| ---- | ------------------------- |
Expand All @@ -43,4 +66,19 @@ Simple dialogue test Turing robot.
| 8008 | 服务器错误 |
| 0 | 上传成功 |

![image-20220618124630403](README.assets/image-20220618124630403.png)
## ChangeLog

- Put forward the idea of「提出想法」:June 18, 2022「2022年06月18日」
- Starting date「首发日期」:June 20, 2022「2022年06月20日」

## Error

失效请提交 issue。

> Invalid please submit issue.

> AI悦创·推出辅导班啦,包括「Python 语言辅导班、C++ 辅导班、java 辅导班、算法/数据结构辅导班、少儿编程、pygame 游戏开发」,全部都是一对一教学:一对一辅导 + 一对一答疑 + 布置作业 + 项目实践等。当然,还有线下线上摄影课程、Photoshop、Premiere 一对一教学、QQ、微信在线,随时响应!微信:Jiabcdefh
>
> C++ 信息奥赛题解,长期更新!长期招收一对一中小学信息奥赛集训,莆田、厦门地区有机会线下上门,其他地区线上。微信:Jiabcdefh


7 changes: 5 additions & 2 deletions TuringRobots/TuringRobots.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
import json
import urllib.request
import os
from dotenv import load_dotenv


def TuringRobots(text, over_print=True):
"""
:param text:
:param over_print:
:return:
"""
# load_dotenv()
load_dotenv()
api_url = "http://openapi.tuling123.com/openapi/api/v2"
req = {
"reqType": 0,
Expand All @@ -36,7 +38,8 @@ def TuringRobots(text, over_print=True):
},
"userInfo":
{
"apiKey": "27f4569b10c84a73aadb819b3b3598b0",
# "apiKey": "27f4569b10c84a73aadb819b3b3598b0",
"apiKey": os.getenv("API_KEY"),
"userId": "OnlyUseAlphabet"
}
}
Expand Down
2 changes: 1 addition & 1 deletion TuringRobots/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# 88YbdP88 8P 88""" dP__Yb Yb 88"Yb dP__Yb Yb "88 88""
# 88 YY 88 dP 88 dP""""Yb YboodP 88 Yb dP""""Yb YboodP 888888

VERSION = (1, 2, 5)
VERSION = (1, 2, 6)

__version__ = '.'.join(map(str, VERSION))
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
EMAIL = 'bornforthis@bornforthis.cn'
AUTHOR = 'Bornforthis'
REQUIRES_PYTHON = '>=3.6.0'
VERSION = '1.2.5'
VERSION = '1.2.6'

# What packages are required for this module to be executed?
REQUIRED = [
# 'dotenv==0.0.5',
'dotenv==0.0.5',
]

# What packages are optional?
Expand Down

0 comments on commit ed384e6

Please sign in to comment.