Arcypojeb commited on
Commit
ddad303
1 Parent(s): da744c6

Update clientCharacter.py

Browse files
Files changed (1) hide show
  1. clientCharacter.py +8 -3
clientCharacter.py CHANGED
@@ -7,9 +7,14 @@ from PyCharacterAI import Client
7
 
8
  # Define the websocket client class
9
  class WebSocketClient2:
10
- def __init__(self, uri):
11
- # Initialize the uri attribute
12
- self.uri = uri
 
 
 
 
 
13
 
14
  # Define a function that will run the client in a separate thread
15
  def run(self):
 
7
 
8
  # Define the websocket client class
9
  class WebSocketClient2:
10
+ def __init__(self, clientPort):
11
+
12
+ self.uri = f'ws://localhost:{clientPort}'
13
+
14
+ if "tokenChar" not in st.session_state:
15
+ st.session_state.tokenChar = ""
16
+ if "character_ID" not in st.session_state:
17
+ st.session_state.character_ID = ""
18
 
19
  # Define a function that will run the client in a separate thread
20
  def run(self):