synth-ai 0.1.0.dev52__tar.gz → 0.1.1__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 (55) hide show
  1. {synth_ai-0.1.0.dev52/synth_ai.egg-info → synth_ai-0.1.1}/PKG-INFO +2 -2
  2. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/pyproject.toml +2 -2
  3. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/caching/handler.py +1 -1
  4. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/structured_outputs/handler.py +1 -1
  5. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/core/gemini_api.py +13 -3
  6. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1/synth_ai.egg-info}/PKG-INFO +2 -2
  7. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai.egg-info/requires.txt +1 -1
  8. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/LICENSE +0 -0
  9. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/README.md +0 -0
  10. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/setup.cfg +0 -0
  11. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/setup.py +0 -0
  12. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/__init__.py +0 -0
  13. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/__init__.py +0 -0
  14. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/__init__.py +0 -0
  15. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/caching/__init__.py +0 -0
  16. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/caching/constants.py +0 -0
  17. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/caching/dbs.py +0 -0
  18. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/caching/ephemeral.py +0 -0
  19. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/caching/initialize.py +0 -0
  20. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/caching/persistent.py +0 -0
  21. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/config.py +0 -0
  22. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/constants.py +0 -0
  23. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/core/__init__.py +0 -0
  24. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/core/all.py +0 -0
  25. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/core/exceptions.py +0 -0
  26. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/core/main.py +0 -0
  27. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/core/vendor_clients.py +0 -0
  28. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/cost/__init__.py +0 -0
  29. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/cost/monitor.py +0 -0
  30. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/cost/statefulness.py +0 -0
  31. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/structured_outputs/__init__.py +0 -0
  32. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/structured_outputs/inject.py +0 -0
  33. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/structured_outputs/rehabilitate.py +0 -0
  34. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/tools/base.py +0 -0
  35. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/__init__.py +0 -0
  36. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/base.py +0 -0
  37. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/core/__init__.py +0 -0
  38. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/core/anthropic_api.py +0 -0
  39. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/core/mistral_api.py +0 -0
  40. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/core/openai_api.py +0 -0
  41. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/local/__init__.py +0 -0
  42. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/local/ollama.py +0 -0
  43. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/openai_standard.py +0 -0
  44. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/retries.py +0 -0
  45. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/supported/__init__.py +0 -0
  46. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/supported/deepseek.py +0 -0
  47. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/supported/groq.py +0 -0
  48. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/supported/ollama.py +0 -0
  49. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai/zyk/lms/vendors/supported/together.py +0 -0
  50. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai.egg-info/SOURCES.txt +0 -0
  51. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai.egg-info/dependency_links.txt +0 -0
  52. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/synth_ai.egg-info/top_level.txt +0 -0
  53. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/tests/test_agent.py +0 -0
  54. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/tests/test_recursive_structured_outputs.py +0 -0
  55. {synth_ai-0.1.0.dev52 → synth_ai-0.1.1}/tests/test_structured_outputs.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: synth-ai
3
- Version: 0.1.0.dev52
3
+ Version: 0.1.1
4
4
  Summary: Software for aiding the best and multiplying the will.
5
5
  Home-page: https://github.com/synth-laboratories/synth-ai
6
6
  Author: Josh Purtell
@@ -45,7 +45,7 @@ Requires-Dist: google-api-core
45
45
  Requires-Dist: google-generativeai
46
46
  Requires-Dist: google-genai
47
47
  Requires-Dist: together>=1.2.12
48
- Requires-Dist: langfuse>=2.56.1
48
+ Requires-Dist: langfuse<3.0.0,>=2.53.9
49
49
  Requires-Dist: datasets>=3.2.0
50
50
  Requires-Dist: groq>=0.18.0
51
51
  Requires-Dist: pytest-timeout>=2.3.1
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "synth-ai"
3
- version = "0.1.0.dev52"
3
+ version = "0.1.1"
4
4
  description = "Software for aiding the best and multiplying the will."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Josh Purtell", email = "josh@usesynth.ai" }]
@@ -22,7 +22,7 @@ dependencies = [
22
22
  "google-generativeai",
23
23
  "google-genai",
24
24
  "together>=1.2.12",
25
- "langfuse>=2.56.1",
25
+ "langfuse>=2.53.9,<3.0.0",
26
26
  "datasets>=3.2.0",
27
27
  "groq>=0.18.0",
28
28
  "pytest-timeout>=2.3.1",
@@ -47,7 +47,7 @@ def map_params_to_key(
47
47
  #logger.error(f"Tool schemas: {tool_schemas}")
48
48
  normalized_tools = "".join(tool_schemas)
49
49
  elif tools:
50
- logger.error(f"Tools: {tools}")
50
+ #logger.error(f"Tools: {tools}")
51
51
  normalized_tools = "".join([str(tool) for tool in tools])
52
52
 
53
53
  key_str = ""
@@ -174,7 +174,7 @@ class StringifiedJSONHandler(StructuredHandlerBase):
174
174
  type(raw_text_response_or_cached_hit) in [str, BaseLMResponse]
175
175
  ), f"Expected str or BaseLMResponse, got {type(raw_text_response_or_cached_hit)}"
176
176
  if type(raw_text_response_or_cached_hit) == BaseLMResponse:
177
- print("Got cached hit, returning directly")
177
+ #print("Got cached hit, returning directly")
178
178
  raw_text_response = raw_text_response_or_cached_hit.raw_response
179
179
  else:
180
180
  raw_text_response = raw_text_response_or_cached_hit
@@ -24,7 +24,7 @@ ALIASES = {
24
24
  }
25
25
 
26
26
  logger = logging.getLogger(__name__)
27
- _CLIENT = genai.Client() # one client for everything
27
+ _CLIENT = None # Initialize lazily when needed
28
28
  GEMINI_EXCEPTIONS_TO_RETRY: Tuple[Type[Exception], ...] = (ResourceExhausted,)
29
29
  logging.getLogger("google.genai").setLevel(logging.ERROR)
30
30
  os.environ["GRPC_VERBOSITY"] = "ERROR"
@@ -39,6 +39,14 @@ SAFETY_SETTINGS = {
39
39
  }
40
40
 
41
41
 
42
+ def _get_client():
43
+ """Get or create the Gemini client lazily."""
44
+ global _CLIENT
45
+ if _CLIENT is None:
46
+ _CLIENT = genai.Client()
47
+ return _CLIENT
48
+
49
+
42
50
  class GeminiAPI(VendorBase):
43
51
  used_for_structured_outputs: bool = True
44
52
  exceptions_to_retry: Tuple[Type[Exception], ...] = GEMINI_EXCEPTIONS_TO_RETRY
@@ -119,7 +127,8 @@ class GeminiAPI(VendorBase):
119
127
  tool_config=lm_config.get("tool_config") if lm_config else None,
120
128
  tools=self._tools_to_genai(tools) if tools else None
121
129
  )
122
- resp = await _CLIENT.aio.models.generate_content(
130
+ client = _get_client()
131
+ resp = await client.aio.models.generate_content(
123
132
  model=model_name,
124
133
  contents=self._msg_to_contents(messages),
125
134
  config=generation_config,
@@ -150,7 +159,8 @@ class GeminiAPI(VendorBase):
150
159
  tools=self._tools_to_genai(tools) if tools else None
151
160
  )
152
161
 
153
- resp = _CLIENT.models.generate_content(
162
+ client = _get_client()
163
+ resp = client.models.generate_content(
154
164
  model=model_name,
155
165
  contents=self._msg_to_contents(messages),
156
166
  safety_settings=SAFETY_SETTINGS,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: synth-ai
3
- Version: 0.1.0.dev52
3
+ Version: 0.1.1
4
4
  Summary: Software for aiding the best and multiplying the will.
5
5
  Home-page: https://github.com/synth-laboratories/synth-ai
6
6
  Author: Josh Purtell
@@ -45,7 +45,7 @@ Requires-Dist: google-api-core
45
45
  Requires-Dist: google-generativeai
46
46
  Requires-Dist: google-genai
47
47
  Requires-Dist: together>=1.2.12
48
- Requires-Dist: langfuse>=2.56.1
48
+ Requires-Dist: langfuse<3.0.0,>=2.53.9
49
49
  Requires-Dist: datasets>=3.2.0
50
50
  Requires-Dist: groq>=0.18.0
51
51
  Requires-Dist: pytest-timeout>=2.3.1
@@ -8,7 +8,7 @@ google-api-core
8
8
  google-generativeai
9
9
  google-genai
10
10
  together>=1.2.12
11
- langfuse>=2.56.1
11
+ langfuse<3.0.0,>=2.53.9
12
12
  datasets>=3.2.0
13
13
  groq>=0.18.0
14
14
  pytest-timeout>=2.3.1
File without changes
File without changes
File without changes
File without changes