5
5
from dotenv import dotenv_values
6
6
7
7
8
- class SkillsList :
8
+ class IntentsList :
9
9
def __init__ (self ):
10
10
"""
11
11
The api of Gaud Open Platform is used here.
12
+
12
13
https://lbs.amap.com/api/webservice/guide/api/weatherinfo
13
14
"""
14
15
self .weather_api_url = "https://restapi.amap.com/v3/weather/weatherInfo"
@@ -103,6 +104,7 @@ def call_gpt(user_input):
103
104
functions = function ,
104
105
function_call = "auto" ,
105
106
)
107
+
106
108
return completion .choices [0 ].message
107
109
108
110
@@ -112,9 +114,9 @@ def call_gpt(user_input):
112
114
env = dotenv_values ()
113
115
openai .api_key = env ['OPENAI_API_KEY' ]
114
116
115
- skills_list_obj = SkillsList ()
117
+ intents_list_obj = IntentsList ()
116
118
117
- prompt = st .text_input ("Enter your command :" )
119
+ prompt = st .text_input ("Enter your prompt :" )
118
120
119
121
if prompt :
120
122
reply_content = call_gpt (prompt )
@@ -125,5 +127,5 @@ def call_gpt(user_input):
125
127
126
128
method_args_dict = json .loads (method_args )
127
129
128
- method = getattr (skills_list_obj , method_name )
130
+ method = getattr (intents_list_obj , method_name )
129
131
method (** method_args_dict )
0 commit comments