fairo 25.7.3__tar.gz → 25.8.1__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.3 → fairo-25.8.1}/PKG-INFO +1 -1
  2. fairo-25.8.1/fairo/__init__.py +1 -0
  3. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/chat/chat.py +3 -0
  4. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/client/client.py +9 -2
  5. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/workflow/dependency.py +7 -6
  6. {fairo-25.7.3 → fairo-25.8.1}/fairo.egg-info/PKG-INFO +1 -1
  7. fairo-25.7.3/fairo/__init__.py +0 -1
  8. {fairo-25.7.3 → fairo-25.8.1}/README.md +0 -0
  9. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/__init__.py +0 -0
  10. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/agent/__init__.py +0 -0
  11. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/agent/base_agent.py +0 -0
  12. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/agent/code_analysis_agent.py +0 -0
  13. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/agent/output/__init__.py +0 -0
  14. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/agent/output/base_output.py +0 -0
  15. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/agent/output/google_drive.py +0 -0
  16. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/agent/tools/__init__.py +0 -0
  17. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/agent/tools/base_tools.py +0 -0
  18. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/agent/tools/code_analysis.py +0 -0
  19. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/agent/tools/utils.py +0 -0
  20. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/agent/utils.py +0 -0
  21. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/chat/__init__.py +0 -0
  22. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/client/__init__.py +0 -0
  23. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/exceptions.py +0 -0
  24. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/execution/__init__.py +0 -0
  25. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/execution/agent_serializer.py +0 -0
  26. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/execution/env_finder.py +0 -0
  27. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/execution/executor.py +0 -0
  28. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/execution/model_log_helper.py +0 -0
  29. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/models/__init__.py +0 -0
  30. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/models/custom_field_value.py +0 -0
  31. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/models/resources.py +0 -0
  32. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/runnable/__init__.py +0 -0
  33. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/runnable/runnable.py +0 -0
  34. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/workflow/__init__.py +0 -0
  35. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/workflow/base_workflow.py +0 -0
  36. {fairo-25.7.3 → fairo-25.8.1}/fairo/core/workflow/utils.py +0 -0
  37. {fairo-25.7.3 → fairo-25.8.1}/fairo/metrics/__init__.py +0 -0
  38. {fairo-25.7.3 → fairo-25.8.1}/fairo/metrics/fairness_object.py +0 -0
  39. {fairo-25.7.3 → fairo-25.8.1}/fairo/metrics/metrics.py +0 -0
  40. {fairo-25.7.3 → fairo-25.8.1}/fairo/settings.py +0 -0
  41. {fairo-25.7.3 → fairo-25.8.1}/fairo/tests/__init__.py +0 -0
  42. {fairo-25.7.3 → fairo-25.8.1}/fairo/tests/test_metrics.py +0 -0
  43. {fairo-25.7.3 → fairo-25.8.1}/fairo.egg-info/SOURCES.txt +0 -0
  44. {fairo-25.7.3 → fairo-25.8.1}/fairo.egg-info/dependency_links.txt +0 -0
  45. {fairo-25.7.3 → fairo-25.8.1}/fairo.egg-info/requires.txt +0 -0
  46. {fairo-25.7.3 → fairo-25.8.1}/fairo.egg-info/top_level.txt +0 -0
  47. {fairo-25.7.3 → fairo-25.8.1}/pyproject.toml +0 -0
  48. {fairo-25.7.3 → fairo-25.8.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fairo
3
- Version: 25.7.3
3
+ Version: 25.8.1
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.8.1"
@@ -122,6 +122,9 @@ class FairoDeploymentClient(BaseDeploymentClient):
122
122
  os.environ.get('MLFLOW_TRACKING_PASSWORD')
123
123
  )
124
124
 
125
+ if os.environ.get('MLFLOW_TRACKING_TOKEN'):
126
+ headers['Authorization'] = f"Bearer {os.environ.get('MLFLOW_TRACKING_TOKEN')}"
127
+
125
128
  # Make request
126
129
  response = requests.post(
127
130
  gateway_url,
@@ -3,10 +3,17 @@ import requests
3
3
  from requests.auth import HTTPBasicAuth
4
4
 
5
5
  class BaseClient:
6
- def __init__(self, base_url: str, username: str, password: str):
6
+ def __init__(self, base_url: str, username: str = None, password: str = None, fairo_auth_token: str = None):
7
7
  self.base_url = base_url
8
8
  self.session = requests.Session()
9
- self.session.auth = HTTPBasicAuth(username, password)
9
+ if username is not None and password is not None:
10
+ self.session.auth = HTTPBasicAuth(username, password)
11
+ elif fairo_auth_token is not None:
12
+ self.session.headers.update({
13
+ "Authorization": f"Bearer {fairo_auth_token}"
14
+ })
15
+ else:
16
+ raise ValueError("Must provide either username/password or fairo_auth_token")
10
17
  self.session.headers.update({
11
18
  "Content-Type": "application/json",
12
19
  })
@@ -185,15 +185,17 @@ class FairoVectorStore(BaseVectorStore):
185
185
  self.username = username or os.environ.get("FAIRO_API_ACCESS_KEY_ID")
186
186
  self.password = password or os.environ.get("FAIRO_API_SECRET")
187
187
  self.api_url = api_url or os.environ.get("FAIRO_BASE_URL", "https://api.fairo.ai")
188
+ self.fairo_auth_token = os.environ.get("FAIRO_AUTH_TOKEN")
188
189
 
189
- if not self.username or not self.password:
190
- raise ValueError("Fairo API credentials must be provided either as parameters or in the FAIRO_USERNAME and FAIRO_PASSWORD environment variables")
190
+ if not self.fairo_auth_token and (not self.username or not self.password):
191
+ raise ValueError("Fairo API credentials must be provided either as FAIRO_AUTH_TOKEN or as parameters or in the FAIRO_USERNAME and FAIRO_PASSWORD environment variables")
191
192
 
192
193
  # Initialize API client
193
194
  self.client = BaseClient(
194
195
  base_url=self.api_url.rstrip('/'),
195
196
  username=self.username,
196
- password=self.password
197
+ password=self.password,
198
+ fairo_auth_token=self.fairo_auth_token
197
199
  )
198
200
 
199
201
  # Set up embeddings
@@ -258,11 +260,10 @@ class FairoVectorStore(BaseVectorStore):
258
260
  # Generate embeddings for the document content
259
261
  embedding = self.embeddings.embed_query(doc.page_content)
260
262
 
261
- # Create doc entry
263
+ # Create doc entry (let Fairo API generate document IDs)
262
264
  doc_entry = {
263
265
  "page_content": doc.page_content,
264
- "metadata": doc.metadata,
265
- "uuid": str(uuid.uuid4()) # Generate a UUID for this document
266
+ "metadata": doc.metadata
266
267
  }
267
268
  docs_data.append(doc_entry)
268
269
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fairo
3
- Version: 25.7.3
3
+ Version: 25.8.1
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.3"
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