synth-ai 0.1.0.dev9__tar.gz → 0.1.0.dev10__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.
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/PKG-INFO +5 -2
- synth_ai-0.1.0.dev10/private_tests/try_synth_sdk.py +1 -0
- synth_ai-0.1.0.dev10/public_tests/test_all_structured_outputs.py +195 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/pyproject.toml +5 -2
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/setup.py +1 -1
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/core/all.py +6 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/core/main.py +5 -1
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/core/vendor_clients.py +8 -0
- synth_ai-0.1.0.dev10/synth_ai/zyk/lms/vendors/supported/groq.py +16 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai.egg-info/PKG-INFO +5 -2
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai.egg-info/SOURCES.txt +8 -2
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai.egg-info/requires.txt +4 -1
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai.egg-info/top_level.txt +1 -0
- synth_ai-0.1.0.dev10/tests/test_agent.py +538 -0
- synth_ai-0.1.0.dev10/tests/test_recursive_structured_outputs.py +180 -0
- synth_ai-0.1.0.dev10/tests/test_structured_outputs.py +100 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/LICENSE +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/README.md +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/public_tests/test_agent.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/public_tests/test_recursive_structured_outputs.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/public_tests/test_structured_outputs.py +0 -0
- /synth_ai-0.1.0.dev9/public_tests/synth_sdk.py → /synth_ai-0.1.0.dev10/public_tests/test_synth_sdk.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/setup.cfg +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/__init__.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/__init__.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/__init__.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/caching/__init__.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/caching/constants.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/caching/dbs.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/caching/ephemeral.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/caching/handler.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/caching/initialize.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/caching/persistent.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/config.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/core/__init__.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/core/exceptions.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/cost/__init__.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/cost/monitor.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/cost/statefulness.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/structured_outputs/__init__.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/structured_outputs/handler.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/structured_outputs/inject.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/structured_outputs/rehabilitate.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/__init__.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/base.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/constants.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/core/__init__.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/core/anthropic_api.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/core/gemini_api.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/core/openai_api.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/local/__init__.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/local/ollama.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/openai_standard.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/retries.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/supported/__init__.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/supported/deepseek.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai/zyk/lms/vendors/supported/together.py +0 -0
- {synth_ai-0.1.0.dev9 → synth_ai-0.1.0.dev10}/synth_ai.egg-info/dependency_links.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: synth-ai
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev10
|
|
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
|
|
@@ -44,8 +44,11 @@ Requires-Dist: google>=3.0.0
|
|
|
44
44
|
Requires-Dist: google-generativeai>=0.8.1
|
|
45
45
|
Requires-Dist: together>=1.2.12
|
|
46
46
|
Requires-Dist: langfuse>=2.56.1
|
|
47
|
-
Requires-Dist: synth-sdk
|
|
47
|
+
Requires-Dist: synth-sdk>=0.3.1.dev3
|
|
48
48
|
Requires-Dist: datasets>=3.2.0
|
|
49
|
+
Requires-Dist: groq>=0.18.0
|
|
50
|
+
Requires-Dist: pytest-timeout>=2.3.1
|
|
51
|
+
Requires-Dist: lock>=2018.3.25.2110
|
|
49
52
|
Dynamic: author
|
|
50
53
|
Dynamic: home-page
|
|
51
54
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import synth_sdk.tracing
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
from typing import Any, Dict, Optional
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
from pydantic import BaseModel
|
|
5
|
+
|
|
6
|
+
from synth_ai.zyk.lms.core.main import LM
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class StateUpdate(BaseModel):
|
|
10
|
+
"""Response model for state updates from LLM"""
|
|
11
|
+
|
|
12
|
+
short_term_plan: Optional[str] = None
|
|
13
|
+
objective: Optional[str] = None
|
|
14
|
+
final_results: Optional[Dict[str, Any]] = None
|
|
15
|
+
|
|
16
|
+
def model_post_init(self, __context):
|
|
17
|
+
super().model_post_init(__context)
|
|
18
|
+
# Ensure no protected fields are present
|
|
19
|
+
protected_fields = ["message_history", "step_summaries"]
|
|
20
|
+
for field in protected_fields:
|
|
21
|
+
if hasattr(self, field):
|
|
22
|
+
raise ValueError(f"Cannot modify protected field: {field}")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@pytest.fixture(scope="module")
|
|
26
|
+
def models():
|
|
27
|
+
"""Initialize LMs for different vendors"""
|
|
28
|
+
return {
|
|
29
|
+
"gpt-4o-mini": LM(
|
|
30
|
+
model_name="gpt-4o-mini",
|
|
31
|
+
formatting_model_name="gpt-4o-mini",
|
|
32
|
+
temperature=0.1,
|
|
33
|
+
structured_output_mode="forced_json",
|
|
34
|
+
),
|
|
35
|
+
"o3-mini": LM(
|
|
36
|
+
model_name="o3-mini",
|
|
37
|
+
formatting_model_name="gpt-4o-mini",
|
|
38
|
+
temperature=0.1,
|
|
39
|
+
structured_output_mode="forced_json",
|
|
40
|
+
),
|
|
41
|
+
"gemini-1.5-flash": LM(
|
|
42
|
+
model_name="gemini-1.5-flash",
|
|
43
|
+
formatting_model_name="gpt-4o-mini",
|
|
44
|
+
temperature=0.1,
|
|
45
|
+
structured_output_mode="stringified_json",
|
|
46
|
+
),
|
|
47
|
+
"claude-3-haiku-20240307": LM(
|
|
48
|
+
model_name="claude-3-haiku-20240307",
|
|
49
|
+
formatting_model_name="gpt-4o-mini",
|
|
50
|
+
temperature=0.1,
|
|
51
|
+
structured_output_mode="stringified_json",
|
|
52
|
+
),
|
|
53
|
+
"deepseek-chat": LM(
|
|
54
|
+
model_name="deepseek-chat",
|
|
55
|
+
formatting_model_name="gpt-4o-mini",
|
|
56
|
+
temperature=0.1,
|
|
57
|
+
structured_output_mode="stringified_json",
|
|
58
|
+
),
|
|
59
|
+
"deepseek-reasoner": LM(
|
|
60
|
+
model_name="deepseek-reasoner",
|
|
61
|
+
formatting_model_name="gpt-4o-mini",
|
|
62
|
+
temperature=1,
|
|
63
|
+
structured_output_mode="stringified_json",
|
|
64
|
+
),
|
|
65
|
+
"llama-3.1-8b-instant": LM(
|
|
66
|
+
model_name="llama-3.1-8b-instant",
|
|
67
|
+
formatting_model_name="gpt-4o-mini",
|
|
68
|
+
temperature=0.1,
|
|
69
|
+
structured_output_mode="stringified_json",
|
|
70
|
+
),
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@pytest.fixture
|
|
75
|
+
def system_message():
|
|
76
|
+
"""System message for state updates"""
|
|
77
|
+
return """You are helping update the agent's state. Look at the current state and state_delta_instructions and update the state.
|
|
78
|
+
|
|
79
|
+
Available fields you can modify:
|
|
80
|
+
{
|
|
81
|
+
"short_term_plan": "str",
|
|
82
|
+
"objective": "str",
|
|
83
|
+
"final_results": "Dict[str, Any]"
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
Protected fields (do not modify):
|
|
87
|
+
{
|
|
88
|
+
"message_history": "Cannot directly edit message history - it is managed internally",
|
|
89
|
+
"step_summaries": "Cannot directly edit step summaries - they are generated automatically"
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
Please be brief, the state ought not be too long."""
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
@pytest.fixture
|
|
96
|
+
def current_state():
|
|
97
|
+
"""Initial state for testing"""
|
|
98
|
+
return {
|
|
99
|
+
"short_term_plan": "Current plan: Review code changes",
|
|
100
|
+
"objective": "Review pull request",
|
|
101
|
+
"final_results": {
|
|
102
|
+
"findings": [],
|
|
103
|
+
"recommendations": [],
|
|
104
|
+
"analysis": {},
|
|
105
|
+
"status": "IN_PROGRESS",
|
|
106
|
+
},
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
@pytest.mark.timeout(15)
|
|
111
|
+
@pytest.mark.parametrize(
|
|
112
|
+
"model_name",
|
|
113
|
+
[
|
|
114
|
+
"gpt-4o-mini",
|
|
115
|
+
"gemini-1.5-flash",
|
|
116
|
+
"claude-3-haiku-20240307",
|
|
117
|
+
"deepseek-chat",
|
|
118
|
+
"llama-3.1-8b-instant",
|
|
119
|
+
],
|
|
120
|
+
)
|
|
121
|
+
def test_state_delta_handling(
|
|
122
|
+
model_name: str, models: Dict[str, LM], system_message: str, current_state: Dict
|
|
123
|
+
):
|
|
124
|
+
"""Test that each model correctly handles state updates"""
|
|
125
|
+
|
|
126
|
+
state_delta_instructions = """Update the final_results to include findings about code quality issues. Add a recommendation to improve error handling."""
|
|
127
|
+
user_message = f"Current state: {current_state}\nState delta instructions: {state_delta_instructions}\n\nHow should the state be updated?"
|
|
128
|
+
|
|
129
|
+
try:
|
|
130
|
+
result = models[model_name].respond_sync(
|
|
131
|
+
system_message=system_message,
|
|
132
|
+
user_message=user_message,
|
|
133
|
+
response_model=StateUpdate,
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
# Verify response structure
|
|
137
|
+
assert isinstance(result, StateUpdate)
|
|
138
|
+
|
|
139
|
+
# Verify only allowed fields are present and have correct types
|
|
140
|
+
if result.short_term_plan is not None:
|
|
141
|
+
assert isinstance(result.short_term_plan, str)
|
|
142
|
+
if result.objective is not None:
|
|
143
|
+
assert isinstance(result.objective, str)
|
|
144
|
+
if result.final_results is not None:
|
|
145
|
+
assert isinstance(result.final_results, dict)
|
|
146
|
+
|
|
147
|
+
except Exception as e:
|
|
148
|
+
pytest.fail(f"Model {model_name} failed: {str(e)}")
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
@pytest.mark.timeout(15)
|
|
152
|
+
@pytest.mark.parametrize(
|
|
153
|
+
"model_name",
|
|
154
|
+
[
|
|
155
|
+
"gpt-4o-mini",
|
|
156
|
+
"gemini-1.5-flash",
|
|
157
|
+
"claude-3-haiku-20240307",
|
|
158
|
+
"deepseek-chat",
|
|
159
|
+
"llama-3.1-8b-instant",
|
|
160
|
+
],
|
|
161
|
+
)
|
|
162
|
+
def test_state_delta_protected_fields(
|
|
163
|
+
model_name: str, models: Dict[str, LM], system_message: str
|
|
164
|
+
):
|
|
165
|
+
"""Test that models respect protected fields"""
|
|
166
|
+
|
|
167
|
+
current_state = {
|
|
168
|
+
"short_term_plan": "Current plan: Review code changes",
|
|
169
|
+
"objective": "Review pull request",
|
|
170
|
+
"message_history": ["Previous message 1", "Previous message 2"],
|
|
171
|
+
"step_summaries": ["Step 1 summary", "Step 2 summary"],
|
|
172
|
+
"final_results": {
|
|
173
|
+
"findings": [],
|
|
174
|
+
"recommendations": [],
|
|
175
|
+
"analysis": {},
|
|
176
|
+
"status": "IN_PROGRESS",
|
|
177
|
+
},
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
state_delta_instructions = """Update the message history to include new findings and update step summaries with recent progress."""
|
|
181
|
+
user_message = f"Current state: {current_state}\nState delta instructions: {state_delta_instructions}\n\nHow should the state be updated?"
|
|
182
|
+
|
|
183
|
+
try:
|
|
184
|
+
result = models[model_name].respond_sync(
|
|
185
|
+
system_message=system_message,
|
|
186
|
+
user_message=user_message,
|
|
187
|
+
response_model=StateUpdate,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
# Verify no protected fields are present
|
|
191
|
+
assert not hasattr(result, "message_history")
|
|
192
|
+
assert not hasattr(result, "step_summaries")
|
|
193
|
+
|
|
194
|
+
except Exception as e:
|
|
195
|
+
pytest.fail(f"Model {model_name} failed: {str(e)}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "synth-ai"
|
|
3
|
-
version = "0.1.0.
|
|
3
|
+
version = "0.1.0.dev10"
|
|
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" }]
|
|
@@ -21,8 +21,11 @@ dependencies = [
|
|
|
21
21
|
"google-generativeai>=0.8.1",
|
|
22
22
|
"together>=1.2.12",
|
|
23
23
|
"langfuse>=2.56.1",
|
|
24
|
-
"synth-sdk
|
|
24
|
+
"synth-sdk>=0.3.1.dev3",
|
|
25
25
|
"datasets>=3.2.0",
|
|
26
|
+
"groq>=0.18.0",
|
|
27
|
+
"pytest-timeout>=2.3.1",
|
|
28
|
+
"lock>=2018.3.25.2110",
|
|
26
29
|
]
|
|
27
30
|
requires-python = ">=3.10"
|
|
28
31
|
|
|
@@ -6,6 +6,7 @@ from synth_ai.zyk.lms.vendors.core.openai_api import (
|
|
|
6
6
|
)
|
|
7
7
|
from synth_ai.zyk.lms.vendors.supported.deepseek import DeepSeekAPI
|
|
8
8
|
from synth_ai.zyk.lms.vendors.supported.together import TogetherAPI
|
|
9
|
+
from synth_ai.zyk.lms.vendors.supported.groq import GroqAPI
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class OpenAIClient(OpenAIPrivate):
|
|
@@ -33,3 +34,8 @@ class DeepSeekClient(DeepSeekAPI):
|
|
|
33
34
|
class TogetherClient(TogetherAPI):
|
|
34
35
|
def __init__(self):
|
|
35
36
|
super().__init__()
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class GroqClient(GroqAPI):
|
|
40
|
+
def __init__(self):
|
|
41
|
+
super().__init__()
|
|
@@ -11,6 +11,8 @@ from synth_ai.zyk.lms.core.vendor_clients import (
|
|
|
11
11
|
from synth_ai.zyk.lms.structured_outputs.handler import StructuredOutputHandler
|
|
12
12
|
from synth_ai.zyk.lms.vendors.base import VendorBase
|
|
13
13
|
|
|
14
|
+
REASONING_MODELS = ["deepseek-reasoner", "o1-mini", "o1-preview", "o1", "o3"]
|
|
15
|
+
|
|
14
16
|
|
|
15
17
|
def build_messages(
|
|
16
18
|
sys_msg: str,
|
|
@@ -105,7 +107,9 @@ class LM:
|
|
|
105
107
|
"forced_json",
|
|
106
108
|
{"max_retries": max_retries_dict.get(max_retries, 2)},
|
|
107
109
|
)
|
|
108
|
-
|
|
110
|
+
# Override temperature to 1 for reasoning models
|
|
111
|
+
effective_temperature = 1.0 if model_name in REASONING_MODELS else temperature
|
|
112
|
+
self.lm_config = {"temperature": effective_temperature}
|
|
109
113
|
self.model_name = model_name
|
|
110
114
|
|
|
111
115
|
def respond_sync(
|
|
@@ -8,6 +8,7 @@ from synth_ai.zyk.lms.core.all import (
|
|
|
8
8
|
# OpenAIClient,
|
|
9
9
|
OpenAIStructuredOutputClient,
|
|
10
10
|
TogetherClient,
|
|
11
|
+
GroqAPI,
|
|
11
12
|
)
|
|
12
13
|
|
|
13
14
|
openai_naming_regexes: List[Pattern] = [
|
|
@@ -29,6 +30,11 @@ together_naming_regexes: List[Pattern] = [
|
|
|
29
30
|
re.compile(r"^.*\/.*$"),
|
|
30
31
|
]
|
|
31
32
|
|
|
33
|
+
groq_naming_regexes: List[Pattern] = [
|
|
34
|
+
re.compile(r"^llama-3.3-70b-versatile$"),
|
|
35
|
+
re.compile(r"^llama-3.1-8b-instant$"),
|
|
36
|
+
]
|
|
37
|
+
|
|
32
38
|
|
|
33
39
|
def get_client(
|
|
34
40
|
model_name: str,
|
|
@@ -56,5 +62,7 @@ def get_client(
|
|
|
56
62
|
return DeepSeekClient()
|
|
57
63
|
elif any(regex.match(model_name) for regex in together_naming_regexes):
|
|
58
64
|
return TogetherClient()
|
|
65
|
+
elif any(regex.match(model_name) for regex in groq_naming_regexes):
|
|
66
|
+
return GroqAPI()
|
|
59
67
|
else:
|
|
60
68
|
raise ValueError(f"Invalid model name: {model_name}")
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
from dotenv import load_dotenv
|
|
4
|
+
from groq import AsyncGroq, Groq
|
|
5
|
+
|
|
6
|
+
from synth_ai.zyk.lms.vendors.openai_standard import OpenAIStandard
|
|
7
|
+
|
|
8
|
+
load_dotenv()
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GroqAPI(OpenAIStandard):
|
|
12
|
+
def __init__(self):
|
|
13
|
+
super().__init__(
|
|
14
|
+
sync_client=Groq(api_key=os.getenv("GROQ_API_KEY")),
|
|
15
|
+
async_client=AsyncGroq(api_key=os.getenv("GROQ_API_KEY")),
|
|
16
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: synth-ai
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev10
|
|
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
|
|
@@ -44,8 +44,11 @@ Requires-Dist: google>=3.0.0
|
|
|
44
44
|
Requires-Dist: google-generativeai>=0.8.1
|
|
45
45
|
Requires-Dist: together>=1.2.12
|
|
46
46
|
Requires-Dist: langfuse>=2.56.1
|
|
47
|
-
Requires-Dist: synth-sdk
|
|
47
|
+
Requires-Dist: synth-sdk>=0.3.1.dev3
|
|
48
48
|
Requires-Dist: datasets>=3.2.0
|
|
49
|
+
Requires-Dist: groq>=0.18.0
|
|
50
|
+
Requires-Dist: pytest-timeout>=2.3.1
|
|
51
|
+
Requires-Dist: lock>=2018.3.25.2110
|
|
49
52
|
Dynamic: author
|
|
50
53
|
Dynamic: home-page
|
|
51
54
|
|
|
@@ -2,10 +2,12 @@ LICENSE
|
|
|
2
2
|
README.md
|
|
3
3
|
pyproject.toml
|
|
4
4
|
setup.py
|
|
5
|
-
|
|
5
|
+
private_tests/try_synth_sdk.py
|
|
6
6
|
public_tests/test_agent.py
|
|
7
|
+
public_tests/test_all_structured_outputs.py
|
|
7
8
|
public_tests/test_recursive_structured_outputs.py
|
|
8
9
|
public_tests/test_structured_outputs.py
|
|
10
|
+
public_tests/test_synth_sdk.py
|
|
9
11
|
synth_ai/__init__.py
|
|
10
12
|
synth_ai.egg-info/PKG-INFO
|
|
11
13
|
synth_ai.egg-info/SOURCES.txt
|
|
@@ -47,4 +49,8 @@ synth_ai/zyk/lms/vendors/local/__init__.py
|
|
|
47
49
|
synth_ai/zyk/lms/vendors/local/ollama.py
|
|
48
50
|
synth_ai/zyk/lms/vendors/supported/__init__.py
|
|
49
51
|
synth_ai/zyk/lms/vendors/supported/deepseek.py
|
|
50
|
-
synth_ai/zyk/lms/vendors/supported/
|
|
52
|
+
synth_ai/zyk/lms/vendors/supported/groq.py
|
|
53
|
+
synth_ai/zyk/lms/vendors/supported/together.py
|
|
54
|
+
tests/test_agent.py
|
|
55
|
+
tests/test_recursive_structured_outputs.py
|
|
56
|
+
tests/test_structured_outputs.py
|