fairo 25.7.2__tar.gz → 25.7.3__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.
Potentially problematic release.
This version of fairo might be problematic. Click here for more details.
- {fairo-25.7.2 → fairo-25.7.3}/PKG-INFO +1 -1
- fairo-25.7.3/fairo/__init__.py +1 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/chat/chat.py +39 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo.egg-info/PKG-INFO +1 -1
- fairo-25.7.2/fairo/__init__.py +0 -1
- {fairo-25.7.2 → fairo-25.7.3}/README.md +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/__init__.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/agent/__init__.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/agent/base_agent.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/agent/code_analysis_agent.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/agent/output/__init__.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/agent/output/base_output.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/agent/output/google_drive.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/agent/tools/__init__.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/agent/tools/base_tools.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/agent/tools/code_analysis.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/agent/tools/utils.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/agent/utils.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/chat/__init__.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/client/__init__.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/client/client.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/exceptions.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/execution/__init__.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/execution/agent_serializer.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/execution/env_finder.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/execution/executor.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/execution/model_log_helper.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/models/__init__.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/models/custom_field_value.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/models/resources.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/runnable/__init__.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/runnable/runnable.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/workflow/__init__.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/workflow/base_workflow.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/workflow/dependency.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/core/workflow/utils.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/metrics/__init__.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/metrics/fairness_object.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/metrics/metrics.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/settings.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/tests/__init__.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo/tests/test_metrics.py +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo.egg-info/SOURCES.txt +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo.egg-info/dependency_links.txt +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo.egg-info/requires.txt +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/fairo.egg-info/top_level.txt +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/pyproject.toml +0 -0
- {fairo-25.7.2 → fairo-25.7.3}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "25.7.3"
|
|
@@ -205,6 +205,45 @@ class ChatFairo(ChatMlflow):
|
|
|
205
205
|
self.target_uri = self._target_uri
|
|
206
206
|
self._client = FairoDeploymentClient(self.target_uri, self.endpoint)
|
|
207
207
|
return super().invoke(*args, **kwargs)
|
|
208
|
+
|
|
209
|
+
def stream(self, *args, **kwargs):
|
|
210
|
+
# Override stream to use dynamic target_uri
|
|
211
|
+
self.target_uri = self._target_uri
|
|
212
|
+
self._client = FairoDeploymentClient(self.target_uri, self.endpoint)
|
|
213
|
+
return super().stream(*args, **kwargs)
|
|
214
|
+
|
|
215
|
+
def bind_tools(self, tools, **kwargs):
|
|
216
|
+
result = super().bind_tools(tools, **kwargs)
|
|
217
|
+
result._uses_tools = True
|
|
218
|
+
return result
|
|
219
|
+
|
|
220
|
+
def _stream(self, *args, **kwargs):
|
|
221
|
+
response = self.invoke(*args, **kwargs)
|
|
222
|
+
|
|
223
|
+
from langchain_core.messages import AIMessage, AIMessageChunk
|
|
224
|
+
from langchain_core.outputs import ChatGenerationChunk
|
|
225
|
+
|
|
226
|
+
if isinstance(response, AIMessage):
|
|
227
|
+
initial_chunk = AIMessageChunk(content="", role="assistant")
|
|
228
|
+
yield ChatGenerationChunk(message=initial_chunk)
|
|
229
|
+
|
|
230
|
+
if response.content:
|
|
231
|
+
content_chunk = AIMessageChunk(content=response.content, role="assistant")
|
|
232
|
+
yield ChatGenerationChunk(message=content_chunk)
|
|
233
|
+
|
|
234
|
+
if hasattr(response, 'tool_calls') and response.tool_calls:
|
|
235
|
+
tool_chunk = AIMessageChunk(
|
|
236
|
+
content="",
|
|
237
|
+
role="assistant",
|
|
238
|
+
tool_calls=response.tool_calls
|
|
239
|
+
)
|
|
240
|
+
yield ChatGenerationChunk(message=tool_chunk)
|
|
241
|
+
else:
|
|
242
|
+
final_chunk = AIMessageChunk(content="", role="assistant")
|
|
243
|
+
yield ChatGenerationChunk(message=final_chunk)
|
|
244
|
+
else:
|
|
245
|
+
chunk = AIMessageChunk(content=str(response), role="assistant")
|
|
246
|
+
yield ChatGenerationChunk(message=chunk)
|
|
208
247
|
|
|
209
248
|
|
|
210
249
|
class FairoChat(ChatMlflow):
|
fairo-25.7.2/fairo/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "25.7.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|