|
| 1 | +{ |
| 2 | + "$schema": "http://json.schemastore.org/template", |
| 3 | + "author": "Microsoft", |
| 4 | + "classifications": [ "Common", "AI", "Web" ], |
| 5 | + "identity": "Microsoft.Extensions.AI.Templates.Chat.CSharp", |
| 6 | + "name": "AI Chat with Custom Data", |
| 7 | + "description": "A project template for creating an AI chat application. It can perform retrieval-augmented generation (RAG) using your own data.", |
| 8 | + "shortName": "chat", |
| 9 | + "defaultName": "ChatApp", |
| 10 | + "sourceName": "ChatWithCustomData.Web", // TODO: When we support multi-project output, this needs to change to ChatWithCustomData, then we need some other technique to make it avoid emitting a .Web suffix in the single-project case |
| 11 | + "tags": { |
| 12 | + "language": "C#", |
| 13 | + "type": "project" |
| 14 | + }, |
| 15 | + "guids": [ |
| 16 | + "d5681fae-b21b-4114-b781-48180f08c0c4" |
| 17 | + ], |
| 18 | + "sources": [{ |
| 19 | + "source": "./", |
| 20 | + "target": "./", |
| 21 | + "modifiers": [ |
| 22 | + { |
| 23 | + // For now, we only produce single-project output. |
| 24 | + // Later when we support multi-project output with Qdrant on Docker, we'll also emit |
| 25 | + // a second project ChatWithCustomData.AppHost and hence will suppress this renaming. |
| 26 | + "rename": { |
| 27 | + "ChatWithCustomData.Web/": "./" |
| 28 | + } |
| 29 | + } |
| 30 | + ] |
| 31 | + }], |
| 32 | + "symbols":{ |
| 33 | + "framework": { |
| 34 | + "type": "parameter", |
| 35 | + "description": "The target framework for the project.", |
| 36 | + "datatype": "choice", |
| 37 | + "choices": [ |
| 38 | + { |
| 39 | + "choice": "net9.0", |
| 40 | + "description": "Target net9.0" |
| 41 | + } |
| 42 | + ], |
| 43 | + "replaces": "net9.0", |
| 44 | + "defaultValue": "net9.0" |
| 45 | + }, |
| 46 | + "hostIdentifier": { |
| 47 | + "type": "bind", |
| 48 | + "binding": "HostIdentifier" |
| 49 | + }, |
| 50 | + "AiServiceProvider": { |
| 51 | + "type": "parameter", |
| 52 | + "displayName": "_AI service provider", |
| 53 | + "datatype": "choice", |
| 54 | + "defaultValue": "azureopenai", |
| 55 | + "choices": [ |
| 56 | + // { |
| 57 | + // "choice": "githubmodels", |
| 58 | + // "displayName": "GitHub Models", |
| 59 | + // "description": "Uses GitHub Models" |
| 60 | + // }, |
| 61 | + { |
| 62 | + "choice": "azureopenai", |
| 63 | + "displayName": "Azure OpenAI", |
| 64 | + "description": "Uses Azure OpenAI service" |
| 65 | + }, |
| 66 | + { |
| 67 | + "choice": "openai", |
| 68 | + "displayName": "OpenAI Platform", |
| 69 | + "description": "Uses the OpenAI Platform" |
| 70 | + }, |
| 71 | + { |
| 72 | + "choice": "ollama", |
| 73 | + "displayName": "Ollama (for local development)", |
| 74 | + "description": "Uses Ollama with the llama3.2 model for local development" |
| 75 | + } |
| 76 | + // { |
| 77 | + // "choice": "azureaifoundry", |
| 78 | + // "displayName": "Azure AI Foundry (Preview)", |
| 79 | + // "description": "Uses Azure AI Foundry (Preview)" |
| 80 | + // } |
| 81 | + ] |
| 82 | + }, |
| 83 | + "UseManagedIdentity": { |
| 84 | + "type": "parameter", |
| 85 | + "displayName": "Use managed identity", |
| 86 | + "datatype": "bool", |
| 87 | + "defaultValue": "true", |
| 88 | + "isEnabled": "(AiServiceProvider == \"azureopenai\")", |
| 89 | + "description": "Use managed identity to access Azure services" |
| 90 | + }, |
| 91 | + "VectorStore": { |
| 92 | + "type": "parameter", |
| 93 | + "displayName": "_Vector store", |
| 94 | + "datatype": "choice", |
| 95 | + "defaultValue": "local", |
| 96 | + "choices": [ |
| 97 | + { |
| 98 | + "choice": "local", |
| 99 | + "displayName": "Local on-disk (for prototyping)", |
| 100 | + "description": "Uses a JSON file on disk. You can change the implementation to a real vector database before publishing." |
| 101 | + }, |
| 102 | + { |
| 103 | + "choice": "azureaisearch", |
| 104 | + "displayName": "Azure AI Search", |
| 105 | + "description": "Uses Azure AI Search. This also avoids the need to define a data ingestion pipeline, since it's managed by Azure AI Search." |
| 106 | + } |
| 107 | + ] |
| 108 | + }, |
| 109 | + "IsAzureOpenAi": { |
| 110 | + "type": "computed", |
| 111 | + "value": "(AiServiceProvider == \"azureopenai\")" |
| 112 | + }, |
| 113 | + "IsOpenAi": { |
| 114 | + "type": "computed", |
| 115 | + "value": "(AiServiceProvider == \"openai\")" |
| 116 | + }, |
| 117 | + "IsGHModels": { |
| 118 | + "type": "computed", |
| 119 | + "value": "(AiServiceProvider == \"githubmodels\")" |
| 120 | + }, |
| 121 | + "IsOllama": { |
| 122 | + "type": "computed", |
| 123 | + "value": "(AiServiceProvider == \"ollama\")" |
| 124 | + }, |
| 125 | + "IsAzureAiFoundry": { |
| 126 | + "type": "computed", |
| 127 | + "value": "(AiServiceProvider == \"azureaifoundry\")" |
| 128 | + }, |
| 129 | + "UseAzureAISearch": { |
| 130 | + "type": "computed", |
| 131 | + "value": "(VectorStore == \"azureaisearch\")" |
| 132 | + }, |
| 133 | + "UseLocalVectorStore": { |
| 134 | + "type": "computed", |
| 135 | + "value": "(VectorStore == \"local\")" |
| 136 | + }, |
| 137 | + "ChatModel": { |
| 138 | + "type": "parameter", |
| 139 | + "displayName": "Model/deployment for chat completions. Example: gpt-4o-mini", |
| 140 | + "description": "Model/deployment for chat completions. Example: gpt-4o-mini" |
| 141 | + }, |
| 142 | + "EmbeddingModel": { |
| 143 | + "type": "parameter", |
| 144 | + "displayName": "Model/deployment for embeddings. Example: text-embedding-3-small", |
| 145 | + "description": "Model/deployment for embeddings. Example: text-embedding-3-small" |
| 146 | + }, |
| 147 | + "OpenAiChatModelDefault": { |
| 148 | + "type": "generated", |
| 149 | + "generator": "constant", |
| 150 | + "parameters": { |
| 151 | + "value": "gpt-4o-mini" |
| 152 | + } |
| 153 | + }, |
| 154 | + "OpenAiEmbeddingModelDefault": { |
| 155 | + "type": "generated", |
| 156 | + "generator": "constant", |
| 157 | + "parameters": { |
| 158 | + "value": "text-embedding-3-small" |
| 159 | + } |
| 160 | + }, |
| 161 | + "OpenAiChatModel": { |
| 162 | + "type": "generated", |
| 163 | + "generator": "coalesce", |
| 164 | + "parameters": { |
| 165 | + "sourceVariableName": "ChatModel", |
| 166 | + "fallbackVariableName": "OpenAiChatModelDefault" |
| 167 | + }, |
| 168 | + "replaces": "gpt-4o-mini" |
| 169 | + }, |
| 170 | + "OpenAiEmbeddingModel": { |
| 171 | + "type": "generated", |
| 172 | + "generator": "coalesce", |
| 173 | + "parameters": { |
| 174 | + "sourceVariableName": "EmbeddingModel", |
| 175 | + "fallbackVariableName": "OpenAiEmbeddingModelDefault" |
| 176 | + }, |
| 177 | + "replaces": "text-embedding-3-small" |
| 178 | + }, |
| 179 | + "OllamaChatModelDefault": { |
| 180 | + "type": "generated", |
| 181 | + "generator": "constant", |
| 182 | + "parameters": { |
| 183 | + "value": "llama3.1" |
| 184 | + } |
| 185 | + }, |
| 186 | + "OllamaEmbeddingModelDefault": { |
| 187 | + "type": "generated", |
| 188 | + "generator": "constant", |
| 189 | + "parameters": { |
| 190 | + "value": "all-minilm" |
| 191 | + } |
| 192 | + }, |
| 193 | + "OllamaChatModel": { |
| 194 | + "type": "generated", |
| 195 | + "generator": "coalesce", |
| 196 | + "parameters": { |
| 197 | + "sourceVariableName": "ChatModel", |
| 198 | + "fallbackVariableName": "OllamaChatModelDefault" |
| 199 | + }, |
| 200 | + "replaces": "llama3.2" |
| 201 | + }, |
| 202 | + "OllamaEmbeddingModel": { |
| 203 | + "type": "generated", |
| 204 | + "generator": "coalesce", |
| 205 | + "parameters": { |
| 206 | + "sourceVariableName": "EmbeddingModel", |
| 207 | + "fallbackVariableName": "OllamaEmbeddingModelDefault" |
| 208 | + }, |
| 209 | + "replaces": "all-minilm" |
| 210 | + } |
| 211 | + } |
| 212 | +} |
0 commit comments