lucidicai 1.2.17__tar.gz → 1.2.18__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 (35) hide show
  1. {lucidicai-1.2.17 → lucidicai-1.2.18}/PKG-INFO +1 -1
  2. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/__init__.py +12 -11
  3. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/client.py +7 -2
  4. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/session.py +2 -1
  5. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai.egg-info/PKG-INFO +1 -1
  6. {lucidicai-1.2.17 → lucidicai-1.2.18}/setup.py +1 -1
  7. {lucidicai-1.2.17 → lucidicai-1.2.18}/README.md +0 -0
  8. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/constants.py +0 -0
  9. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/decorators.py +0 -0
  10. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/errors.py +0 -0
  11. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/event.py +0 -0
  12. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/image_upload.py +0 -0
  13. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/model_pricing.py +0 -0
  14. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/singleton.py +0 -0
  15. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/step.py +0 -0
  16. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/streaming.py +0 -0
  17. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/__init__.py +0 -0
  18. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/base_provider.py +0 -0
  19. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/lucidic_exporter.py +0 -0
  20. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/lucidic_span_processor.py +0 -0
  21. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/openai_agents_instrumentor.py +0 -0
  22. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/opentelemetry_converter.py +0 -0
  23. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/otel_handlers.py +0 -0
  24. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/otel_init.py +0 -0
  25. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/otel_provider.py +0 -0
  26. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/pydantic_ai_handler.py +0 -0
  27. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/utils/__init__.py +0 -0
  28. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/utils/image_storage.py +0 -0
  29. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/utils/text_storage.py +0 -0
  30. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai/telemetry/utils/universal_image_interceptor.py +0 -0
  31. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai.egg-info/SOURCES.txt +0 -0
  32. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai.egg-info/dependency_links.txt +0 -0
  33. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai.egg-info/requires.txt +0 -0
  34. {lucidicai-1.2.17 → lucidicai-1.2.18}/lucidicai.egg-info/top_level.txt +0 -0
  35. {lucidicai-1.2.17 → lucidicai-1.2.18}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lucidicai
3
- Version: 1.2.17
3
+ Version: 1.2.18
4
4
  Summary: Lucidic AI Python SDK
5
5
  Author: Andy Liang
6
6
  Author-email: andy@lucidic.ai
@@ -105,7 +105,8 @@ __all__ = [
105
105
 
106
106
 
107
107
  def init(
108
- session_name: str,
108
+ session_name: Optional[str] = None,
109
+ session_id: Optional[str] = None,
109
110
  lucidic_api_key: Optional[str] = None,
110
111
  agent_id: Optional[str] = None,
111
112
  task: Optional[str] = None,
@@ -121,7 +122,8 @@ def init(
121
122
  Initialize the Lucidic client.
122
123
 
123
124
  Args:
124
- session_name: The name of the session.
125
+ session_name: The display name of the session.
126
+ session_id: Custom ID of the session. If not provided, a random ID will be generated.
125
127
  lucidic_api_key: API key for authentication. If not provided, will use the LUCIDIC_API_KEY environment variable.
126
128
  agent_id: Agent ID. If not provided, will use the LUCIDIC_AGENT_ID environment variable.
127
129
  task: Task description.
@@ -171,6 +173,7 @@ def init(
171
173
  rubrics=rubrics,
172
174
  tags=tags,
173
175
  production_monitoring=production_monitoring,
176
+ custom_session_id=session_id,
174
177
  )
175
178
  if masking_function:
176
179
  client.masking_function = masking_function
@@ -198,15 +201,13 @@ def continue_session(
198
201
  agent_id = os.getenv("LUCIDIC_AGENT_ID", None)
199
202
  if agent_id is None:
200
203
  raise APIKeyVerificationError("Lucidic agent ID not specified. Make sure to either pass your agent ID into lai.init() or set the LUCIDIC_AGENT_ID environment variable.")
201
- try:
202
- client = Client()
203
- if client.session:
204
- raise InvalidOperationError("[Lucidic] Session already in progress. Please call lai.end_session() first.")
205
- except LucidicNotInitializedError:
206
- client = Client(
207
- lucidic_api_key=lucidic_api_key,
208
- agent_id=agent_id,
209
- )
204
+
205
+ client = Client()
206
+ if client.session:
207
+ raise InvalidOperationError("[Lucidic] Session already in progress. Please call lai.end_session() or lai.reset_sdk() first.")
208
+ # if not yet initialized or still the NullClient -> create a real client when init is called
209
+ if not getattr(client, 'initialized', False):
210
+ client = Client(lucidic_api_key=lucidic_api_key, agent_id=agent_id)
210
211
 
211
212
  # Handle auto_end with environment variable support
212
213
  if auto_end is None:
@@ -77,7 +77,8 @@ class Client:
77
77
  task: Optional[str] = None,
78
78
  rubrics: Optional[list] = None,
79
79
  tags: Optional[list] = None,
80
- production_monitoring: Optional[bool] = False
80
+ production_monitoring: Optional[bool] = False,
81
+ custom_session_id: Optional[str] = None,
81
82
  ) -> None:
82
83
  self.session = Session(
83
84
  agent_id=self.agent_id,
@@ -86,7 +87,8 @@ class Client:
86
87
  task=task,
87
88
  rubrics=rubrics,
88
89
  tags=tags,
89
- production_monitoring=production_monitoring
90
+ production_monitoring=production_monitoring,
91
+ custom_session_id=custom_session_id
90
92
  )
91
93
  self.initialized = True
92
94
  return self.session.session_id
@@ -96,6 +98,9 @@ class Client:
96
98
  agent_id=self.agent_id,
97
99
  session_id=session_id
98
100
  )
101
+ if self.session.session_id != session_id:
102
+ # Custom session ID provided
103
+ self.session.custom_session_id = session_id
99
104
  self.initialized = True
100
105
  return self.session.session_id
101
106
 
@@ -44,7 +44,8 @@ class Session:
44
44
  "mass_sim_id": kwargs.get("mass_sim_id", None),
45
45
  "rubrics": kwargs.get("rubrics", None),
46
46
  "tags": kwargs.get("tags", None),
47
- "production_monitoring": kwargs.get("production_monitoring", False)
47
+ "production_monitoring": kwargs.get("production_monitoring", False),
48
+ "custom_session_id": kwargs.get("custom_session_id", None)
48
49
  }
49
50
  data = Client().make_request('initsession', 'POST', request_data)
50
51
  self.session_id = data["session_id"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lucidicai
3
- Version: 1.2.17
3
+ Version: 1.2.18
4
4
  Summary: Lucidic AI Python SDK
5
5
  Author: Andy Liang
6
6
  Author-email: andy@lucidic.ai
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="lucidicai",
5
- version="1.2.17",
5
+ version="1.2.18",
6
6
  packages=find_packages(),
7
7
  install_requires=[
8
8
  "requests>=2.25.1",
File without changes
File without changes
File without changes