oocana 0.15.0__tar.gz → 0.15.2__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.1
2
2
  Name: oocana
3
- Version: 0.15.0
3
+ Version: 0.15.2
4
4
  Summary: python implement of oocana to give a context for oocana block
5
5
  License: MIT
6
6
  Requires-Python: >=3.9
@@ -20,6 +20,9 @@ class OnlyEqualSelf:
20
20
 
21
21
  class OOMOL_LLM_ENV(TypedDict):
22
22
  base_url: str
23
+ """{basUrl}/v1 openai compatible endpoint
24
+ """
25
+ base_url_v1: str
23
26
  api_key: str
24
27
  models: list[str]
25
28
 
@@ -105,6 +108,7 @@ class Context:
105
108
  """
106
109
  return {
107
110
  "base_url": os.getenv("OOMOL_LLM_BASE_URL", ""),
111
+ "base_url_v1": os.getenv("OOMOL_LLM_BASE_URL_V1", ""),
108
112
  "api_key": os.getenv("OOMOL_LLM_API_KEY", ""),
109
113
  "models": os.getenv("OOMOL_LLM_MODELS", "").split(","),
110
114
  }
@@ -10,6 +10,8 @@ from typing import Optional
10
10
 
11
11
  __all__ = ["Mainframe"]
12
12
 
13
+
14
+
13
15
  class Mainframe:
14
16
  address: str
15
17
  client: mqtt.Client
@@ -72,12 +74,13 @@ class Mainframe:
72
74
  def report(self, block_info: BlockDict, msg: dict) -> mqtt.MQTTMessageInfo:
73
75
  return self.client.publish("report", dumps({**block_info, **msg}), qos=1)
74
76
 
75
- def notify_executor_ready(self, session_id: str, executor_name: str, package: str | None) -> None:
77
+ def notify_executor_ready(self, session_id: str, executor_name: str, package: str | None, identifier: str | None) -> None:
76
78
  self.client.publish(f"session/{session_id}", dumps({
77
79
  "type": "ExecutorReady",
78
80
  "session_id": session_id,
79
81
  "executor_name": executor_name,
80
82
  "package": package,
83
+ "identifier": identifier,
81
84
  }), qos=1)
82
85
 
83
86
  def notify_block_ready(self, session_id: str, job_id: str) -> dict:
@@ -4,8 +4,8 @@ import threading
4
4
  def throttle(period):
5
5
  last_invoke_time = 0
6
6
  timer = None
7
- last_args = None
8
- last_kwargs = None
7
+ last_args = []
8
+ last_kwargs = dict()
9
9
 
10
10
  def decorator(fn):
11
11
  def wrapper(*args, **kwargs):
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "oocana"
3
- version = "0.15.0"
3
+ version = "0.15.2"
4
4
  description = "python implement of oocana to give a context for oocana block"
5
5
  dependencies = [
6
6
  "paho-mqtt>=2",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes