Elffuss BraidHub

kikocis/llama-stack public

add /inference/chat_completion to SSE special case
Changeset371459e1ee27cc2eaa80ee44ccd51b4a87a9211a84c4bf27bf5799a5ff7c1831
AuthorDalton Flanagan <6599399+dltn@users.noreply.github.com> · 2024-09-10 01:14 -04:00
CommitterDalton Flanagan <6599399+dltn@users.noreply.github.com> · 2024-09-10 01:14 -04:00
Parents0969b8adf540

Browse the files at this changeset

3 files changed

modified rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.html +10 −10
@@ -21,7 +21,7 @@
2121 "info": {
2222 "title": "[DRAFT] Llama Stack Specification",
2323 "version": "0.0.1",
24- "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-09-09 11:19:39.855375"
24+ "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-09-10 01:13:08.531639"
2525 },
2626 "servers": [
2727 {
@@ -141,7 +141,7 @@
141141 "200": {
142142 "description": "SSE-stream of these events.",
143143 "content": {
144- "application/json": {
144+ "text/event-stream": {
145145 "schema": {
146146 "$ref": "#/components/schemas/ChatCompletionResponseStreamChunk"
147147 }
@@ -6063,34 +6063,34 @@
60636063 ],
60646064 "tags": [
60656065 {
6066- "name": "Inference"
6066+ "name": "SyntheticDataGeneration"
60676067 },
60686068 {
6069- "name": "Datasets"
6069+ "name": "RewardScoring"
60706070 },
60716071 {
6072- "name": "Evaluations"
6072+ "name": "Datasets"
60736073 },
60746074 {
60756075 "name": "Memory"
60766076 },
60776077 {
6078- "name": "SyntheticDataGeneration"
6078+ "name": "AgenticSystem"
60796079 },
60806080 {
6081- "name": "PostTraining"
6081+ "name": "BatchInference"
60826082 },
60836083 {
6084- "name": "RewardScoring"
6084+ "name": "PostTraining"
60856085 },
60866086 {
6087- "name": "BatchInference"
6087+ "name": "Evaluations"
60886088 },
60896089 {
60906090 "name": "Telemetry"
60916091 },
60926092 {
6093- "name": "AgenticSystem"
6093+ "name": "Inference"
60946094 },
60956095 {
60966096 "name": "BatchChatCompletionRequest",
modified rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.yaml +8 −8
@@ -2777,7 +2777,7 @@
27772777 description: "This is the specification of the llama stack that provides\n \
27782778 \ a set of endpoints and their corresponding interfaces that are tailored\
27792779 \ to\n best leverage Llama Models. The specification is still in\
2780- \ draft and subject to change.\n Generated at 2024-09-09 11:19:39.855375"
2780+ \ draft and subject to change.\n Generated at 2024-09-10 01:13:08.531639"
27812781 title: '[DRAFT] Llama Stack Specification'
27822782 version: 0.0.1
27832783 jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
@@ -3302,7 +3302,7 @@
33023302 responses:
33033303 '200':
33043304 content:
3305- application/json:
3305+ text/event-stream:
33063306 schema:
33073307 $ref: '#/components/schemas/ChatCompletionResponseStreamChunk'
33083308 description: SSE-stream of these events.
@@ -3729,16 +3729,16 @@
37293729 servers:
37303730 - url: http://any-hosted-llama-stack.com
37313731 tags:
3732-- name: Inference
3733-- name: Datasets
3734-- name: Evaluations
3735-- name: Memory
37363732 - name: SyntheticDataGeneration
3737-- name: PostTraining
37383733 - name: RewardScoring
3734+- name: Datasets
3735+- name: Memory
3736+- name: AgenticSystem
37393737 - name: BatchInference
3738+- name: PostTraining
3739+- name: Evaluations
37403740 - name: Telemetry
3741-- name: AgenticSystem
3741+- name: Inference
37423742 - description: <SchemaDefinition schemaRef="#/components/schemas/BatchChatCompletionRequest"
37433743 />
37443744 name: BatchChatCompletionRequest
modified rfcs/openapi_generator/generate.py +4 −1
@@ -35,7 +35,10 @@
3535
3636
3737 # TODO: this should be fixed in the generator itself so it reads appropriate annotations
38-STREAMING_ENDPOINTS = ["/agentic_system/turn/create"]
38+STREAMING_ENDPOINTS = [
39+ "/agentic_system/turn/create",
40+ "/inference/chat_completion",
41+]
3942
4043
4144 def patch_sse_stream_responses(spec: Specification):