applied-cli 0.5.6__tar.gz → 0.5.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: applied-cli
3
- Version: 0.5.6
3
+ Version: 0.5.7
4
4
  Summary: CLI and shared client library for Applied Labs AI support agents
5
5
  Author: Applied Labs
6
6
  License-Expression: MIT
@@ -431,6 +431,7 @@ class AppliedClient:
431
431
  headers["X-Shop-Id"] = self.shop_id
432
432
 
433
433
  body: dict[str, Any] = {
434
+ "input": message,
434
435
  "transcript": [
435
436
  {
436
437
  "role": "user",
@@ -460,38 +461,38 @@ class AppliedClient:
460
461
  response_text = ""
461
462
  result_conversation_id = conversation_id
462
463
 
463
- async with httpx.AsyncClient(timeout=120.0) as client:
464
- async with client.stream(
465
- "POST", url, headers=headers, json=body
466
- ) as response:
467
- response.raise_for_status()
464
+ async with (
465
+ httpx.AsyncClient(timeout=120.0) as client,
466
+ client.stream("POST", url, headers=headers, json=body) as response,
467
+ ):
468
+ response.raise_for_status()
468
469
 
469
- async for line in response.aiter_lines():
470
- if not line:
471
- continue
470
+ async for line in response.aiter_lines():
471
+ if not line:
472
+ continue
472
473
 
473
- # Parse SSE format: "data: {...}"
474
- if line.startswith("data: "):
475
- data_str = line[6:] # Remove "data: " prefix
476
- if data_str == "[DONE]":
477
- break
474
+ # Parse SSE format: "data: {...}"
475
+ if line.startswith("data: "):
476
+ data_str = line[6:] # Remove "data: " prefix
477
+ if data_str == "[DONE]":
478
+ break
478
479
 
479
- try:
480
- import json
480
+ try:
481
+ import json
481
482
 
482
- data = json.loads(data_str)
483
+ data = json.loads(data_str)
483
484
 
484
- # Extract conversation_id from first chunk
485
- if not result_conversation_id:
486
- result_conversation_id = data.get("conversation_id")
485
+ # Extract conversation_id from first chunk
486
+ if not result_conversation_id:
487
+ result_conversation_id = data.get("conversation_id")
487
488
 
488
- # Accumulate response content
489
- if "content" in data:
490
- response_text += data["content"]
489
+ # Accumulate response content
490
+ if "content" in data:
491
+ response_text += data["content"]
491
492
 
492
- except (json.JSONDecodeError, KeyError):
493
- # Skip malformed chunks
494
- pass
493
+ except (json.JSONDecodeError, KeyError):
494
+ # Skip malformed chunks
495
+ pass
495
496
 
496
497
  return {
497
498
  "conversation_id": result_conversation_id,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: applied-cli
3
- Version: 0.5.6
3
+ Version: 0.5.7
4
4
  Summary: CLI and shared client library for Applied Labs AI support agents
5
5
  Author: Applied Labs
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "applied-cli"
3
- version = "0.5.6"
3
+ version = "0.5.7"
4
4
  description = "CLI and shared client library for Applied Labs AI support agents"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
File without changes
File without changes