sohojoe commited on
Commit
4790a1d
1 Parent(s): 28b5e08

removed AgentStateActor as it was not used

Browse files
agent_state_actor.py DELETED
@@ -1,34 +0,0 @@
1
- from datetime import datetime
2
- import ray
3
- from copy import deepcopy
4
-
5
- class AgentState:
6
- def __init__(self):
7
- self.timestamp = datetime.utcnow()
8
- self.input_stt_preview = ''
9
- self.prompts = []
10
- self.video_input = None
11
-
12
- @ray.remote
13
- class AgentStateActor:
14
- def __init__(self):
15
- self.begin_step()
16
-
17
- def begin_step(self):
18
- self.state = AgentState()
19
- # self.state = deepcopy(self.state)
20
- # self.state.timestamp = datetime.utcnow()
21
-
22
- def set_input_stt_preview(self, input_stt_preview):
23
- self.state.input_stt_preview = input_stt_preview
24
-
25
- def add_input_stt_prompt(self, prompt):
26
- self.state.prompts.append(prompt)
27
-
28
- def add_video_input(self, video_input):
29
- self.state.video_input = video_input
30
-
31
- def get_state(self):
32
- return self.state
33
-
34
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
charles_actor.py CHANGED
@@ -5,7 +5,6 @@ import asyncio
5
  import os
6
  from clip_transform import CLIPTransform
7
  from environment_state_actor import EnvironmentStateActor, EnvironmentState
8
- from agent_state_actor import AgentStateActor
9
  import asyncio
10
  import subprocess
11
 
@@ -39,7 +38,6 @@ class CharlesActor:
39
  self._state = "001 - creating RespondToPromptActor"
40
  from respond_to_prompt_actor import RespondToPromptActor
41
  self._environment_state_actor = EnvironmentStateActor.remote()
42
- self._agent_state_actor = AgentStateActor.remote()
43
  self._respond_to_prompt_actor = RespondToPromptActor.remote(self._environment_state_actor, self._audio_output_queue)
44
 
45
  print("002 - create SpeechToTextVoskActor")
@@ -112,7 +110,6 @@ class CharlesActor:
112
 
113
  env_state = await self._environment_state_actor.begin_next_step.remote()
114
  self._environment_state = env_state
115
- self._agent_state_actor.begin_step.remote()
116
  audio_frames = await self._app_interface_actor.dequeue_audio_input_frames_async.remote()
117
  video_frames = await self._app_interface_actor.dequeue_video_input_frames_async.remote()
118
 
 
5
  import os
6
  from clip_transform import CLIPTransform
7
  from environment_state_actor import EnvironmentStateActor, EnvironmentState
 
8
  import asyncio
9
  import subprocess
10
 
 
38
  self._state = "001 - creating RespondToPromptActor"
39
  from respond_to_prompt_actor import RespondToPromptActor
40
  self._environment_state_actor = EnvironmentStateActor.remote()
 
41
  self._respond_to_prompt_actor = RespondToPromptActor.remote(self._environment_state_actor, self._audio_output_queue)
42
 
43
  print("002 - create SpeechToTextVoskActor")
 
110
 
111
  env_state = await self._environment_state_actor.begin_next_step.remote()
112
  self._environment_state = env_state
 
113
  audio_frames = await self._app_interface_actor.dequeue_audio_input_frames_async.remote()
114
  video_frames = await self._app_interface_actor.dequeue_video_input_frames_async.remote()
115
 
environment_state_actor.py CHANGED
@@ -1,12 +1,8 @@
1
  import ray
2
  from datetime import datetime
3
 
4
- from agent_state_actor import AgentState
5
-
6
  class EnvironmentState:
7
  def __init__(self, episode, step):
8
-
9
- self.agent_state = None
10
  self.timestamp = datetime.utcnow()
11
  self.episode = episode
12
  self.step = step
@@ -53,8 +49,5 @@ class EnvironmentStateActor:
53
  def add_tts_raw_chunk_id(self, chunk_id):
54
  self.state.tts_raw_chunk_ids.append(chunk_id)
55
 
56
- def add_agent_state(self, agent_state:AgentState):
57
- self.state.agent_state = agent_state
58
-
59
  def get_state(self)->EnvironmentState:
60
  return self.state
 
1
  import ray
2
  from datetime import datetime
3
 
 
 
4
  class EnvironmentState:
5
  def __init__(self, episode, step):
 
 
6
  self.timestamp = datetime.utcnow()
7
  self.episode = episode
8
  self.step = step
 
49
  def add_tts_raw_chunk_id(self, chunk_id):
50
  self.state.tts_raw_chunk_ids.append(chunk_id)
51
 
 
 
 
52
  def get_state(self)->EnvironmentState:
53
  return self.state
respond_to_prompt_actor.py CHANGED
@@ -9,8 +9,6 @@ import asyncio
9
  from ffmpeg_converter_actor import FFMpegConverterActor
10
  from agent_response import AgentResponse
11
  from environment_state_actor import EnvironmentStateActor
12
- from agent_state_actor import AgentStateActor
13
- from agent_state_actor import AgentState
14
  import json
15
 
16
  @ray.remote
 
9
  from ffmpeg_converter_actor import FFMpegConverterActor
10
  from agent_response import AgentResponse
11
  from environment_state_actor import EnvironmentStateActor
 
 
12
  import json
13
 
14
  @ray.remote