File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 55from  dotenv  import  dotenv_values 
66
77
8- class  SkillsList :
8+ class  IntentsList :
99    def  __init__ (self ):
1010        """ 
1111        The api of Gaud Open Platform is used here. 
12+ 
1213        https://lbs.amap.com/api/webservice/guide/api/weatherinfo 
1314        """ 
1415        self .weather_api_url  =  "https://restapi.amap.com/v3/weather/weatherInfo" 
@@ -103,6 +104,7 @@ def call_gpt(user_input):
103104        functions = function ,
104105        function_call = "auto" ,
105106    )
107+ 
106108    return  completion .choices [0 ].message 
107109
108110
@@ -112,9 +114,9 @@ def call_gpt(user_input):
112114    env  =  dotenv_values ()
113115    openai .api_key  =  env ['OPENAI_API_KEY' ]
114116
115-     skills_list_obj  =  SkillsList ()
117+     intents_list_obj  =  IntentsList ()
116118
117-     prompt  =  st .text_input ("Enter your command :" )
119+     prompt  =  st .text_input ("Enter your prompt :" )
118120
119121    if  prompt :
120122        reply_content  =  call_gpt (prompt )
@@ -125,5 +127,5 @@ def call_gpt(user_input):
125127
126128        method_args_dict  =  json .loads (method_args )
127129
128-         method  =  getattr (skills_list_obj , method_name )
130+         method  =  getattr (intents_list_obj , method_name )
129131        method (** method_args_dict )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments