aisberg 0.2.2__tar.gz → 0.2.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.
Files changed (45) hide show
  1. {aisberg-0.2.2/aisberg.egg-info → aisberg-0.2.3}/PKG-INFO +1 -1
  2. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/models/chat.py +3 -1
  3. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/modules/s3.py +1 -1
  4. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/utils.py +3 -0
  5. {aisberg-0.2.2 → aisberg-0.2.3/aisberg.egg-info}/PKG-INFO +1 -1
  6. {aisberg-0.2.2 → aisberg-0.2.3}/pyproject.toml +1 -1
  7. {aisberg-0.2.2 → aisberg-0.2.3}/LICENSE +0 -0
  8. {aisberg-0.2.2 → aisberg-0.2.3}/MANIFEST.in +0 -0
  9. {aisberg-0.2.2 → aisberg-0.2.3}/README.md +0 -0
  10. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/__init__.py +0 -0
  11. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/abstract/__init__.py +0 -0
  12. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/abstract/modules.py +0 -0
  13. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/api/__init__.py +0 -0
  14. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/api/async_endpoints.py +0 -0
  15. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/api/endpoints.py +0 -0
  16. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/async_client.py +0 -0
  17. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/client.py +0 -0
  18. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/config.py +0 -0
  19. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/exceptions.py +0 -0
  20. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/models/__init__.py +0 -0
  21. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/models/collections.py +0 -0
  22. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/models/documents.py +0 -0
  23. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/models/embeddings.py +0 -0
  24. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/models/models.py +0 -0
  25. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/models/requests.py +0 -0
  26. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/models/token.py +0 -0
  27. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/models/tools.py +0 -0
  28. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/models/workflows.py +0 -0
  29. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/modules/__init__.py +0 -0
  30. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/modules/chat.py +0 -0
  31. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/modules/collections.py +0 -0
  32. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/modules/documents.py +0 -0
  33. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/modules/embeddings.py +0 -0
  34. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/modules/me.py +0 -0
  35. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/modules/models.py +0 -0
  36. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/modules/tools.py +0 -0
  37. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/modules/workflows.py +0 -0
  38. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/requests/__init__.py +0 -0
  39. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/requests/async_requests.py +0 -0
  40. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg/requests/sync_requests.py +0 -0
  41. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg.egg-info/SOURCES.txt +0 -0
  42. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg.egg-info/dependency_links.txt +0 -0
  43. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg.egg-info/requires.txt +0 -0
  44. {aisberg-0.2.2 → aisberg-0.2.3}/aisberg.egg-info/top_level.txt +0 -0
  45. {aisberg-0.2.2 → aisberg-0.2.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aisberg
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Aisberg SDK for Python - A simple and powerful SDK to interact with the Aisberg API
5
5
  Author: Free Pro
6
6
  Author-email: Mathis Lambert <mathis.lambert@freepro.com>
@@ -138,6 +138,8 @@ def format_messages(input: LanguageModelInput) -> list[dict]:
138
138
  else:
139
139
  messages = [parse_message(msg) for msg in input]
140
140
  return [
141
- msg.model_dump(include={"role", "content", "tool_calls", "tool_call_id"})
141
+ msg.model_dump(
142
+ include={"role", "content", "tool_calls", "tool_call_id"}, exclude_none=True
143
+ )
142
144
  for msg in messages
143
145
  ]
@@ -111,7 +111,7 @@ class BaseS3Module(ABC):
111
111
  return file_size, metadata
112
112
 
113
113
  @staticmethod
114
- def _get_object_name(self, file, object_name):
114
+ def _get_object_name(file, object_name):
115
115
  return object_name or (file if isinstance(file, str) else "default_object_name")
116
116
 
117
117
  @abstractmethod
@@ -28,6 +28,9 @@ def parse_chat_line(
28
28
  if chunk["object"] != "chat.completion.chunk":
29
29
  raise ValueError(f"Unexpected object type: {chunk['object']}")
30
30
 
31
+ if not chunk.get("choices", []):
32
+ return
33
+
31
34
  if chunk["choices"][0]["finish_reason"] == "stop":
32
35
  return
33
36
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aisberg
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Aisberg SDK for Python - A simple and powerful SDK to interact with the Aisberg API
5
5
  Author: Free Pro
6
6
  Author-email: Mathis Lambert <mathis.lambert@freepro.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "aisberg"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  description = "Aisberg SDK for Python - A simple and powerful SDK to interact with the Aisberg API"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
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