seekrai 0.5.7__py3-none-any.whl → 0.5.9__py3-none-any.whl

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.
@@ -112,11 +112,10 @@ class ChatCompletions:
112
112
  n=n,
113
113
  safety_model=safety_model,
114
114
  response_format=response_format,
115
- tools=tools or [],
115
+ tools=tools or None,
116
116
  ).model_dump()
117
117
  if tool_choice is not None:
118
118
  parameter_payload["tool_choice"] = tool_choice
119
-
120
119
  response, _, _ = requestor.request(
121
120
  options=SeekrFlowRequest(
122
121
  method="POST",
@@ -158,8 +157,8 @@ class AsyncChatCompletions:
158
157
  n: int = 1,
159
158
  safety_model: str | None = None,
160
159
  response_format: Dict[str, str | Dict[str, Any]] | None = None,
161
- # tools: Dict[str, str | Dict[str, Any]] | None = None,
162
- # tool_choice: str | Dict[str, str | Dict[str, str]] | None = None,
160
+ tools: Dict[str, str | Dict[str, Any]] | None = None,
161
+ tool_choice: str | Dict[str, str | Dict[str, str]] | None = None,
163
162
  ) -> AsyncGenerator[ChatCompletionChunk, None] | ChatCompletionResponse:
164
163
  """
165
164
  Async method to generate completions based on a given prompt using a specified model.
@@ -235,9 +234,10 @@ class AsyncChatCompletions:
235
234
  n=n,
236
235
  safety_model=safety_model,
237
236
  response_format=response_format,
238
- # tools=tools,
239
- # tool_choice=tool_choice,
237
+ tools=tools or None,
240
238
  ).model_dump()
239
+ if tool_choice is not None:
240
+ parameter_payload["tool_choice"] = tool_choice
241
241
 
242
242
  response, _, _ = await requestor.arequest(
243
243
  options=SeekrFlowRequest(
@@ -29,7 +29,6 @@ class Embeddings(ResourceBase):
29
29
  Returns:
30
30
  EmbeddingResponse: Object containing embeddings
31
31
  """
32
- raise NotImplementedError("Function not implemented yet")
33
32
 
34
33
  requestor = api_requestor.APIRequestor(
35
34
  client=self._client,
@@ -45,6 +44,7 @@ class Embeddings(ResourceBase):
45
44
  method="POST",
46
45
  url="inference/embeddings",
47
46
  params=parameter_payload,
47
+ headers={"content-type": "application/json"},
48
48
  ),
49
49
  stream=False,
50
50
  )
@@ -71,7 +71,6 @@ class AsyncEmbeddings(ResourceBase):
71
71
  Returns:
72
72
  EmbeddingResponse: Object containing embeddings
73
73
  """
74
- raise NotImplementedError("Function not implemented yet")
75
74
 
76
75
  requestor = api_requestor.APIRequestor(
77
76
  client=self._client,
@@ -87,6 +86,7 @@ class AsyncEmbeddings(ResourceBase):
87
86
  method="POST",
88
87
  url="inference/embeddings",
89
88
  params=parameter_payload,
89
+ headers={"content-type": "application/json"},
90
90
  ),
91
91
  stream=False,
92
92
  )
seekrai/types/finetune.py CHANGED
@@ -4,6 +4,8 @@ from datetime import datetime
4
4
  from enum import Enum
5
5
  from typing import List, Literal, Optional
6
6
 
7
+ from pydantic import Field
8
+
7
9
  from seekrai.types.abstract import BaseModel
8
10
  from seekrai.types.common import (
9
11
  ObjectType,
@@ -103,7 +105,7 @@ class TrainingConfig(BaseModel):
103
105
  # number of checkpoints to save
104
106
  n_checkpoints: int | None = None
105
107
  # training batch size
106
- batch_size: int | None = None
108
+ batch_size: int = Field(..., ge=1, le=1024)
107
109
  # up to 40 character suffix for output model name
108
110
  experiment_name: str | None = None
109
111
  # # weights & biases api key
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: seekrai
3
- Version: 0.5.7
3
+ Version: 0.5.9
4
4
  Summary: Python client for SeekrAI
5
5
  License: Apache-2.0
6
6
  Author: SeekrFlow
@@ -17,10 +17,10 @@ Classifier: Programming Language :: Python :: 3.13
17
17
  Requires-Dist: click (>=8.1.7,<9.0.0)
18
18
  Requires-Dist: eval-type-backport (>=0.1.3,<0.3.0)
19
19
  Requires-Dist: filelock (>=3.13.1,<4.0.0)
20
- Requires-Dist: httpx[http2] (>=0.28.0,<0.29.0)
20
+ Requires-Dist: httpx[http2] (>=0.27.0,<0.28.0)
21
21
  Requires-Dist: numpy (>=1.23.5) ; python_version < "3.12"
22
22
  Requires-Dist: numpy (>=1.26.0) ; python_version >= "3.12"
23
- Requires-Dist: pillow (>=10.2.0,<11.0.0)
23
+ Requires-Dist: pillow (>=10.3.0,<11.0.0)
24
24
  Requires-Dist: pyarrow (>=10.0.1)
25
25
  Requires-Dist: pydantic (>=2.7,<3.0)
26
26
  Requires-Dist: requests (>=2.31.0,<3.0.0)
@@ -13,10 +13,10 @@ seekrai/resources/agents/agents.py,sha256=d3C4VaXq4q5WlUr0f8txdRD3hvEKKvz4UQA-a_
13
13
  seekrai/resources/agents/threads.py,sha256=BwZ2_6wlezsb12PQjEw1fgdJh5S83SPgD6qZQoGvyIM,14544
14
14
  seekrai/resources/alignment.py,sha256=IOKlKK2I9_NhS9pwcrsd9-5OO7lVT8Uw0y_wuGHOnyA,5839
15
15
  seekrai/resources/chat/__init__.py,sha256=KmtPupgECtEN80NyvcnSmieTAFXhwmVxhMHP0qhspA4,618
16
- seekrai/resources/chat/completions.py,sha256=QcNsZqpJjkbiD_dN9fGBw8hgb_hLiHUqoMzHV_vtkqQ,12258
16
+ seekrai/resources/chat/completions.py,sha256=-nFk5aL1ejZ9WUi_ksDHqCnEnT2CjPX-RaigT3N35gA,12317
17
17
  seekrai/resources/completions.py,sha256=JhTN_lW2mblfHHONFmPC7QZei3wo5vx6GliMs9FkbOY,8452
18
18
  seekrai/resources/deployments.py,sha256=DY7IN7QgqDduCHGNuHENSVwrE5PXFL88jWgh8SES7Qk,5970
19
- seekrai/resources/embeddings.py,sha256=UMVb6LIJn8KFACMajVRL3SY88bbZl1aQ2Sx5MdT1sQQ,2593
19
+ seekrai/resources/embeddings.py,sha256=7G-VisYrT9J35-hcKB8cXhs8BSi93IfveQKfVSC7diA,2585
20
20
  seekrai/resources/explainability.py,sha256=HAFxrPIvaYQxexGk8VPO1R67yDbSB6CqVly0ZY_dQcQ,3495
21
21
  seekrai/resources/files.py,sha256=bEn4jfYWfsI2OqKRGCUpnefIN-udNnafItgT2A7m-e4,15329
22
22
  seekrai/resources/finetune.py,sha256=Aw8lU9TohZdJGOstex12gg2t-RDppOponnWg203Bn-Q,11304
@@ -53,7 +53,7 @@ seekrai/types/embeddings.py,sha256=OANoLNOs0aceS8NppVvvcNYQbF7-pAOAmcr30pw64OU,7
53
53
  seekrai/types/error.py,sha256=uTKISs9aRC4_6zwirtNkanxepN8KY-SqCq0kNbfZylQ,370
54
54
  seekrai/types/explainability.py,sha256=l9dp9DJ_GPkHzNw_3zwiGkpAWDETMDN8NSoymhKvdgc,1420
55
55
  seekrai/types/files.py,sha256=yjJYT8twY-cNh9AY9qlcN_moTeCfR0tJSSCQsOVB02Y,2708
56
- seekrai/types/finetune.py,sha256=n65WGm7mXqmJSyo1cb8IAbqpoygYCwDo7yGWPF39ayw,6393
56
+ seekrai/types/finetune.py,sha256=IcIaeaMVoITLApCB_h_TFYtQe2kOGDqZFCh9j77Vlgk,6435
57
57
  seekrai/types/images.py,sha256=Fusj8OhVYFsT8kz636lRGGivLbPXo_ZNgakKwmzJi3U,914
58
58
  seekrai/types/ingestion.py,sha256=uUdKOR4xqSfAXWQOR1UOltSlOnuyAwKVA1Q2a6Yslk8,919
59
59
  seekrai/types/models.py,sha256=9Z0nvLdlAfpF8mNRW5-IqBdDHoE-3qQ5przmIDJgwLo,1345
@@ -65,8 +65,8 @@ seekrai/utils/api_helpers.py,sha256=0Y8BblNIr9h_R12zdmhkxgTlxgoRkbq84QNi4nNWGu8,
65
65
  seekrai/utils/files.py,sha256=7ixn_hgV-6pEhYqLyOp-EN0o8c1CzUwJzX9n3PQ5oqo,7164
66
66
  seekrai/utils/tools.py,sha256=jgJTL-dOIouDbEJLdQpQfpXhqaz_poQYS52adyUtBjo,1781
67
67
  seekrai/version.py,sha256=q6iGQVFor8zXiPP5F-3vy9TndOxKv5JXbaNJ2kdOQws,125
68
- seekrai-0.5.7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
69
- seekrai-0.5.7.dist-info/METADATA,sha256=GJcD7w1B_U65lyKQ8CaxD9uYUi-55jXT2iiInLKxaac,4780
70
- seekrai-0.5.7.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
71
- seekrai-0.5.7.dist-info/entry_points.txt,sha256=N49yOEGi1sK7Xr13F_rkkcOxQ88suyiMoOmRhUHTZ_U,48
72
- seekrai-0.5.7.dist-info/RECORD,,
68
+ seekrai-0.5.9.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
69
+ seekrai-0.5.9.dist-info/METADATA,sha256=ZOnhU4QoIs5dAPLVX_zic81Zc5OZE0-EpkXad0iWJLc,4780
70
+ seekrai-0.5.9.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
71
+ seekrai-0.5.9.dist-info/entry_points.txt,sha256=N49yOEGi1sK7Xr13F_rkkcOxQ88suyiMoOmRhUHTZ_U,48
72
+ seekrai-0.5.9.dist-info/RECORD,,