File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 4
4
USER_ACCOUNT_KEY = "AICHAT_APP_USER_ACCOUNT_KEY"
5
5
GPT_3_Tokens = 1000000 # bonus tokens upon installation
6
6
GPT_4_Turbo_Tokens = 10000
7
+ LEITHER_SERVER_CLIENT = hprose .HttpClient ("http://localhost:8080/webapi/" )
7
8
8
9
class LeitherAPI :
9
10
def __init__ (self ):
10
- self .client = hprose . HttpClient ( 'http://localhost:8004/webapi/' )
11
+ self .client = LEITHER_SERVER_CLIENT
11
12
print (self .client .GetVar ("" , "ver" ))
12
13
self .ppt = self .client .GetVarByContext ("" , "context_ppt" )
13
14
self .api = self .client .Login (self .ppt )
@@ -30,12 +31,10 @@ def get_sid(self):
30
31
31
32
def get_user_session (self , user_ip ):
32
33
# user's Leither mode ip not used for now.
33
- self .client = hprose .HttpClient ('http://localhost:8004/webapi/' )
34
34
print (self .client .GetVar ("" , "ver" ))
35
35
return self .client .GetVarByContext ("" , "context_ppt" )
36
36
37
37
def get_user_client (self , user_node_ip ):
38
- self .client = hprose .HttpClient ('http://localhost:8004/webapi/' )
39
38
print (self .client .GetVar ("" , "ver" ))
40
39
ppt = self .client .GetVarByContext ("" , "context_ppt" )
41
40
You can’t perform that action at this time.
0 commit comments