From b476565ca9e5701db6706cbc2aad459e953ea78c Mon Sep 17 00:00:00 2001 From: joelhulen Date: Fri, 26 Jan 2024 13:27:41 -0500 Subject: [PATCH 1/4] Add Newtonsoft.Json support to all .NET APIs so the OpenAPI doc honors JsonProperty tags --- src/dotnet/AgentFactoryAPI/AgentFactoryAPI.csproj | 3 ++- src/dotnet/AgentFactoryAPI/Program.cs | 3 ++- src/dotnet/GatekeeperAPI/GatekeeperAPI.csproj | 3 ++- src/dotnet/GatekeeperAPI/Program.cs | 3 ++- src/dotnet/ManagementAPI/ManagementAPI.csproj | 1 + src/dotnet/ManagementAPI/Program.cs | 3 ++- src/dotnet/SemanticKernelAPI/Program.cs | 3 ++- src/dotnet/SemanticKernelAPI/SemanticKernelAPI.csproj | 1 + src/dotnet/VectorizationAPI/Program.cs | 3 ++- src/dotnet/VectorizationAPI/VectorizationAPI.csproj | 1 + 10 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/dotnet/AgentFactoryAPI/AgentFactoryAPI.csproj b/src/dotnet/AgentFactoryAPI/AgentFactoryAPI.csproj index e2874190e8..3edc016c90 100644 --- a/src/dotnet/AgentFactoryAPI/AgentFactoryAPI.csproj +++ b/src/dotnet/AgentFactoryAPI/AgentFactoryAPI.csproj @@ -21,7 +21,8 @@ - + + diff --git a/src/dotnet/AgentFactoryAPI/Program.cs b/src/dotnet/AgentFactoryAPI/Program.cs index adf7c25632..137d913187 100644 --- a/src/dotnet/AgentFactoryAPI/Program.cs +++ b/src/dotnet/AgentFactoryAPI/Program.cs @@ -144,7 +144,8 @@ public static void Main(string[] args) // Adds auth via X-API-KEY header options.AddAPIKeyAuth(); - }); + }) + .AddSwaggerGenNewtonsoftSupport(); builder.Services.Configure(options => { diff --git a/src/dotnet/GatekeeperAPI/GatekeeperAPI.csproj b/src/dotnet/GatekeeperAPI/GatekeeperAPI.csproj index b4020109fc..496f4e284f 100644 --- a/src/dotnet/GatekeeperAPI/GatekeeperAPI.csproj +++ b/src/dotnet/GatekeeperAPI/GatekeeperAPI.csproj @@ -30,7 +30,8 @@ - + + diff --git a/src/dotnet/GatekeeperAPI/Program.cs b/src/dotnet/GatekeeperAPI/Program.cs index 264f4a1568..5e7d0e48e3 100644 --- a/src/dotnet/GatekeeperAPI/Program.cs +++ b/src/dotnet/GatekeeperAPI/Program.cs @@ -130,7 +130,8 @@ public static void Main(string[] args) // Adds auth via X-API-KEY header options.AddAPIKeyAuth(); - }); + }) + .AddSwaggerGenNewtonsoftSupport(); builder.Services.Configure(options => { diff --git a/src/dotnet/ManagementAPI/ManagementAPI.csproj b/src/dotnet/ManagementAPI/ManagementAPI.csproj index c0b6312e09..c8d6555f02 100644 --- a/src/dotnet/ManagementAPI/ManagementAPI.csproj +++ b/src/dotnet/ManagementAPI/ManagementAPI.csproj @@ -25,6 +25,7 @@ + diff --git a/src/dotnet/ManagementAPI/Program.cs b/src/dotnet/ManagementAPI/Program.cs index cd33958d4b..eeea010c78 100644 --- a/src/dotnet/ManagementAPI/Program.cs +++ b/src/dotnet/ManagementAPI/Program.cs @@ -134,7 +134,8 @@ public static void Main(string[] args) // Integrate xml comments options.IncludeXmlComments(filePath); - }); + }) + .AddSwaggerGenNewtonsoftSupport(); builder.Services.Configure(options => { diff --git a/src/dotnet/SemanticKernelAPI/Program.cs b/src/dotnet/SemanticKernelAPI/Program.cs index 86f594d242..85d789dcf2 100644 --- a/src/dotnet/SemanticKernelAPI/Program.cs +++ b/src/dotnet/SemanticKernelAPI/Program.cs @@ -73,7 +73,8 @@ public static void Main(string[] args) // Adds auth via X-API-KEY header options.AddAPIKeyAuth(); - }); + }) + .AddSwaggerGenNewtonsoftSupport(); builder.Services.AddOptions() .Bind(builder.Configuration.GetSection(AppConfigurationKeySections.FoundationaLLM_SemanticKernelAPI)); diff --git a/src/dotnet/SemanticKernelAPI/SemanticKernelAPI.csproj b/src/dotnet/SemanticKernelAPI/SemanticKernelAPI.csproj index c4b0135b12..389c777f82 100644 --- a/src/dotnet/SemanticKernelAPI/SemanticKernelAPI.csproj +++ b/src/dotnet/SemanticKernelAPI/SemanticKernelAPI.csproj @@ -18,6 +18,7 @@ + diff --git a/src/dotnet/VectorizationAPI/Program.cs b/src/dotnet/VectorizationAPI/Program.cs index d4a2737d70..f41c8a1330 100644 --- a/src/dotnet/VectorizationAPI/Program.cs +++ b/src/dotnet/VectorizationAPI/Program.cs @@ -103,7 +103,8 @@ // Integrate xml comments options.IncludeXmlComments(filePath); - }); + }) + .AddSwaggerGenNewtonsoftSupport(); builder.Services.Configure(options => { diff --git a/src/dotnet/VectorizationAPI/VectorizationAPI.csproj b/src/dotnet/VectorizationAPI/VectorizationAPI.csproj index fee6d1176a..fb544ce400 100644 --- a/src/dotnet/VectorizationAPI/VectorizationAPI.csproj +++ b/src/dotnet/VectorizationAPI/VectorizationAPI.csproj @@ -19,6 +19,7 @@ + From 2fd10aa00c2ace90362200db325f4cbfdfb4f67f Mon Sep 17 00:00:00 2001 From: joelhulen Date: Fri, 26 Jan 2024 13:36:47 -0500 Subject: [PATCH 2/4] Update the Postman Core API collection --- ...ationaLLM.Core.API.postman_collection.json | 1385 ----------------- 1 file changed, 1385 deletions(-) diff --git a/docs/FoundationaLLM.Core.API.postman_collection.json b/docs/FoundationaLLM.Core.API.postman_collection.json index 93f833a9c3..e69de29bb2 100644 --- a/docs/FoundationaLLM.Core.API.postman_collection.json +++ b/docs/FoundationaLLM.Core.API.postman_collection.json @@ -1,1385 +0,0 @@ -{ - "info": { - "_postman_id": "d1ed4d97-5dc8-4e63-8e02-4b17dff3401c", - "name": "FoundationaLLM.Core.API", - "description": "FoundationaLLM.Core.API\n\nContact Support:\n Name: Solliance, Inc.\n Email: contact@solliance.net", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "269456" - }, - "item": [ - { - "name": "branding", - "item": [ - { - "name": "Retrieves the branding information for the client.", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{baseUrl}}/branding?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "branding" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{baseUrl}}/branding?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "branding" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "text", - "header": [], - "cookie": [], - "body": "" - } - ] - } - ] - }, - { - "name": "orchestration", - "item": [ - { - "name": "completion", - "item": [ - { - "name": "Requests a completion from the downstream APIs.", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "X-AGENT-HINT", - "value": "{{agentHint}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/orchestration/completion?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "orchestration", - "completion" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/orchestration/completion?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "orchestration", - "completion" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "text", - "header": [], - "cookie": [], - "body": "" - } - ] - } - ] - } - ] - }, - { - "name": "sessions", - "item": [ - { - "name": "{sessionId}", - "item": [ - { - "name": "messages", - "item": [ - { - "name": "Returns the chat messages related to an existing session.", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId/messages?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId", - "messages" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId", - "value": "", - "description": "(Required) The id of the session for which to retrieve chat messages." - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId/messages?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId", - "messages" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "[\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n },\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n }\n]" - } - ] - } - ] - }, - { - "name": "message", - "item": [ - { - "name": "{messageId}", - "item": [ - { - "name": "rate", - "item": [ - { - "name": "Rate an assistant message. This can be used to discover useful AI responses for training,\r\ndiscoverability, and other benefits down the road.", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId/message/:messageId/rate?rating=&api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId", - "message", - ":messageId", - "rate" - ], - "query": [ - { - "key": "rating", - "value": "", - "description": "The rating to assign to the message." - }, - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId", - "value": "", - "description": "(Required) The id of the session to which the message belongs." - }, - { - "key": "messageId", - "value": "", - "description": "(Required) The id of the message to rate." - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId/message/:messageId/rate?rating=&api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId", - "message", - ":messageId", - "rate" - ], - "query": [ - { - "key": "rating", - "value": "", - "description": "The rating to assign to the message." - }, - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId" - }, - { - "key": "messageId" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n}" - } - ] - } - ] - } - ] - } - ] - }, - { - "name": "completionprompts", - "item": [ - { - "name": "{completionPromptId}", - "item": [ - { - "name": "Returns the completion prompt for a given session and completion prompt id.", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId/completionprompts/:completionPromptId?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId", - "completionprompts", - ":completionPromptId" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId", - "value": "", - "description": "(Required) The session id from which to retrieve the completion prompt." - }, - { - "key": "completionPromptId", - "value": "", - "description": "(Required) The id of the completion prompt to retrieve." - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId/completionprompts/:completionPromptId?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId", - "completionprompts", - ":completionPromptId" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId" - }, - { - "key": "completionPromptId" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"messageId\": \"\",\n \"prompt\": \"\",\n \"deleted\": \"\"\n}" - } - ] - } - ] - } - ] - }, - { - "name": "rename", - "item": [ - { - "name": "Rename the chat session.", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId/rename?newChatSessionName=&api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId", - "rename" - ], - "query": [ - { - "key": "newChatSessionName", - "value": "", - "description": "The new name for the session." - }, - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId", - "value": "", - "description": "(Required) The id of the session to rename." - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId/rename?newChatSessionName=&api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId", - "rename" - ], - "query": [ - { - "key": "newChatSessionName", - "value": "", - "description": "The new name for the session." - }, - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"tokensUsed\": \"\",\n \"name\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"messages\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n },\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "completion", - "item": [ - { - "name": "Receive a prompt from a user, vectorize it, and get a completion from the orchestration service.", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "text/plain" - }, - { - "key": "X-AGENT-HINT", - "value": "{{agentHint}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId/completion?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId", - "completion" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId", - "value": "", - "description": "(Required) The id of the session for which to get a completion." - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "text/plain" - } - ], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId/completion?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId", - "completion" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"text\": \"\"\n}" - } - ] - } - ] - }, - { - "name": "summarize-name", - "item": [ - { - "name": "Generate a name for a chat message, based on the passed in prompt.", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "text/plain" - } - ], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId/summarize-name?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId", - "summarize-name" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId", - "value": "", - "description": "(Required) The id of the session for which to generate a name." - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "text/plain" - } - ], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId/summarize-name?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId", - "summarize-name" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"text\": \"\"\n}" - } - ] - } - ] - }, - { - "name": "Delete a chat session and related messages.", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId", - "value": "", - "description": "(Required) " - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{baseUrl}}/sessions/:sessionId?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions", - ":sessionId" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ], - "variable": [ - { - "key": "sessionId" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "text", - "header": [], - "cookie": [], - "body": "" - } - ] - } - ] - }, - { - "name": "Returns list of chat session ids and names.", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/sessions?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/sessions?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "[\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"tokensUsed\": \"\",\n \"name\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"messages\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n },\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n }\n ]\n },\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"tokensUsed\": \"\",\n \"name\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"messages\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n },\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n }\n ]\n }\n]" - } - ] - }, - { - "name": "Creates a new chat session.", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/sessions?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/sessions?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "sessions" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"tokensUsed\": \"\",\n \"name\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"messages\": [\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n },\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "status", - "item": [ - { - "name": "auth", - "item": [ - { - "name": "Returns OK if the requester is authenticated and allowed to execute\r\nrequests against this service.", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{baseUrl}}/status/auth?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "status", - "auth" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{baseUrl}}/status/auth?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "status", - "auth" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "text", - "header": [], - "cookie": [], - "body": "" - } - ] - } - ] - }, - { - "name": "Returns the status of the Core API service.", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{baseUrl}}/status?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "status" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{baseUrl}}/status?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "status" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "text", - "header": [], - "cookie": [], - "body": "" - } - ] - }, - { - "name": "Returns the allowed HTTP methods for the Core API service.", - "request": { - "method": "OPTIONS", - "header": [], - "url": { - "raw": "{{baseUrl}}/status?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "status" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "OPTIONS", - "header": [], - "url": { - "raw": "{{baseUrl}}/status?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "status" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "text", - "header": [], - "cookie": [], - "body": "" - } - ] - } - ] - }, - { - "name": "userprofiles", - "item": [ - { - "name": "agents", - "item": [ - { - "name": "Retrieves a list of global and private agents.", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/userprofiles/agents?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "userprofiles", - "agents" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "text/plain" - } - ], - "url": { - "raw": "{{baseUrl}}/userprofiles/agents?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "userprofiles", - "agents" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "[\n {\n \"name\": \"\",\n \"private\": \"\"\n },\n {\n \"name\": \"\",\n \"private\": \"\"\n }\n]" - } - ] - } - ] - }, - { - "name": "Retrieves the branding information for the client.", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{baseUrl}}/userprofiles?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "userprofiles" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "response": [ - { - "name": "Success", - "originalRequest": { - "method": "GET", - "header": [], - "url": { - "raw": "{{baseUrl}}/userprofiles?api-version=1.0", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "userprofiles" - ], - "query": [ - { - "key": "api-version", - "value": "1.0", - "description": "The requested API version" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "text", - "header": [], - "cookie": [], - "body": "" - } - ] - } - ] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "" - ] - } - } - ], - "variable": [ - { - "key": "baseUrl", - "value": "https://localhost:63279" - }, - { - "key": "agentHint", - "value": "{\"name\": \"default\", \"private\": false}", - "type": "string" - } - ] -} \ No newline at end of file From 05b64fc10c3f9d23685f0168c3d727e180096639 Mon Sep 17 00:00:00 2001 From: joelhulen Date: Fri, 26 Jan 2024 13:37:15 -0500 Subject: [PATCH 3/4] Update Postman Core API collection --- ...ationaLLM.Core.API.postman_collection.json | 1375 +++++++++++++++++ 1 file changed, 1375 insertions(+) diff --git a/docs/FoundationaLLM.Core.API.postman_collection.json b/docs/FoundationaLLM.Core.API.postman_collection.json index e69de29bb2..6311d66f6b 100644 --- a/docs/FoundationaLLM.Core.API.postman_collection.json +++ b/docs/FoundationaLLM.Core.API.postman_collection.json @@ -0,0 +1,1375 @@ +{ + "info": { + "_postman_id": "9ad62116-3057-4166-abfc-ece23923bff5", + "name": "FoundationaLLM.Core.API", + "description": "FoundationaLLM.Core.API\n\nContact Support:\n Name: Solliance, Inc.\n Email: contact@solliance.net", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "269456" + }, + "item": [ + { + "name": "branding", + "item": [ + { + "name": "Retrieves the branding information for the client.", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/branding?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "branding" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/branding?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "branding" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "orchestration", + "item": [ + { + "name": "completion", + "item": [ + { + "name": "Requests a completion from the downstream APIs.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"user_prompt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/orchestration/completion?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "orchestration", + "completion" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"user_prompt\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/orchestration/completion?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "orchestration", + "completion" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + } + ] + }, + { + "name": "sessions", + "item": [ + { + "name": "{sessionId}", + "item": [ + { + "name": "messages", + "item": [ + { + "name": "Returns the chat messages related to an existing session.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId/messages?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId", + "messages" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId", + "value": "", + "description": "(Required) The id of the session for which to retrieve chat messages." + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId/messages?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId", + "messages" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n },\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n }\n]" + } + ] + } + ] + }, + { + "name": "message", + "item": [ + { + "name": "{messageId}", + "item": [ + { + "name": "rate", + "item": [ + { + "name": "Rate an assistant message. This can be used to discover useful AI responses for training,\r\ndiscoverability, and other benefits down the road.", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId/message/:messageId/rate?rating=&api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId", + "message", + ":messageId", + "rate" + ], + "query": [ + { + "key": "rating", + "value": "", + "description": "The rating to assign to the message." + }, + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId", + "value": "", + "description": "(Required) The id of the session to which the message belongs." + }, + { + "key": "messageId", + "value": "", + "description": "(Required) The id of the message to rate." + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId/message/:messageId/rate?rating=&api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId", + "message", + ":messageId", + "rate" + ], + "query": [ + { + "key": "rating", + "value": "", + "description": "The rating to assign to the message." + }, + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId" + }, + { + "key": "messageId" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"timeStamp\": \"\",\n \"sender\": \"\",\n \"senderDisplayName\": \"\",\n \"tokens\": \"\",\n \"text\": \"\",\n \"rating\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\",\n \"vector\": [\n \"\",\n \"\"\n ],\n \"completionPromptId\": \"\"\n}" + } + ] + } + ] + } + ] + } + ] + }, + { + "name": "completionprompts", + "item": [ + { + "name": "{completionPromptId}", + "item": [ + { + "name": "Returns the completion prompt for a given session and completion prompt id.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId/completionprompts/:completionPromptId?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId", + "completionprompts", + ":completionPromptId" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId", + "value": "", + "description": "(Required) The session id from which to retrieve the completion prompt." + }, + { + "key": "completionPromptId", + "value": "", + "description": "(Required) The id of the completion prompt to retrieve." + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId/completionprompts/:completionPromptId?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId", + "completionprompts", + ":completionPromptId" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId" + }, + { + "key": "completionPromptId" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"messageId\": \"\",\n \"prompt\": \"\",\n \"deleted\": \"\"\n}" + } + ] + } + ] + } + ] + }, + { + "name": "rename", + "item": [ + { + "name": "Rename the chat session.", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId/rename?newChatSessionName=&api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId", + "rename" + ], + "query": [ + { + "key": "newChatSessionName", + "value": "", + "description": "The new name for the session." + }, + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId", + "value": "", + "description": "(Required) The id of the session to rename." + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId/rename?newChatSessionName=&api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId", + "rename" + ], + "query": [ + { + "key": "newChatSessionName", + "value": "", + "description": "The new name for the session." + }, + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"tokensUsed\": \"\",\n \"name\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\"\n}" + } + ] + } + ] + }, + { + "name": "completion", + "item": [ + { + "name": "Receive a prompt from a user, vectorize it, and get a completion from the orchestration service.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "text/plain" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId/completion?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId", + "completion" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId", + "value": "", + "description": "(Required) The id of the session for which to get a completion." + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "text/plain" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId/completion?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId", + "completion" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"text\": \"\"\n}" + } + ] + } + ] + }, + { + "name": "summarize-name", + "item": [ + { + "name": "Generate a name for a chat message, based on the passed in prompt.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "text/plain" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId/summarize-name?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId", + "summarize-name" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId", + "value": "", + "description": "(Required) The id of the session for which to generate a name." + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "text/plain" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId/summarize-name?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId", + "summarize-name" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"text\": \"\"\n}" + } + ] + } + ] + }, + { + "name": "Delete a chat session and related messages.", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId", + "value": "", + "description": "(Required) " + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/sessions/:sessionId?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions", + ":sessionId" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ], + "variable": [ + { + "key": "sessionId" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Returns list of chat session ids and names.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/sessions?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/sessions?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"tokensUsed\": \"\",\n \"name\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\"\n },\n {\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"tokensUsed\": \"\",\n \"name\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\"\n }\n]" + } + ] + }, + { + "name": "Creates a new chat session.", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/sessions?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/sessions?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "sessions" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"type\": \"\",\n \"sessionId\": \"\",\n \"tokensUsed\": \"\",\n \"name\": \"\",\n \"upn\": \"\",\n \"deleted\": \"\"\n}" + } + ] + } + ] + }, + { + "name": "status", + "item": [ + { + "name": "auth", + "item": [ + { + "name": "Returns OK if the requester is authenticated and allowed to execute\r\nrequests against this service.", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/status/auth?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "status", + "auth" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/status/auth?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "status", + "auth" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Returns the status of the Core API service.", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/status?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "status" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/status?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "status" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Returns the allowed HTTP methods for the Core API service.", + "request": { + "method": "OPTIONS", + "header": [], + "url": { + "raw": "{{baseUrl}}/status?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "status" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "OPTIONS", + "header": [], + "url": { + "raw": "{{baseUrl}}/status?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "status" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "userprofiles", + "item": [ + { + "name": "agents", + "item": [ + { + "name": "Retrieves a list of global and private agents.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/userprofiles/agents?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "userprofiles", + "agents" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "text/plain" + } + ], + "url": { + "raw": "{{baseUrl}}/userprofiles/agents?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "userprofiles", + "agents" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"name\": \"\",\n \"private\": \"\"\n },\n {\n \"name\": \"\",\n \"private\": \"\"\n }\n]" + } + ] + } + ] + }, + { + "name": "Retrieves the branding information for the client.", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/userprofiles?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "userprofiles" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "response": [ + { + "name": "Success", + "originalRequest": { + "method": "GET", + "header": [], + "url": { + "raw": "{{baseUrl}}/userprofiles?api-version=1.0", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "userprofiles" + ], + "query": [ + { + "key": "api-version", + "value": "1.0", + "description": "The requested API version" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "baseUrl", + "value": "https://localhost:63279" + }, + { + "key": "agentHint", + "value": "{\"name\": \"default\", \"private\": false}", + "type": "string" + } + ] +} \ No newline at end of file From 96fd35f5de49a7df5dd50e932cf406613d3ed4d3 Mon Sep 17 00:00:00 2001 From: joelhulen Date: Fri, 26 Jan 2024 13:44:51 -0500 Subject: [PATCH 4/4] Add missing agent hint headers to the Postman collection --- docs/FoundationaLLM.Core.API.postman_collection.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/FoundationaLLM.Core.API.postman_collection.json b/docs/FoundationaLLM.Core.API.postman_collection.json index 6311d66f6b..d0b562fd58 100644 --- a/docs/FoundationaLLM.Core.API.postman_collection.json +++ b/docs/FoundationaLLM.Core.API.postman_collection.json @@ -80,6 +80,11 @@ { "key": "Content-Type", "value": "application/json" + }, + { + "key": "X-AGENT-HINT", + "value": "{{agentHint}}", + "type": "text" } ], "body": { @@ -600,6 +605,11 @@ { "key": "Accept", "value": "text/plain" + }, + { + "key": "X-AGENT-HINT", + "value": "{{agentHint}}", + "type": "text" } ], "body": {