seekrai 0.5.25__py3-none-any.whl → 0.5.26__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.
@@ -20,7 +20,7 @@ class ChatCompletions:
20
20
  def create(
21
21
  self,
22
22
  *,
23
- messages: List[Dict[str, str]],
23
+ messages: List[Dict[str, Any]],
24
24
  model: str,
25
25
  max_completion_tokens: int | None = None,
26
26
  max_tokens: int | None = 512,
@@ -43,8 +43,11 @@ class ChatCompletions:
43
43
  Method to generate completions based on a given prompt using a specified model.
44
44
 
45
45
  Args:
46
- messages (List[Dict[str, str]]): A list of messages in the format
47
- `[{"role": seekrai.types.chat_completions.MessageRole, "content": TEXT}, ...]`
46
+ messages (List[Dict[str, Any]]): A list of messages in the format
47
+ `[{"role": seekrai.types.chat_completions.MessageRole, "content": TEXT}, ...]` or
48
+ `[{"role": seekrai.types.chat_completions.MessageRole, "content": PARTS}, ...]`
49
+ where PARTS is a list of content dicts, e.g. {"type": "text", "text": "..."} or
50
+ {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}}
48
51
  model (str): The name of the model to query.
49
52
  max_completion_tokens (int, optional): The maximum number of tokens the output can contain.
50
53
  max_tokens (int, optional): The maximum number of tokens to generate.
@@ -141,7 +144,7 @@ class AsyncChatCompletions:
141
144
  async def create(
142
145
  self,
143
146
  *,
144
- messages: List[Dict[str, str]],
147
+ messages: List[Dict[str, Any]],
145
148
  model: str,
146
149
  max_completion_tokens: int | None = None,
147
150
  max_tokens: int | None = 512,
@@ -164,8 +167,11 @@ class AsyncChatCompletions:
164
167
  Async method to generate completions based on a given prompt using a specified model.
165
168
 
166
169
  Args:
167
- messages (List[Dict[str, str]]): A list of messages in the format
168
- `[{"role": seekrai.types.chat_completions.MessageRole, "content": TEXT}, ...]`
170
+ messages (List[Dict[str, Any]]): A list of messages in the format
171
+ `[{"role": seekrai.types.chat_completions.MessageRole, "content": TEXT}, ...]` or
172
+ `[{"role": seekrai.types.chat_completions.MessageRole, "content": PARTS}, ...]`
173
+ where PARTS is a list of content dicts, e.g. {"type": "text", "text": "..."} or
174
+ {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}}
169
175
  model (str): The name of the model to query.
170
176
  max_completion_tokens (int, optional): The maximum number of tokens the output can contain.
171
177
  max_tokens (int, optional): The maximum number of tokens to generate.
@@ -40,7 +40,7 @@ class ToolCalls(BaseModel):
40
40
 
41
41
  class ChatCompletionMessage(BaseModel):
42
42
  role: MessageRole
43
- content: str | None = None
43
+ content: str | List[Dict[str, Any]] | None = None
44
44
  # tool_calls: List[ToolCalls] | None = None
45
45
 
46
46
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seekrai
3
- Version: 0.5.25
3
+ Version: 0.5.26
4
4
  Summary: Python client for SeekrAI
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -15,7 +15,7 @@ seekrai/resources/agents/python_functions.py,sha256=VL1JSsPP5nN1m8I0Ihe3AYlb8TMR
15
15
  seekrai/resources/agents/threads.py,sha256=BwZ2_6wlezsb12PQjEw1fgdJh5S83SPgD6qZQoGvyIM,14544
16
16
  seekrai/resources/alignment.py,sha256=htpwu41NPOb_3aAM6fCilVBcEXlzIYF_req-Cf6OrpI,19627
17
17
  seekrai/resources/chat/__init__.py,sha256=KmtPupgECtEN80NyvcnSmieTAFXhwmVxhMHP0qhspA4,618
18
- seekrai/resources/chat/completions.py,sha256=-nFk5aL1ejZ9WUi_ksDHqCnEnT2CjPX-RaigT3N35gA,12317
18
+ seekrai/resources/chat/completions.py,sha256=DN3xSzDFJFOa8iU-E38NNFb5Ax0XLv4U5QatQiMS9Ig,12887
19
19
  seekrai/resources/completions.py,sha256=JhTN_lW2mblfHHONFmPC7QZei3wo5vx6GliMs9FkbOY,8452
20
20
  seekrai/resources/deployments.py,sha256=DY7IN7QgqDduCHGNuHENSVwrE5PXFL88jWgh8SES7Qk,5970
21
21
  seekrai/resources/embeddings.py,sha256=7G-VisYrT9J35-hcKB8cXhs8BSi93IfveQKfVSC7diA,2585
@@ -50,7 +50,7 @@ seekrai/types/agents/tools/schemas/web_search_env.py,sha256=R3fGXV43ZacbgoSy-M43
50
50
  seekrai/types/agents/tools/tool.py,sha256=XdbYzSn0Rr-m9s34Aa1NDQ-35Kpzk4rcaXY3dKrg-Ys,514
51
51
  seekrai/types/agents/tools/tool_types.py,sha256=1tF_kE6Z_zzuZpOAK1HrHsHkXFPEoK0PdYv-pbTLfkY,360
52
52
  seekrai/types/alignment.py,sha256=nWcc4kQLs40-T0_HC3MnGkLd-StwBvwCXQrjUVJ5dEI,2973
53
- seekrai/types/chat_completions.py,sha256=Z7H1MkMgb4O0O5LDMKotQqhjGVCYk5eBeZ8n--RJpf8,3736
53
+ seekrai/types/chat_completions.py,sha256=-ganbaf5wDlNIj6zWGjcmkCwTIoCUthyVO9vuBcQiwk,3759
54
54
  seekrai/types/common.py,sha256=YI1pE-i_lDLU2o6FjoINdIhPXsV9lUl2MeAg2aRtT-M,2062
55
55
  seekrai/types/completions.py,sha256=lm9AFdZR3Xg5AHPkV-qETHikkwMJmkHrLGr5GG-YR-M,2171
56
56
  seekrai/types/deployments.py,sha256=a0zew1DuB9vPQXcBT2R4Tdn_8z5qleh6V6i4T4xyYZo,1798
@@ -72,8 +72,8 @@ seekrai/utils/api_helpers.py,sha256=0Y8BblNIr9h_R12zdmhkxgTlxgoRkbq84QNi4nNWGu8,
72
72
  seekrai/utils/files.py,sha256=7ixn_hgV-6pEhYqLyOp-EN0o8c1CzUwJzX9n3PQ5oqo,7164
73
73
  seekrai/utils/tools.py,sha256=jgJTL-dOIouDbEJLdQpQfpXhqaz_poQYS52adyUtBjo,1781
74
74
  seekrai/version.py,sha256=q6iGQVFor8zXiPP5F-3vy9TndOxKv5JXbaNJ2kdOQws,125
75
- seekrai-0.5.25.dist-info/METADATA,sha256=SWvIVZI3Tb-_0QVntTa7DoRoqHYPsXOSCfhEl5fSn4M,4788
76
- seekrai-0.5.25.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
77
- seekrai-0.5.25.dist-info/entry_points.txt,sha256=N49yOEGi1sK7Xr13F_rkkcOxQ88suyiMoOmRhUHTZ_U,48
78
- seekrai-0.5.25.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
79
- seekrai-0.5.25.dist-info/RECORD,,
75
+ seekrai-0.5.26.dist-info/METADATA,sha256=6DxW3YlPHwJzM0fCH7ly9xq3xjjn3EloDfb9OMVNuuY,4788
76
+ seekrai-0.5.26.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
77
+ seekrai-0.5.26.dist-info/entry_points.txt,sha256=N49yOEGi1sK7Xr13F_rkkcOxQ88suyiMoOmRhUHTZ_U,48
78
+ seekrai-0.5.26.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
79
+ seekrai-0.5.26.dist-info/RECORD,,