fairo 25.9.2__tar.gz → 25.9.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.

Files changed (53) hide show
  1. {fairo-25.9.2 → fairo-25.9.3}/PKG-INFO +1 -1
  2. fairo-25.9.3/fairo/__init__.py +1 -0
  3. fairo-25.9.3/fairo/core/utils.py +54 -0
  4. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/workflow/dependency.py +0 -3
  5. {fairo-25.9.2 → fairo-25.9.3}/fairo.egg-info/PKG-INFO +1 -1
  6. fairo-25.9.2/fairo/__init__.py +0 -1
  7. fairo-25.9.2/fairo/core/utils.py +0 -28
  8. {fairo-25.9.2 → fairo-25.9.3}/README.md +0 -0
  9. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/__init__.py +0 -0
  10. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/agent/__init__.py +0 -0
  11. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/agent/base_agent.py +0 -0
  12. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/agent/code_analysis_agent.py +0 -0
  13. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/agent/output/__init__.py +0 -0
  14. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/agent/output/base_output.py +0 -0
  15. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/agent/output/google_drive.py +0 -0
  16. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/agent/tools/__init__.py +0 -0
  17. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/agent/tools/base_tools.py +0 -0
  18. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/agent/tools/code_analysis.py +0 -0
  19. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/agent/tools/utils.py +0 -0
  20. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/agent/utils.py +0 -0
  21. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/chat/__init__.py +0 -0
  22. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/chat/chat.py +0 -0
  23. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/client/__init__.py +0 -0
  24. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/client/client.py +0 -0
  25. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/exceptions.py +0 -0
  26. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/execution/__init__.py +0 -0
  27. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/execution/agent_serializer.py +0 -0
  28. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/execution/env_finder.py +0 -0
  29. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/execution/executor.py +0 -0
  30. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/execution/model_log_helper.py +0 -0
  31. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/models/__init__.py +0 -0
  32. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/models/custom_field_value.py +0 -0
  33. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/models/resources.py +0 -0
  34. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/runnable/__init__.py +0 -0
  35. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/runnable/runnable.py +0 -0
  36. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/tools/__init__.py +0 -0
  37. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/tools/plot.py +0 -0
  38. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/tools/suggestion.py +0 -0
  39. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/workflow/__init__.py +0 -0
  40. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/workflow/base_workflow.py +0 -0
  41. {fairo-25.9.2 → fairo-25.9.3}/fairo/core/workflow/utils.py +0 -0
  42. {fairo-25.9.2 → fairo-25.9.3}/fairo/metrics/__init__.py +0 -0
  43. {fairo-25.9.2 → fairo-25.9.3}/fairo/metrics/fairness_object.py +0 -0
  44. {fairo-25.9.2 → fairo-25.9.3}/fairo/metrics/metrics.py +0 -0
  45. {fairo-25.9.2 → fairo-25.9.3}/fairo/settings.py +0 -0
  46. {fairo-25.9.2 → fairo-25.9.3}/fairo/tests/__init__.py +0 -0
  47. {fairo-25.9.2 → fairo-25.9.3}/fairo/tests/test_metrics.py +0 -0
  48. {fairo-25.9.2 → fairo-25.9.3}/fairo.egg-info/SOURCES.txt +0 -0
  49. {fairo-25.9.2 → fairo-25.9.3}/fairo.egg-info/dependency_links.txt +0 -0
  50. {fairo-25.9.2 → fairo-25.9.3}/fairo.egg-info/requires.txt +0 -0
  51. {fairo-25.9.2 → fairo-25.9.3}/fairo.egg-info/top_level.txt +0 -0
  52. {fairo-25.9.2 → fairo-25.9.3}/pyproject.toml +0 -0
  53. {fairo-25.9.2 → fairo-25.9.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fairo
3
- Version: 25.9.2
3
+ Version: 25.9.3
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.9.3"
@@ -0,0 +1,54 @@
1
+ import os
2
+ from langchain_core.messages import ToolMessage
3
+ from pathlib import Path
4
+
5
+ def parse_chat_interface_output(agent_executor_result):
6
+ """
7
+ Parses agent executor result into chat interface response
8
+ return_intermediate_steps must be set as true on the AgentExecutor in order to properly parse plot and suggestions
9
+ """
10
+ messages = [{"role": "assistant", "content": [
11
+ {
12
+ "type": "text",
13
+ "text": agent_executor_result["output"]
14
+ }
15
+ ]}]
16
+ suggestions = []
17
+ intermediate_steps = agent_executor_result.get('intermediate_steps', [])
18
+ for step, output in intermediate_steps:
19
+ if step.tool == "generate_plot":
20
+ messages.append({"role": "assistant", "content": [
21
+ {
22
+ "type": "image",
23
+ "image": output
24
+ }
25
+ ]})
26
+ if step.tool == "send_chat_suggestions":
27
+ suggestions = output
28
+
29
+ # Check if some tool message has artifact and raw_html attribute
30
+ artifact = None
31
+ is_tool_msg = isinstance(output, ToolMessage)
32
+ if is_tool_msg:
33
+ artifact = getattr(output, "artifact", None)
34
+ if artifact is None:
35
+ artifact = getattr(output, "additional_kwargs", {}).get("artifact")
36
+ if artifact:
37
+ artifact_id = artifact.get("artifact_id")
38
+ if artifact_id:
39
+ base_dir = Path("/tmp") if Path("/tmp").exists() else Path.cwd()
40
+ artifact_path = base_dir / f"{artifact_id}.html"
41
+ messages.append({
42
+ "role": "assistant",
43
+ "content": [{
44
+ "type": "file",
45
+ "mimeType": "text/html",
46
+ "data": artifact_path.read_text(encoding="utf-8")
47
+ }]
48
+ })
49
+ if os.path.exists(artifact_path):
50
+ os.remove(artifact_path)
51
+ return {
52
+ "messages": messages,
53
+ "suggestions": suggestions
54
+ }
@@ -122,9 +122,6 @@ class FairoVectorStore(BaseVectorStore):
122
122
  # Convert documents to Fairo format
123
123
  docs_data = []
124
124
  for doc in documents:
125
- # Generate embeddings for the document content
126
- embedding = self.embeddings.embed_query(doc.page_content)
127
-
128
125
  # Create doc entry (let Fairo API generate document IDs)
129
126
  doc_entry = {
130
127
  "page_content": doc.page_content,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fairo
3
- Version: 25.9.2
3
+ Version: 25.9.3
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.9.2"
@@ -1,28 +0,0 @@
1
- def parse_chat_interface_output(agent_executor_result):
2
- """
3
- Parses agent executor result into chat interface response
4
- return_intermediate_steps must be set as true on the AgentExecutor in order to properly parse plot and suggestions
5
- """
6
- messages = [{"role": "assistant", "content": [
7
- {
8
- "type": "text",
9
- "text": agent_executor_result["output"]
10
- }
11
- ]}]
12
- suggestions = []
13
- intermediate_steps = agent_executor_result.get('intermediate_steps', [])
14
- for step, output in intermediate_steps:
15
- if step.tool == "generate_plot":
16
- messages.append({"role": "assistant", "content": [
17
- {
18
- "type": "image",
19
- "image": output
20
- }
21
- ]})
22
- if step.tool == "send_chat_suggestions":
23
- suggestions = output
24
-
25
- return {
26
- "messages": messages,
27
- "suggestions": suggestions
28
- }
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