hjxdl 0.1.20__py3-none-any.whl → 0.1.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hdl/_version.py +2 -2
- hdl/utils/desc/func_desc.py +1 -1
- hdl/utils/desc/template.py +4 -4
- hdl/utils/weather/weather.py +1 -11
- {hjxdl-0.1.20.dist-info → hjxdl-0.1.22.dist-info}/METADATA +1 -1
- {hjxdl-0.1.20.dist-info → hjxdl-0.1.22.dist-info}/RECORD +8 -8
- {hjxdl-0.1.20.dist-info → hjxdl-0.1.22.dist-info}/WHEEL +1 -1
- {hjxdl-0.1.20.dist-info → hjxdl-0.1.22.dist-info}/top_level.txt +0 -0
hdl/_version.py
CHANGED
hdl/utils/desc/func_desc.py
CHANGED
hdl/utils/desc/template.py
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
FN_TEMPLATE = """
|
2
2
|
|
3
3
|
你是一个可以调用函数来执行任务的人工智能助手,根据用户最后的问题来决定是否调用函数
|
4
|
-
|
5
|
-
若要调用函数,需要使用包含两个字段的JSON对象进行响应,并且不应包含其他多余文字,避免出现格式化问题:
|
4
|
+
你的回答格式是固定的:若要调用函数,需要使用包含两个字段的JSON对象进行响应,并且不应包含其他多余文字,避免出现格式化问题:
|
6
5
|
|
7
6
|
"function_name":需要要调用的函数的名称。
|
8
|
-
"params"
|
7
|
+
"params":函数所需的参数,一般为字符串,注意字符串要在双引号 "" 之间。
|
9
8
|
|
10
9
|
若不需要调用函数,则返回如下字典,并且不应包含其他多余文字,避免出现格式化问题:
|
11
10
|
{
|
@@ -14,5 +13,6 @@ FN_TEMPLATE = """
|
|
14
13
|
|
15
14
|
### 函数:
|
16
15
|
以下是可用于与系统交互的函数列表,每个函数以 “##” 作为标记开始,每个参数会以 “#” 作为标记。
|
17
|
-
|
16
|
+
每个函数都有特定的参数和要求说明,确保仔细遵循每个功能的说明。根据最后用户的问题判断要执行的任务选择合适的一个函数。以JSON格式提供函数调用,其中参数的具体值从用户的提问中获取,并且不能带“<>”符号:
|
17
|
+
|
18
18
|
"""
|
hdl/utils/weather/weather.py
CHANGED
@@ -70,21 +70,11 @@ def get_weather(city):
|
|
70
70
|
weather_str += f"{city}识别为{city_name},若识别错误,请提供更为准确的城市名\n"
|
71
71
|
html = get_html(code_dic[city_name])
|
72
72
|
result = get_page_data(html)
|
73
|
-
weather_str += f"\n{city}的天气信息如下:\n\n"
|
73
|
+
weather_str += f"\n{city_name}({city})的天气信息如下:\n\n"
|
74
74
|
weather_str += result
|
75
75
|
return weather_str
|
76
76
|
|
77
77
|
|
78
|
-
def main(city):
|
79
|
-
code_dic = get_city_codes()
|
80
|
-
city = city
|
81
|
-
if city in code_dic:
|
82
|
-
html = get_html(code_dic[city])
|
83
|
-
get_page_data(html)
|
84
|
-
else:
|
85
|
-
print('你要查询的地方不存在')
|
86
|
-
|
87
|
-
|
88
78
|
def get_standard_cityname(
|
89
79
|
city,
|
90
80
|
emb_dir: str = os.getenv(
|
@@ -1,5 +1,5 @@
|
|
1
1
|
hdl/__init__.py,sha256=GffnD0jLJdhkd-vo989v40N90sQbofkayRBwxc6TVhQ,72
|
2
|
-
hdl/_version.py,sha256=
|
2
|
+
hdl/_version.py,sha256=xFteeX_yzCBXEqpEDvPy_PUzJWeIiimLKirs0H3ssUw,413
|
3
3
|
hdl/args/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
hdl/args/loss_args.py,sha256=s7YzSdd7IjD24rZvvOrxLLFqMZQb9YylxKeyelSdrTk,70
|
5
5
|
hdl/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -120,8 +120,8 @@ hdl/utils/chemical_tools/sdf.py,sha256=71PEqU0H885L6IeGHEa6n7ZLZThvMsZOVLuFG2wno
|
|
120
120
|
hdl/utils/database_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
121
121
|
hdl/utils/database_tools/connect.py,sha256=KUnVG-8raifEJ_N0b3c8LkTTIfn9NIyw8LX6qvpA3YU,723
|
122
122
|
hdl/utils/desc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
123
|
-
hdl/utils/desc/func_desc.py,sha256=
|
124
|
-
hdl/utils/desc/template.py,sha256=
|
123
|
+
hdl/utils/desc/func_desc.py,sha256=XIFKjemokulEU6C347vNCuelrrEXu7E4dEeD8tsC8sc,343
|
124
|
+
hdl/utils/desc/template.py,sha256=uKPGIgYFgSY4uBvfsbh5fZN7s39NdGQ2XSVH3pIpsuc,1088
|
125
125
|
hdl/utils/general/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
126
126
|
hdl/utils/general/glob.py,sha256=8-RCnt6L297wMIfn34ZAMCsGCZUjHG3MGglGZI1cX0g,491
|
127
127
|
hdl/utils/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -131,8 +131,8 @@ hdl/utils/llm/extract.py,sha256=2sK_WJzmYIc8iuWaM9DA6Nw3_6q1O4lJ5pKpcZo-bBA,6512
|
|
131
131
|
hdl/utils/schedulers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
132
132
|
hdl/utils/schedulers/norm_lr.py,sha256=bDwCmdEK-WkgxQMFBiMuchv8Mm7C0-GZJ6usm-PQk14,4461
|
133
133
|
hdl/utils/weather/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
134
|
-
hdl/utils/weather/weather.py,sha256=
|
135
|
-
hjxdl-0.1.
|
136
|
-
hjxdl-0.1.
|
137
|
-
hjxdl-0.1.
|
138
|
-
hjxdl-0.1.
|
134
|
+
hdl/utils/weather/weather.py,sha256=HzvDwuMJ67IAkzWX6SyQEdSwTJfvu_M3CqR2MTMzRKo,3149
|
135
|
+
hjxdl-0.1.22.dist-info/METADATA,sha256=K2WpiLtAFAR26XSo6LAD_r0DI1Tpy0nFbK08Pw1gWB4,627
|
136
|
+
hjxdl-0.1.22.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
|
137
|
+
hjxdl-0.1.22.dist-info/top_level.txt,sha256=-kxwTM5JPhylp06z3zAVO3w6_h7wtBfBo2zgM6YZoTk,4
|
138
|
+
hjxdl-0.1.22.dist-info/RECORD,,
|
File without changes
|