Alex J. Chan commited on
Commit
92af62b
·
2 Parent(s): ad2c5c0 19e573e

Merge pull request #8 from convergence-ai/alex/image_update

Browse files
Files changed (2) hide show
  1. README.md +3 -6
  2. src/proxy_lite/cli.py +7 -3
README.md CHANGED
@@ -24,9 +24,6 @@
24
  <a href="https://github.com/convergence-ai/proxy-lite/issues/">
25
  <img src="https://img.shields.io/github/issues/convergence-ai/proxy-lite" alt="open issues" />
26
  </a>
27
- <a href="https://github.com/convergence-ai/proxy-lite/blob/master/LICENSE">
28
- <img src="https://img.shields.io/github/license/convergence-ai/proxy-lite.svg" alt="license" />
29
- </a>
30
  </p>
31
 
32
  </div>
@@ -159,7 +156,7 @@ result = asyncio.run(
159
  The `Runner` sets the solver and environment off in a loop, like in a traditional reinforcement learning setup.
160
 
161
  <div align="center">
162
- <img src="assets/loop.png" alt="Runner Loop" width="700" height="auto" style="margin-bottom: 20px;" />
163
  </div>
164
 
165
 
@@ -186,9 +183,9 @@ message_history = [
186
  ```
187
  This would then build up the message history, alternating between the assistant (who takes the *action*) and the user (who provides the *observation*).
188
 
189
- > **Context-Window Management:** When making calls to the model, all the last observations other than the current one are discarded in order to reduce the large number of image tokens required. Since the model responses include reflection on the observations and are all included in the message history, the model is still aware of the entire history when planning new actions.
190
 
191
- The chat template will format this automatically. You should also pass the `Tools` that the model has access to, these will define the action space available to the model. You can do this with `transformers`:
192
 
193
  ```python
194
  from qwen_vl_utils import process_vision_info
 
24
  <a href="https://github.com/convergence-ai/proxy-lite/issues/">
25
  <img src="https://img.shields.io/github/issues/convergence-ai/proxy-lite" alt="open issues" />
26
  </a>
 
 
 
27
  </p>
28
 
29
  </div>
 
156
  The `Runner` sets the solver and environment off in a loop, like in a traditional reinforcement learning setup.
157
 
158
  <div align="center">
159
+ <img src="assets/loop.png" alt="Runner Loop" width="800" height="auto" style="margin-bottom: 20px;" />
160
  </div>
161
 
162
 
 
183
  ```
184
  This would then build up the message history, alternating between the assistant (who takes the *action*) and the user (who provides the *observation*).
185
 
186
+ > **Context-Window Management:** When making calls to the model, all the observations other than the current one are discarded in order to reduce the large number of image tokens required. Since the model responses include reflection on the observations and are all included in the message history, the model is still aware of the entire history when planning new actions.
187
 
188
+ You should also pass the `Tools` that the model has access to, these will define the action space available to the model. You can do this with `transformers`:
189
 
190
  ```python
191
  from qwen_vl_utils import process_vision_info
src/proxy_lite/cli.py CHANGED
@@ -15,6 +15,10 @@ def update_config_from_env(config: RunnerConfig) -> RunnerConfig:
15
  config.solver.client.api_base = os.getenv("PROXY_LITE_API_BASE")
16
  if os.getenv("PROXY_LITE_MODEL"):
17
  config.solver.client.model_id = os.getenv("PROXY_LITE_MODEL")
 
 
 
 
18
  return config
19
 
20
 
@@ -31,11 +35,11 @@ def do_command(args):
31
  if args.model:
32
  config.solver.client.model_id = args.model
33
  if args.homepage:
34
- config.homepage = args.homepage
35
  if args.viewport_width:
36
- config.viewport_width = args.viewport_width
37
  if args.viewport_height:
38
- config.viewport_height = args.viewport_height
39
  o = Runner(config=config)
40
  result = asyncio.run(o.run(do_text))
41
 
 
15
  config.solver.client.api_base = os.getenv("PROXY_LITE_API_BASE")
16
  if os.getenv("PROXY_LITE_MODEL"):
17
  config.solver.client.model_id = os.getenv("PROXY_LITE_MODEL")
18
+ if os.getenv("PROXY_LITE_VIEWPORT_WIDTH"):
19
+ config.environment.viewport_width = int(os.getenv("PROXY_LITE_VIEWPORT_WIDTH"))
20
+ if os.getenv("PROXY_LITE_VIEWPORT_HEIGHT"):
21
+ config.environment.viewport_height = int(os.getenv("PROXY_LITE_VIEWPORT_HEIGHT"))
22
  return config
23
 
24
 
 
35
  if args.model:
36
  config.solver.client.model_id = args.model
37
  if args.homepage:
38
+ config.environment.homepage = args.homepage
39
  if args.viewport_width:
40
+ config.environment.viewport_width = args.viewport_width
41
  if args.viewport_height:
42
+ config.environment.viewport_height = args.viewport_height
43
  o = Runner(config=config)
44
  result = asyncio.run(o.run(do_text))
45