llama-stack 0.4.3__py3-none-any.whl → 0.4.4__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.
Files changed (166) hide show
  1. llama_stack/distributions/dell/doc_template.md +209 -0
  2. llama_stack/distributions/meta-reference-gpu/doc_template.md +119 -0
  3. llama_stack/distributions/nvidia/doc_template.md +170 -0
  4. llama_stack/distributions/oci/doc_template.md +140 -0
  5. llama_stack/models/llama/llama3/dog.jpg +0 -0
  6. llama_stack/models/llama/llama3/pasta.jpeg +0 -0
  7. llama_stack/models/llama/resources/dog.jpg +0 -0
  8. llama_stack/models/llama/resources/pasta.jpeg +0 -0
  9. llama_stack/models/llama/resources/small_dog.jpg +0 -0
  10. llama_stack/providers/inline/agents/meta_reference/responses/openai_responses.py +136 -11
  11. llama_stack/providers/inline/ios/inference/LocalInferenceImpl/LocalInference.h +9 -0
  12. llama_stack/providers/inline/ios/inference/LocalInferenceImpl/LocalInference.swift +189 -0
  13. llama_stack/providers/inline/ios/inference/LocalInferenceImpl/Parsing.swift +238 -0
  14. llama_stack/providers/inline/ios/inference/LocalInferenceImpl/PromptTemplate.swift +12 -0
  15. llama_stack/providers/inline/ios/inference/LocalInferenceImpl/SystemPrompts.swift +89 -0
  16. llama_stack/providers/inline/ios/inference/LocalInferenceImpl.xcodeproj/project.pbxproj +550 -0
  17. llama_stack/providers/inline/ios/inference/LocalInferenceImpl.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  18. llama_stack/providers/inline/ios/inference/LocalInferenceImpl.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  19. llama_stack/providers/remote/datasetio/nvidia/README.md +74 -0
  20. llama_stack/providers/remote/eval/nvidia/README.md +134 -0
  21. llama_stack/providers/remote/files/s3/README.md +266 -0
  22. llama_stack/providers/remote/inference/nvidia/NVIDIA.md +203 -0
  23. llama_stack/providers/remote/post_training/nvidia/README.md +151 -0
  24. llama_stack/providers/remote/safety/nvidia/README.md +78 -0
  25. llama_stack/providers/utils/responses/responses_store.py +34 -0
  26. {llama_stack-0.4.3.dist-info → llama_stack-0.4.4.dist-info}/METADATA +2 -2
  27. {llama_stack-0.4.3.dist-info → llama_stack-0.4.4.dist-info}/RECORD +31 -142
  28. llama_stack-0.4.4.dist-info/top_level.txt +1 -0
  29. llama_stack-0.4.3.dist-info/top_level.txt +0 -2
  30. llama_stack_api/__init__.py +0 -945
  31. llama_stack_api/admin/__init__.py +0 -45
  32. llama_stack_api/admin/api.py +0 -72
  33. llama_stack_api/admin/fastapi_routes.py +0 -117
  34. llama_stack_api/admin/models.py +0 -113
  35. llama_stack_api/agents.py +0 -173
  36. llama_stack_api/batches/__init__.py +0 -40
  37. llama_stack_api/batches/api.py +0 -53
  38. llama_stack_api/batches/fastapi_routes.py +0 -113
  39. llama_stack_api/batches/models.py +0 -78
  40. llama_stack_api/benchmarks/__init__.py +0 -43
  41. llama_stack_api/benchmarks/api.py +0 -39
  42. llama_stack_api/benchmarks/fastapi_routes.py +0 -109
  43. llama_stack_api/benchmarks/models.py +0 -109
  44. llama_stack_api/common/__init__.py +0 -5
  45. llama_stack_api/common/content_types.py +0 -101
  46. llama_stack_api/common/errors.py +0 -95
  47. llama_stack_api/common/job_types.py +0 -38
  48. llama_stack_api/common/responses.py +0 -77
  49. llama_stack_api/common/training_types.py +0 -47
  50. llama_stack_api/common/type_system.py +0 -146
  51. llama_stack_api/connectors.py +0 -146
  52. llama_stack_api/conversations.py +0 -270
  53. llama_stack_api/datasetio.py +0 -55
  54. llama_stack_api/datasets/__init__.py +0 -61
  55. llama_stack_api/datasets/api.py +0 -35
  56. llama_stack_api/datasets/fastapi_routes.py +0 -104
  57. llama_stack_api/datasets/models.py +0 -152
  58. llama_stack_api/datatypes.py +0 -373
  59. llama_stack_api/eval.py +0 -137
  60. llama_stack_api/file_processors/__init__.py +0 -27
  61. llama_stack_api/file_processors/api.py +0 -64
  62. llama_stack_api/file_processors/fastapi_routes.py +0 -78
  63. llama_stack_api/file_processors/models.py +0 -42
  64. llama_stack_api/files/__init__.py +0 -35
  65. llama_stack_api/files/api.py +0 -51
  66. llama_stack_api/files/fastapi_routes.py +0 -124
  67. llama_stack_api/files/models.py +0 -107
  68. llama_stack_api/inference.py +0 -1169
  69. llama_stack_api/inspect_api/__init__.py +0 -37
  70. llama_stack_api/inspect_api/api.py +0 -25
  71. llama_stack_api/inspect_api/fastapi_routes.py +0 -76
  72. llama_stack_api/inspect_api/models.py +0 -28
  73. llama_stack_api/internal/__init__.py +0 -9
  74. llama_stack_api/internal/kvstore.py +0 -28
  75. llama_stack_api/internal/sqlstore.py +0 -81
  76. llama_stack_api/llama_stack_api/__init__.py +0 -945
  77. llama_stack_api/llama_stack_api/admin/__init__.py +0 -45
  78. llama_stack_api/llama_stack_api/admin/api.py +0 -72
  79. llama_stack_api/llama_stack_api/admin/fastapi_routes.py +0 -117
  80. llama_stack_api/llama_stack_api/admin/models.py +0 -113
  81. llama_stack_api/llama_stack_api/agents.py +0 -173
  82. llama_stack_api/llama_stack_api/batches/__init__.py +0 -40
  83. llama_stack_api/llama_stack_api/batches/api.py +0 -53
  84. llama_stack_api/llama_stack_api/batches/fastapi_routes.py +0 -113
  85. llama_stack_api/llama_stack_api/batches/models.py +0 -78
  86. llama_stack_api/llama_stack_api/benchmarks/__init__.py +0 -43
  87. llama_stack_api/llama_stack_api/benchmarks/api.py +0 -39
  88. llama_stack_api/llama_stack_api/benchmarks/fastapi_routes.py +0 -109
  89. llama_stack_api/llama_stack_api/benchmarks/models.py +0 -109
  90. llama_stack_api/llama_stack_api/common/__init__.py +0 -5
  91. llama_stack_api/llama_stack_api/common/content_types.py +0 -101
  92. llama_stack_api/llama_stack_api/common/errors.py +0 -95
  93. llama_stack_api/llama_stack_api/common/job_types.py +0 -38
  94. llama_stack_api/llama_stack_api/common/responses.py +0 -77
  95. llama_stack_api/llama_stack_api/common/training_types.py +0 -47
  96. llama_stack_api/llama_stack_api/common/type_system.py +0 -146
  97. llama_stack_api/llama_stack_api/connectors.py +0 -146
  98. llama_stack_api/llama_stack_api/conversations.py +0 -270
  99. llama_stack_api/llama_stack_api/datasetio.py +0 -55
  100. llama_stack_api/llama_stack_api/datasets/__init__.py +0 -61
  101. llama_stack_api/llama_stack_api/datasets/api.py +0 -35
  102. llama_stack_api/llama_stack_api/datasets/fastapi_routes.py +0 -104
  103. llama_stack_api/llama_stack_api/datasets/models.py +0 -152
  104. llama_stack_api/llama_stack_api/datatypes.py +0 -373
  105. llama_stack_api/llama_stack_api/eval.py +0 -137
  106. llama_stack_api/llama_stack_api/file_processors/__init__.py +0 -27
  107. llama_stack_api/llama_stack_api/file_processors/api.py +0 -64
  108. llama_stack_api/llama_stack_api/file_processors/fastapi_routes.py +0 -78
  109. llama_stack_api/llama_stack_api/file_processors/models.py +0 -42
  110. llama_stack_api/llama_stack_api/files/__init__.py +0 -35
  111. llama_stack_api/llama_stack_api/files/api.py +0 -51
  112. llama_stack_api/llama_stack_api/files/fastapi_routes.py +0 -124
  113. llama_stack_api/llama_stack_api/files/models.py +0 -107
  114. llama_stack_api/llama_stack_api/inference.py +0 -1169
  115. llama_stack_api/llama_stack_api/inspect_api/__init__.py +0 -37
  116. llama_stack_api/llama_stack_api/inspect_api/api.py +0 -25
  117. llama_stack_api/llama_stack_api/inspect_api/fastapi_routes.py +0 -76
  118. llama_stack_api/llama_stack_api/inspect_api/models.py +0 -28
  119. llama_stack_api/llama_stack_api/internal/__init__.py +0 -9
  120. llama_stack_api/llama_stack_api/internal/kvstore.py +0 -28
  121. llama_stack_api/llama_stack_api/internal/sqlstore.py +0 -81
  122. llama_stack_api/llama_stack_api/models.py +0 -171
  123. llama_stack_api/llama_stack_api/openai_responses.py +0 -1468
  124. llama_stack_api/llama_stack_api/post_training.py +0 -370
  125. llama_stack_api/llama_stack_api/prompts.py +0 -203
  126. llama_stack_api/llama_stack_api/providers/__init__.py +0 -33
  127. llama_stack_api/llama_stack_api/providers/api.py +0 -16
  128. llama_stack_api/llama_stack_api/providers/fastapi_routes.py +0 -57
  129. llama_stack_api/llama_stack_api/providers/models.py +0 -24
  130. llama_stack_api/llama_stack_api/py.typed +0 -0
  131. llama_stack_api/llama_stack_api/rag_tool.py +0 -168
  132. llama_stack_api/llama_stack_api/resource.py +0 -37
  133. llama_stack_api/llama_stack_api/router_utils.py +0 -160
  134. llama_stack_api/llama_stack_api/safety.py +0 -132
  135. llama_stack_api/llama_stack_api/schema_utils.py +0 -208
  136. llama_stack_api/llama_stack_api/scoring.py +0 -93
  137. llama_stack_api/llama_stack_api/scoring_functions.py +0 -211
  138. llama_stack_api/llama_stack_api/shields.py +0 -93
  139. llama_stack_api/llama_stack_api/tools.py +0 -226
  140. llama_stack_api/llama_stack_api/vector_io.py +0 -941
  141. llama_stack_api/llama_stack_api/vector_stores.py +0 -53
  142. llama_stack_api/llama_stack_api/version.py +0 -9
  143. llama_stack_api/models.py +0 -171
  144. llama_stack_api/openai_responses.py +0 -1468
  145. llama_stack_api/post_training.py +0 -370
  146. llama_stack_api/prompts.py +0 -203
  147. llama_stack_api/providers/__init__.py +0 -33
  148. llama_stack_api/providers/api.py +0 -16
  149. llama_stack_api/providers/fastapi_routes.py +0 -57
  150. llama_stack_api/providers/models.py +0 -24
  151. llama_stack_api/py.typed +0 -0
  152. llama_stack_api/rag_tool.py +0 -168
  153. llama_stack_api/resource.py +0 -37
  154. llama_stack_api/router_utils.py +0 -160
  155. llama_stack_api/safety.py +0 -132
  156. llama_stack_api/schema_utils.py +0 -208
  157. llama_stack_api/scoring.py +0 -93
  158. llama_stack_api/scoring_functions.py +0 -211
  159. llama_stack_api/shields.py +0 -93
  160. llama_stack_api/tools.py +0 -226
  161. llama_stack_api/vector_io.py +0 -941
  162. llama_stack_api/vector_stores.py +0 -53
  163. llama_stack_api/version.py +0 -9
  164. {llama_stack-0.4.3.dist-info → llama_stack-0.4.4.dist-info}/WHEEL +0 -0
  165. {llama_stack-0.4.3.dist-info → llama_stack-0.4.4.dist-info}/entry_points.txt +0 -0
  166. {llama_stack-0.4.3.dist-info → llama_stack-0.4.4.dist-info}/licenses/LICENSE +0 -0
llama_stack_api/tools.py DELETED
@@ -1,226 +0,0 @@
1
- # Copyright (c) Meta Platforms, Inc. and affiliates.
2
- # All rights reserved.
3
- #
4
- # This source code is licensed under the terms described in the LICENSE file in
5
- # the root directory of this source tree.
6
-
7
- from enum import Enum
8
- from typing import Any, Literal, Protocol
9
-
10
- from pydantic import BaseModel
11
- from typing_extensions import runtime_checkable
12
-
13
- from llama_stack_api.common.content_types import URL, InterleavedContent
14
- from llama_stack_api.resource import Resource, ResourceType
15
- from llama_stack_api.schema_utils import json_schema_type, webmethod
16
- from llama_stack_api.version import LLAMA_STACK_API_V1
17
-
18
-
19
- @json_schema_type
20
- class ToolDef(BaseModel):
21
- """Tool definition used in runtime contexts.
22
-
23
- :param name: Name of the tool
24
- :param description: (Optional) Human-readable description of what the tool does
25
- :param input_schema: (Optional) JSON Schema for tool inputs (MCP inputSchema)
26
- :param output_schema: (Optional) JSON Schema for tool outputs (MCP outputSchema)
27
- :param metadata: (Optional) Additional metadata about the tool
28
- :param toolgroup_id: (Optional) ID of the tool group this tool belongs to
29
- """
30
-
31
- toolgroup_id: str | None = None
32
- name: str
33
- description: str | None = None
34
- input_schema: dict[str, Any] | None = None
35
- output_schema: dict[str, Any] | None = None
36
- metadata: dict[str, Any] | None = None
37
-
38
-
39
- @json_schema_type
40
- class ToolGroupInput(BaseModel):
41
- """Input data for registering a tool group.
42
-
43
- :param toolgroup_id: Unique identifier for the tool group
44
- :param provider_id: ID of the provider that will handle this tool group
45
- :param args: (Optional) Additional arguments to pass to the provider
46
- :param mcp_endpoint: (Optional) Model Context Protocol endpoint for remote tools
47
- """
48
-
49
- toolgroup_id: str
50
- provider_id: str
51
- args: dict[str, Any] | None = None
52
- mcp_endpoint: URL | None = None
53
-
54
-
55
- @json_schema_type
56
- class ToolGroup(Resource):
57
- """A group of related tools managed together.
58
-
59
- :param type: Type of resource, always 'tool_group'
60
- :param mcp_endpoint: (Optional) Model Context Protocol endpoint for remote tools
61
- :param args: (Optional) Additional arguments for the tool group
62
- """
63
-
64
- type: Literal[ResourceType.tool_group] = ResourceType.tool_group
65
- mcp_endpoint: URL | None = None
66
- args: dict[str, Any] | None = None
67
-
68
-
69
- @json_schema_type
70
- class ToolInvocationResult(BaseModel):
71
- """Result of a tool invocation.
72
-
73
- :param content: (Optional) The output content from the tool execution
74
- :param error_message: (Optional) Error message if the tool execution failed
75
- :param error_code: (Optional) Numeric error code if the tool execution failed
76
- :param metadata: (Optional) Additional metadata about the tool execution
77
- """
78
-
79
- content: InterleavedContent | None = None
80
- error_message: str | None = None
81
- error_code: int | None = None
82
- metadata: dict[str, Any] | None = None
83
-
84
-
85
- class ToolStore(Protocol):
86
- async def get_tool(self, tool_name: str) -> ToolDef: ...
87
- async def get_tool_group(self, toolgroup_id: str) -> ToolGroup: ...
88
-
89
-
90
- @json_schema_type
91
- class ListToolGroupsResponse(BaseModel):
92
- """Response containing a list of tool groups.
93
-
94
- :param data: List of tool groups
95
- """
96
-
97
- data: list[ToolGroup]
98
-
99
-
100
- @json_schema_type
101
- class ListToolDefsResponse(BaseModel):
102
- """Response containing a list of tool definitions.
103
-
104
- :param data: List of tool definitions
105
- """
106
-
107
- data: list[ToolDef]
108
-
109
-
110
- @runtime_checkable
111
- class ToolGroups(Protocol):
112
- @webmethod(route="/toolgroups", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
113
- async def register_tool_group(
114
- self,
115
- toolgroup_id: str,
116
- provider_id: str,
117
- mcp_endpoint: URL | None = None,
118
- args: dict[str, Any] | None = None,
119
- ) -> None:
120
- """Register a tool group.
121
-
122
- :param toolgroup_id: The ID of the tool group to register.
123
- :param provider_id: The ID of the provider to use for the tool group.
124
- :param mcp_endpoint: The MCP endpoint to use for the tool group.
125
- :param args: A dictionary of arguments to pass to the tool group.
126
- """
127
- ...
128
-
129
- @webmethod(route="/toolgroups/{toolgroup_id:path}", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
130
- async def get_tool_group(
131
- self,
132
- toolgroup_id: str,
133
- ) -> ToolGroup:
134
- """Get a tool group by its ID.
135
-
136
- :param toolgroup_id: The ID of the tool group to get.
137
- :returns: A ToolGroup.
138
- """
139
- ...
140
-
141
- @webmethod(route="/toolgroups", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
142
- async def list_tool_groups(self) -> ListToolGroupsResponse:
143
- """List tool groups with optional provider.
144
-
145
- :returns: A ListToolGroupsResponse.
146
- """
147
- ...
148
-
149
- @webmethod(route="/tools", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
150
- async def list_tools(self, toolgroup_id: str | None = None) -> ListToolDefsResponse:
151
- """List tools with optional tool group.
152
-
153
- :param toolgroup_id: The ID of the tool group to list tools for.
154
- :returns: A ListToolDefsResponse.
155
- """
156
- ...
157
-
158
- @webmethod(route="/tools/{tool_name:path}", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
159
- async def get_tool(
160
- self,
161
- tool_name: str,
162
- ) -> ToolDef:
163
- """Get a tool by its name.
164
-
165
- :param tool_name: The name of the tool to get.
166
- :returns: A ToolDef.
167
- """
168
- ...
169
-
170
- @webmethod(route="/toolgroups/{toolgroup_id:path}", method="DELETE", level=LLAMA_STACK_API_V1, deprecated=True)
171
- async def unregister_toolgroup(
172
- self,
173
- toolgroup_id: str,
174
- ) -> None:
175
- """Unregister a tool group.
176
-
177
- :param toolgroup_id: The ID of the tool group to unregister.
178
- """
179
- ...
180
-
181
-
182
- class SpecialToolGroup(Enum):
183
- """Special tool groups with predefined functionality.
184
-
185
- :cvar rag_tool: Retrieval-Augmented Generation tool group for document search and retrieval
186
- """
187
-
188
- rag_tool = "rag_tool"
189
-
190
-
191
- @runtime_checkable
192
- class ToolRuntime(Protocol):
193
- tool_store: ToolStore | None = None
194
-
195
- # TODO: This needs to be renamed once OPEN API generator name conflict issue is fixed.
196
- @webmethod(route="/tool-runtime/list-tools", method="GET", level=LLAMA_STACK_API_V1, deprecated=True)
197
- async def list_runtime_tools(
198
- self,
199
- tool_group_id: str | None = None,
200
- mcp_endpoint: URL | None = None,
201
- authorization: str | None = None,
202
- ) -> ListToolDefsResponse:
203
- """List all tools in the runtime.
204
-
205
- :param tool_group_id: The ID of the tool group to list tools for.
206
- :param mcp_endpoint: The MCP endpoint to use for the tool group.
207
- :param authorization: (Optional) OAuth access token for authenticating with the MCP server.
208
- :returns: A ListToolDefsResponse.
209
- """
210
- ...
211
-
212
- @webmethod(route="/tool-runtime/invoke", method="POST", level=LLAMA_STACK_API_V1, deprecated=True)
213
- async def invoke_tool(
214
- self,
215
- tool_name: str,
216
- kwargs: dict[str, Any],
217
- authorization: str | None = None,
218
- ) -> ToolInvocationResult:
219
- """Run a tool with the given arguments.
220
-
221
- :param tool_name: The name of the tool to invoke.
222
- :param kwargs: A dictionary of arguments to pass to the tool.
223
- :param authorization: (Optional) OAuth access token for authenticating with the MCP server.
224
- :returns: A ToolInvocationResult.
225
- """
226
- ...