diff --git a/swagger/docs.go b/swagger/docs.go index ecfe71cc2..b399f73e8 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -2110,7 +2110,7 @@ const docTemplate = `{ }, "/audio/transformations/stream": { "get": { - "description": "Streams binary PCM frames in (interleaved stereo: ch0=audio, ch1=reference) and out (mono). The first message must be a JSON ` + "`" + `session.update` + "`" + ` envelope describing model + sample format + frame size + backend params. Server emits binary PCM on the same cadence.", + "description": "Streams binary PCM frames in (interleaved stereo: ch0=audio, ch1=reference) and out (mono). The model must support the audio_transform use case. Any-to-any models such as liquid-audio use the OpenAI Realtime API instead. The first message must be a JSON ` + "`" + `session.update` + "`" + ` envelope describing model + sample format + frame size + backend params. Server emits binary PCM on the same cadence.", "tags": [ "audio" ], @@ -5080,6 +5080,29 @@ const docTemplate = `{ } } }, + "schema.CompressionMetadata": { + "type": "object", + "properties": { + "compressed_tokens": { + "type": "integer" + }, + "compressor": { + "type": "string" + }, + "dropped_turns": { + "type": "integer" + }, + "original_tokens": { + "type": "integer" + }, + "overflow_recoveries": { + "type": "integer" + }, + "summary_tokens": { + "type": "integer" + } + } + }, "schema.DepthRequest": { "type": "object", "properties": { @@ -6992,6 +7015,14 @@ const docTemplate = `{ "negative_prompt_scale": { "type": "number" }, + "pooling": { + "description": "Pooling is a LocalAI extension for /v1/embeddings: how the backend's\nper-token vectors are reduced to a single embedding. \"\" or \"backend\"\nleaves pooling to the inference backend (the pre-existing behavior);\n\"mean\", \"last\" and \"decayed_mean\" pool Go-side from raw per-token\nvectors (the backend must run with the \"pooling:none\" option, which\nmodel configs get automatically when this is set).", + "type": "string" + }, + "pooling_half_life_tokens": { + "description": "PoolingHalfLifeTokens is a LocalAI extension for /v1/embeddings: the\nhalf-life (in tokens) of the \"decayed_mean\" pooling scheme — a token's\nweight halves every this-many positions counting back from the end of\nthe conversation. Defaults to 256 when unset.", + "type": "integer" + }, "presence_penalty": { "type": "number" }, @@ -7129,6 +7160,9 @@ const docTemplate = `{ "completion_tokens": { "type": "integer" }, + "compression_meta": { + "$ref": "#/definitions/schema.CompressionMetadata" + }, "input_tokens": { "description": "Fields for image generation API compatibility", "type": "integer" diff --git a/swagger/swagger.json b/swagger/swagger.json index 5f20e5955..b04ebca6d 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -2107,7 +2107,7 @@ }, "/audio/transformations/stream": { "get": { - "description": "Streams binary PCM frames in (interleaved stereo: ch0=audio, ch1=reference) and out (mono). The first message must be a JSON `session.update` envelope describing model + sample format + frame size + backend params. Server emits binary PCM on the same cadence.", + "description": "Streams binary PCM frames in (interleaved stereo: ch0=audio, ch1=reference) and out (mono). The model must support the audio_transform use case. Any-to-any models such as liquid-audio use the OpenAI Realtime API instead. The first message must be a JSON `session.update` envelope describing model + sample format + frame size + backend params. Server emits binary PCM on the same cadence.", "tags": [ "audio" ], @@ -5077,6 +5077,29 @@ } } }, + "schema.CompressionMetadata": { + "type": "object", + "properties": { + "compressed_tokens": { + "type": "integer" + }, + "compressor": { + "type": "string" + }, + "dropped_turns": { + "type": "integer" + }, + "original_tokens": { + "type": "integer" + }, + "overflow_recoveries": { + "type": "integer" + }, + "summary_tokens": { + "type": "integer" + } + } + }, "schema.DepthRequest": { "type": "object", "properties": { @@ -6989,6 +7012,14 @@ "negative_prompt_scale": { "type": "number" }, + "pooling": { + "description": "Pooling is a LocalAI extension for /v1/embeddings: how the backend's\nper-token vectors are reduced to a single embedding. \"\" or \"backend\"\nleaves pooling to the inference backend (the pre-existing behavior);\n\"mean\", \"last\" and \"decayed_mean\" pool Go-side from raw per-token\nvectors (the backend must run with the \"pooling:none\" option, which\nmodel configs get automatically when this is set).", + "type": "string" + }, + "pooling_half_life_tokens": { + "description": "PoolingHalfLifeTokens is a LocalAI extension for /v1/embeddings: the\nhalf-life (in tokens) of the \"decayed_mean\" pooling scheme — a token's\nweight halves every this-many positions counting back from the end of\nthe conversation. Defaults to 256 when unset.", + "type": "integer" + }, "presence_penalty": { "type": "number" }, @@ -7126,6 +7157,9 @@ "completion_tokens": { "type": "integer" }, + "compression_meta": { + "$ref": "#/definitions/schema.CompressionMetadata" + }, "input_tokens": { "description": "Fields for image generation API compatibility", "type": "integer" diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 36cc627f5..f0e40bbe0 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -750,6 +750,21 @@ definitions: text: type: string type: object + schema.CompressionMetadata: + properties: + compressed_tokens: + type: integer + compressor: + type: string + dropped_turns: + type: integer + original_tokens: + type: integer + overflow_recoveries: + type: integer + summary_tokens: + type: integer + type: object schema.DepthRequest: properties: dst: @@ -2072,6 +2087,22 @@ definitions: type: string negative_prompt_scale: type: number + pooling: + description: |- + Pooling is a LocalAI extension for /v1/embeddings: how the backend's + per-token vectors are reduced to a single embedding. "" or "backend" + leaves pooling to the inference backend (the pre-existing behavior); + "mean", "last" and "decayed_mean" pool Go-side from raw per-token + vectors (the backend must run with the "pooling:none" option, which + model configs get automatically when this is set). + type: string + pooling_half_life_tokens: + description: |- + PoolingHalfLifeTokens is a LocalAI extension for /v1/embeddings: the + half-life (in tokens) of the "decayed_mean" pooling scheme — a token's + weight halves every this-many positions counting back from the end of + the conversation. Defaults to 256 when unset. + type: integer presence_penalty: type: number prompt: @@ -2172,6 +2203,8 @@ definitions: properties: completion_tokens: type: integer + compression_meta: + $ref: '#/definitions/schema.CompressionMetadata' input_tokens: description: Fields for image generation API compatibility type: integer @@ -4407,9 +4440,11 @@ paths: /audio/transformations/stream: get: description: 'Streams binary PCM frames in (interleaved stereo: ch0=audio, ch1=reference) - and out (mono). The first message must be a JSON `session.update` envelope - describing model + sample format + frame size + backend params. Server emits - binary PCM on the same cadence.' + and out (mono). The model must support the audio_transform use case. Any-to-any + models such as liquid-audio use the OpenAI Realtime API instead. The first + message must be a JSON `session.update` envelope describing model + sample + format + frame size + backend params. Server emits binary PCM on the same + cadence.' responses: {} summary: Bidirectional realtime audio transform over WebSocket. tags: