fairo 25.7.2__tar.gz → 25.7.4__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.

Files changed (48) hide show
  1. {fairo-25.7.2 → fairo-25.7.4}/PKG-INFO +1 -1
  2. fairo-25.7.4/fairo/__init__.py +1 -0
  3. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/chat/chat.py +39 -0
  4. {fairo-25.7.2 → fairo-25.7.4}/fairo.egg-info/PKG-INFO +1 -1
  5. fairo-25.7.2/fairo/__init__.py +0 -1
  6. {fairo-25.7.2 → fairo-25.7.4}/README.md +0 -0
  7. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/__init__.py +0 -0
  8. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/agent/__init__.py +0 -0
  9. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/agent/base_agent.py +0 -0
  10. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/agent/code_analysis_agent.py +0 -0
  11. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/agent/output/__init__.py +0 -0
  12. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/agent/output/base_output.py +0 -0
  13. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/agent/output/google_drive.py +0 -0
  14. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/agent/tools/__init__.py +0 -0
  15. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/agent/tools/base_tools.py +0 -0
  16. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/agent/tools/code_analysis.py +0 -0
  17. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/agent/tools/utils.py +0 -0
  18. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/agent/utils.py +0 -0
  19. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/chat/__init__.py +0 -0
  20. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/client/__init__.py +0 -0
  21. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/client/client.py +0 -0
  22. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/exceptions.py +0 -0
  23. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/execution/__init__.py +0 -0
  24. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/execution/agent_serializer.py +0 -0
  25. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/execution/env_finder.py +0 -0
  26. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/execution/executor.py +0 -0
  27. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/execution/model_log_helper.py +0 -0
  28. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/models/__init__.py +0 -0
  29. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/models/custom_field_value.py +0 -0
  30. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/models/resources.py +0 -0
  31. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/runnable/__init__.py +0 -0
  32. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/runnable/runnable.py +0 -0
  33. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/workflow/__init__.py +0 -0
  34. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/workflow/base_workflow.py +0 -0
  35. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/workflow/dependency.py +0 -0
  36. {fairo-25.7.2 → fairo-25.7.4}/fairo/core/workflow/utils.py +0 -0
  37. {fairo-25.7.2 → fairo-25.7.4}/fairo/metrics/__init__.py +0 -0
  38. {fairo-25.7.2 → fairo-25.7.4}/fairo/metrics/fairness_object.py +0 -0
  39. {fairo-25.7.2 → fairo-25.7.4}/fairo/metrics/metrics.py +0 -0
  40. {fairo-25.7.2 → fairo-25.7.4}/fairo/settings.py +0 -0
  41. {fairo-25.7.2 → fairo-25.7.4}/fairo/tests/__init__.py +0 -0
  42. {fairo-25.7.2 → fairo-25.7.4}/fairo/tests/test_metrics.py +0 -0
  43. {fairo-25.7.2 → fairo-25.7.4}/fairo.egg-info/SOURCES.txt +0 -0
  44. {fairo-25.7.2 → fairo-25.7.4}/fairo.egg-info/dependency_links.txt +0 -0
  45. {fairo-25.7.2 → fairo-25.7.4}/fairo.egg-info/requires.txt +0 -0
  46. {fairo-25.7.2 → fairo-25.7.4}/fairo.egg-info/top_level.txt +0 -0
  47. {fairo-25.7.2 → fairo-25.7.4}/pyproject.toml +0 -0
  48. {fairo-25.7.2 → fairo-25.7.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fairo
3
- Version: 25.7.2
3
+ Version: 25.7.4
4
4
  Summary: SDK for interfacing with Fairo SaaS platform.
5
5
  Author-email: "Fairo Systems, Inc." <support@fairo.ai>
6
6
  License: Apache-2.0
@@ -0,0 +1 @@
1
+ __version__ = "25.7.4"
@@ -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):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fairo
3
- Version: 25.7.2
3
+ Version: 25.7.4
4
4
  Summary: SDK for interfacing with Fairo SaaS platform.
5
5
  Author-email: "Fairo Systems, Inc." <support@fairo.ai>
6
6
  License: Apache-2.0
@@ -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