@reverbia/portal 1.0.0-next.20251113 → 1.0.0-next.20251113192414
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.
- package/package.json +1 -1
- package/swagger.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reverbia/portal",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.20251113192414",
|
|
4
4
|
"description": "AI Portal is a prepaid escrow-based API gateway for wallet-authenticated LLM usage. It provides an OpenAI-compatible API with on-chain settlement for AI inference costs.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
package/swagger.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"components": {"schemas":{"handlers.HealthResponse":{"properties":{"status":{"description":"Status indicates the service health status","type":"string"},"timestamp":{"description":"Timestamp is the Unix timestamp of the response","type":"integer"},"version":{"description":"Version is the current API version","type":"string"}},"type":"object"},"llmapi.ChatCompletionRequest":{"properties":{"messages":{"description":"Messages is the conversation history","items":{"$ref":"#/components/schemas/llmapi.Message"},"type":"array","uniqueItems":false},"model":{"description":"Model is the model identifier","type":"string"},"stream":{"description":"Stream indicates if response should be streamed","type":"boolean"}},"type":"object"},"llmapi.ChatCompletionResponse":{"properties":{"choices":{"description":"Choices contains the completion choices","items":{"$ref":"#/components/schemas/llmapi.Choice"},"type":"array","uniqueItems":false},"id":{"description":"ID is the completion ID","type":"string"},"model":{"description":"Model is the model used","type":"string"}},"type":"object"},"llmapi.Choice":{"properties":{"finish_reason":{"description":"FinishReason indicates why the completion stopped","type":"string"},"index":{"description":"Index is the choice index","type":"integer"},"message":{"$ref":"#/components/schemas/llmapi.Message"}},"type":"object"},"llmapi.Message":{"description":"Message is the generated message","properties":{"content":{"description":"Content is the message content","type":"string"},"role":{"$ref":"#/components/schemas/llmapi.Role"}},"type":"object"},"llmapi.Role":{"description":"Role is the message role (system, user, assistant)","type":"string","x-enum-varnames":["RoleAssistant","RoleUser","RoleSystem"]},"response.ErrorResponse":{"properties":{"error":{"type":"string"}},"type":"object"}}},
|
|
2
|
+
"components": {"schemas":{"handlers.HealthResponse":{"properties":{"status":{"description":"Status indicates the service health status","type":"string"},"timestamp":{"description":"Timestamp is the Unix timestamp of the response","type":"integer"},"version":{"description":"Version is the current API version","type":"string"}},"type":"object"},"llmapi.ChatCompletionRequest":{"properties":{"messages":{"description":"Messages is the conversation history","items":{"$ref":"#/components/schemas/llmapi.Message"},"type":"array","uniqueItems":false},"model":{"description":"Model is the model identifier","type":"string"},"stream":{"description":"Stream indicates if response should be streamed","type":"boolean"}},"type":"object"},"llmapi.ChatCompletionResponse":{"properties":{"choices":{"description":"Choices contains the completion choices","items":{"$ref":"#/components/schemas/llmapi.Choice"},"type":"array","uniqueItems":false},"id":{"description":"ID is the completion ID","type":"string"},"model":{"description":"Model is the model used","type":"string"}},"type":"object"},"llmapi.Choice":{"properties":{"finish_reason":{"description":"FinishReason indicates why the completion stopped","type":"string"},"index":{"description":"Index is the choice index","type":"integer"},"message":{"$ref":"#/components/schemas/llmapi.Message"}},"type":"object"},"llmapi.EmbeddingData":{"properties":{"embedding":{"description":"Embedding vector","items":{"type":"number"},"type":"array","uniqueItems":false},"index":{"description":"Index of the embedding","type":"integer"},"object":{"description":"Object type identifier","type":"string"}},"type":"object"},"llmapi.EmbeddingExtraFields":{"description":"ExtraFields contains additional metadata","properties":{"chunk_index":{"description":"ChunkIndex is the chunk index (0 for single requests)","type":"integer"},"latency":{"description":"Latency is the request latency in milliseconds","type":"integer"},"model_requested":{"description":"ModelRequested is the model that was requested","type":"string"},"provider":{"description":"Provider is the LLM provider used (e.g., \"openai\", \"anthropic\")","type":"string"},"request_type":{"description":"RequestType is always \"embedding\"","type":"string"}},"type":"object"},"llmapi.EmbeddingRequest":{"properties":{"dimensions":{"description":"Dimensions is the number of dimensions the resulting output embeddings should have (optional)","type":"integer"},"encoding_format":{"description":"EncodingFormat is the format to return the embeddings in (optional: \"float\" or \"base64\")","type":"string"},"input":{"description":"Input text or tokens to embed (can be string, []string, []int, or [][]int)"},"model":{"description":"Model identifier in 'provider/model' format","type":"string"}},"type":"object"},"llmapi.EmbeddingResponse":{"properties":{"data":{"description":"Data contains the embeddings","items":{"$ref":"#/components/schemas/llmapi.EmbeddingData"},"type":"array","uniqueItems":false},"extra_fields":{"$ref":"#/components/schemas/llmapi.EmbeddingExtraFields"},"model":{"description":"Model is the model used","type":"string"},"object":{"description":"Object is always \"list\"","type":"string"},"usage":{"$ref":"#/components/schemas/llmapi.EmbeddingUsage"}},"type":"object"},"llmapi.EmbeddingUsage":{"description":"Usage contains token usage information","properties":{"prompt_tokens":{"description":"PromptTokens is the number of tokens in the prompt","type":"integer"},"total_tokens":{"description":"TotalTokens is the total number of tokens used","type":"integer"}},"type":"object"},"llmapi.Message":{"description":"Message is the generated message","properties":{"content":{"description":"Content is the message content","type":"string"},"role":{"$ref":"#/components/schemas/llmapi.Role"}},"type":"object"},"llmapi.Role":{"description":"Role is the message role (system, user, assistant)","type":"string","x-enum-varnames":["RoleAssistant","RoleUser","RoleSystem"]},"response.ErrorResponse":{"properties":{"error":{"type":"string"}},"type":"object"}}},
|
|
3
3
|
"info": {"title":"","version":""},
|
|
4
4
|
"externalDocs": {"description":"","url":""},
|
|
5
|
-
"paths": {"/api/v1/chat/completions":{"post":{"description":"Generates a chat completion using the configured gateway.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/llmapi.ChatCompletionRequest"}}},"description":"Chat completion request","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/llmapi.ChatCompletionResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create chat completion","tags":["Chat"]}},"/health":{"get":{"description":"Returns the current health status of the service.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handlers.HealthResponse"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Health check","tags":["Health"]}}},
|
|
5
|
+
"paths": {"/api/v1/chat/completions":{"post":{"description":"Generates a chat completion using the configured gateway.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/llmapi.ChatCompletionRequest"}}},"description":"Chat completion request","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/llmapi.ChatCompletionResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create chat completion","tags":["Chat"]}},"/api/v1/embeddings":{"post":{"description":"Generates embeddings using the configured gateway.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/llmapi.EmbeddingRequest"}}},"description":"Embedding request","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/llmapi.EmbeddingResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create embeddings","tags":["Embeddings"]}},"/health":{"get":{"description":"Returns the current health status of the service.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/handlers.HealthResponse"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.ErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Health check","tags":["Health"]}}},
|
|
6
6
|
"openapi": "3.1.0"
|
|
7
7
|
}
|