Skip to content

Commit 910b2a7

Browse files
committed
init fireworks
1 parent 54b512b commit 910b2a7

3 files changed

Lines changed: 9 additions & 24 deletions

File tree

packages/uipath_langchain_client/src/uipath_langchain_client/clients/fireworks/chat_models.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@
77
try:
88
from langchain_fireworks.chat_models import ChatFireworks
99

10-
from fireworks.client import AsyncFireworks, Fireworks
1110
from fireworks.client.api_client import FireworksClient as FireworksClientV1
1211
except ImportError as e:
1312
raise ImportError(
1413
"The 'fireworks' extra is required to use UiPathChatFireworks. "
15-
"Install it with: uv add uipath-langchain-client[fireworks]"
14+
'Install it with: uv add "uipath-langchain-client[fireworks]"'
1615
) from e
1716

1817

19-
class UiPathChatFireworks(UiPathBaseLLMClient, ChatFireworks):
18+
class UiPathChatFireworks(UiPathBaseLLMClient, ChatFireworks): # type: ignore[override]
2019
api_config: UiPathAPIConfig = UiPathAPIConfig(
2120
api_type="completions",
2221
client_type="passthrough",
@@ -35,6 +34,5 @@ def setup_uipath_client(self) -> Self:
3534
)
3635
fireworks_client_v1._client = self.uipath_sync_client
3736
fireworks_client_v1._async_client = self.uipath_async_client
38-
self.client = Fireworks(client=fireworks_client_v1)
39-
37+
self.client._client_v1 = fireworks_client_v1
4038
return self

packages/uipath_langchain_client/src/uipath_langchain_client/clients/fireworks/embeddings.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@
1010
except ImportError as e:
1111
raise ImportError(
1212
"The 'fireworks' extra is required to use UiPathFireworksEmbeddings. "
13-
"Install it with: uv add uipath-langchain-client[fireworks]"
13+
'Install it with: uv add "uipath-langchain-client[fireworks]"'
1414
) from e
1515

1616

1717
class UiPathFireworksEmbeddings(UiPathBaseLLMClient, FireworksEmbeddings):
1818
api_config: UiPathAPIConfig = UiPathAPIConfig(
1919
api_type="embeddings",
2020
client_type="passthrough",
21-
vendor_type="fireworks",
21+
vendor_type="openai",
22+
api_flavor="chat-completions",
23+
api_version="2025-03-01-preview",
2224
freeze_base_url=True,
2325
)
2426

@@ -27,13 +29,13 @@ def setup_uipath_client(self) -> Self:
2729
self.client = OpenAI(
2830
api_key="PLACEHOLDER",
2931
timeout=None, # handled by the UiPath client
30-
max_retries=1, # handled by the UiPath client
32+
max_retries=0, # handled by the UiPath client
3133
http_client=self.uipath_sync_client,
3234
)
3335
self.async_client = AsyncOpenAI(
3436
api_key="PLACEHOLDER",
3537
timeout=None, # handled by the UiPath client
36-
max_retries=1, # handled by the UiPath client
38+
max_retries=0, # handled by the UiPath client
3739
http_client=self.uipath_async_client,
3840
)
3941
return self

packages/uipath_langchain_client/src/uipath_langchain_client/clients/fireworks/utils.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)