Skip to content

Commit 4cbf46b

Browse files
committed
support for together.ai
1 parent dd8959b commit 4cbf46b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

flat_ai/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__title__ = 'flat-ai'
22
__package_name__ = 'flat_ai'
3-
__version__ = '0.3.3'
3+
__version__ = '0.3.4'
44
__description__ = 'F.L.A.T. (Frameworkless LLM Agent Thing) for building AI Agents'
55
__email__ = 'hello@mindsdb.com'
66
__author__ = 'Yours truly Jorge Torres and an LLM'

flat_ai/flat_ai.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def __init__(
6060
self.model = model
6161
self.retries = retries
6262
self._context = {}
63+
self.base_url = base_url
6364

6465
def _retry_on_error(self, func: Callable, *args, **kwargs) -> Any:
6566
"""Helper method to retry operations on failure"""
@@ -173,7 +174,7 @@ def _execute():
173174
)
174175

175176
# if Fireworks or Together use a different response format
176-
if self.client.base_url in ["https://api.fireworks.ai/inference/v1", "https://api.together.xyz/v1"]:
177+
if self.base_url in ["https://api.fireworks.ai/inference/v1", "https://api.together.xyz/v1"]:
177178
response = self.client.chat.completions.create(
178179
model=self.model,
179180
response_format={

0 commit comments

Comments
 (0)