lyceum-cli 1.0.19__tar.gz → 1.0.20__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/PKG-INFO +1 -1
  2. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/external/compute/inference/chat.py +19 -39
  3. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum_cli.egg-info/PKG-INFO +1 -1
  4. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/setup.py +1 -1
  5. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/__init__.py +0 -0
  6. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/external/__init__.py +0 -0
  7. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/external/auth/__init__.py +0 -0
  8. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/external/auth/login.py +0 -0
  9. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/external/compute/__init__.py +0 -0
  10. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/external/compute/execution/__init__.py +0 -0
  11. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/external/compute/execution/python.py +0 -0
  12. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/external/compute/inference/__init__.py +0 -0
  13. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/external/compute/inference/batch.py +0 -0
  14. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/external/compute/inference/models.py +0 -0
  15. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/external/general/__init__.py +0 -0
  16. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/main.py +0 -0
  17. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/shared/__init__.py +0 -0
  18. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/shared/config.py +0 -0
  19. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/shared/display.py +0 -0
  20. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum/shared/streaming.py +0 -0
  21. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum_cli.egg-info/SOURCES.txt +0 -0
  22. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum_cli.egg-info/dependency_links.txt +0 -0
  23. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum_cli.egg-info/entry_points.txt +0 -0
  24. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum_cli.egg-info/requires.txt +0 -0
  25. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum_cli.egg-info/top_level.txt +0 -0
  26. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum_cloud_execution_api_client/__init__.py +0 -0
  27. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum_cloud_execution_api_client/api/__init__.py +0 -0
  28. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/lyceum_cloud_execution_api_client/models/__init__.py +0 -0
  29. {lyceum_cli-1.0.19 → lyceum_cli-1.0.20}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lyceum-cli
3
- Version: 1.0.19
3
+ Version: 1.0.20
4
4
  Summary: Command-line interface for Lyceum Cloud Execution API
5
5
  Home-page: https://lyceum.technology
6
6
  Author: Lyceum Team
@@ -167,58 +167,34 @@ def list_models():
167
167
 
168
168
  @chat_app.command("image")
169
169
  def analyze_image(
170
- image_source: str = typer.Argument(..., help="Image URL or path to base64 file"),
170
+ image_url: str = typer.Argument(..., help="URL of image to analyze"),
171
171
  prompt: str = typer.Option("What do you see in this image?", "--prompt", "-p", help="Question about the image"),
172
- model: str = typer.Option("paddleocr-vl", "--model", "-m", help="Vision model to use"),
173
- base64: bool = typer.Option(False, "--base64", "-b", help="Treat image_source as path to base64 file"),
172
+ model: str = typer.Option("gpt-4-vision", "--model", "-m", help="Vision model to use"),
173
+ raw_output: bool = typer.Option(False, "--raw", help="Return full model response instead of just content"),
174
174
  ):
175
175
  """Analyze an image with AI vision models"""
176
176
  try:
177
177
  client = config.get_client()
178
178
 
179
- # Prepare image data
180
- image_url = None
181
- image_data = None
182
-
183
- if base64:
184
- # Read base64 from file
185
- from pathlib import Path
186
- base64_path = Path(image_source)
187
- if not base64_path.exists():
188
- console.print(f"[red]❌ File not found: {image_source}[/red]")
189
- raise typer.Exit(1)
190
-
191
- with open(base64_path, 'r') as f:
192
- image_data = f.read().strip()
193
-
194
- console.print(f"[dim]📄 Read base64 image from {image_source} ({len(image_data)} chars)[/dim]")
195
- else:
196
- # Use as URL
197
- image_url = image_source
198
-
199
179
  # Create request payload for image analysis
200
180
  sync_request = {
201
181
  "model_id": model,
202
182
  "input": {
203
183
  "text": prompt,
184
+ "image_url": image_url
204
185
  },
205
186
  "max_tokens": 1000,
206
- "temperature": 0.7
187
+ "temperature": 0.7,
188
+ "raw_output": raw_output
207
189
  }
208
190
 
209
- # Add image data
210
- if image_data:
211
- sync_request["input"]["image_data"] = image_data
212
- else:
213
- sync_request["input"]["image_url"] = image_url
214
-
215
191
  console.print(f"[dim]👁️ Analyzing image with {model}...[/dim]")
216
-
192
+
217
193
  import httpx
218
-
194
+
219
195
  url = f"{config.base_url}/api/v2/external/sync/"
220
196
  headers = {"Authorization": f"Bearer {config.api_key}", "Content-Type": "application/json"}
221
-
197
+
222
198
  with httpx.Client() as http_client:
223
199
  response = http_client.post(
224
200
  url,
@@ -226,13 +202,17 @@ def analyze_image(
226
202
  headers=headers,
227
203
  timeout=60.0
228
204
  )
229
-
205
+
230
206
  if response.status_code == 200:
231
207
  result = response.json()
232
-
233
- console.print(f"[green]✅ Image Analysis:[/green]")
234
- console.print(f"[cyan]{result['output']}[/cyan]")
235
-
208
+
209
+ if raw_output:
210
+ console.print(f"[green]✅ Raw Response:[/green]")
211
+ console.print(json.dumps(result.get('raw_response', result['output']), indent=2))
212
+ else:
213
+ console.print(f"[green]✅ Image Analysis:[/green]")
214
+ console.print(f"[cyan]{result['output']}[/cyan]")
215
+
236
216
  elif response.status_code == 503:
237
217
  console.print(f"[red]❌ Vision model {model} is not running.[/red]")
238
218
  raise typer.Exit(1)
@@ -240,7 +220,7 @@ def analyze_image(
240
220
  console.print(f"[red]❌ Error: HTTP {response.status_code}[/red]")
241
221
  console.print(f"[red]{response.text}[/red]")
242
222
  raise typer.Exit(1)
243
-
223
+
244
224
  except Exception as e:
245
225
  console.print(f"[red]❌ Error: {e}[/red]")
246
226
  raise typer.Exit(1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lyceum-cli
3
- Version: 1.0.19
3
+ Version: 1.0.20
4
4
  Summary: Command-line interface for Lyceum Cloud Execution API
5
5
  Home-page: https://lyceum.technology
6
6
  Author: Lyceum Team
@@ -15,7 +15,7 @@ if readme_file.exists():
15
15
 
16
16
  setup(
17
17
  name="lyceum-cli",
18
- version="1.0.19",
18
+ version="1.0.20",
19
19
  description="Command-line interface for Lyceum Cloud Execution API",
20
20
  long_description=long_description,
21
21
  long_description_content_type="text/markdown",
File without changes
File without changes