semantic-kernel
semantic-kernel copied to clipboard
Unable to generate bot response. Details: Error: 400: => Runtime error: Function `ChatSkill.ExtractUserMemories` execution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
Unable to generate bot response.
fail: Microsoft.SemanticKernel.IKernel[0]
Something went wrong when invoking function with custom input: ChatSkill.ExtractUserMemories. Error: Invalid request: The request is not valid, HTTP status: 404
Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func1 request) at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.InternalGenerateTextEmbeddingsAsync(IList1 data, CancellationToken cancellationToken)
at Microsoft.SemanticKernel.AI.Embeddings.EmbeddingGenerationExtensions.GenerateEmbeddingAsync[TValue,TEmbedding](IEmbeddingGeneration2 generator, TValue value, CancellationToken cancellationToken) at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+MoveNext() at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult() at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill.ExtractUserMemoriesAsync(SKContext context) in D:\.net core\semantic-kernel\samples\apps\copilot-chat-app\webapi\CopilotChat\Skills\ChatSkills\ChatSkill.cs:line 166 at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill.ExtractUserMemoriesAsync(SKContext context) in D:\.net core\semantic-kernel\samples\apps\copilot-chat-app\webapi\CopilotChat\Skills\ChatSkills\ChatSkill.cs:line 166 at Microsoft.SemanticKernel.SkillDefinition.SKFunction.InvokeNativeAsync(SKContext context) at Microsoft.SemanticKernel.SkillDefinition.SKFunctionExtensions.InvokeWithCustomInputAsync(ISKFunction function, ContextVariables input, ISemanticTextMemory memory, IReadOnlySkillCollection skills, ILogger log, CancellationToken cancellationToken) fail: Microsoft.SemanticKernel.IKernel[0] Function ChatSkill.ExtractUserMemoriesexecution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404 fail: Microsoft.SemanticKernel.IKernel[0] Something went wrong while rendering the semantic function or while executing the text completion. Function: ChatSkill.funcf79466f0e9f942929614864fad9a1f72. Error: Runtime error: FunctionChatSkill.ExtractUserMemoriesexecution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404 Microsoft.SemanticKernel.TemplateEngine.TemplateException: Runtime error: FunctionChatSkill.ExtractUserMemories execution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404 ---> Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404 at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func1 request)
at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.InternalGenerateTextEmbeddingsAsync(IList1 data, CancellationToken cancellationToken) at Microsoft.SemanticKernel.AI.Embeddings.EmbeddingGenerationExtensions.GenerateEmbeddingAsync[TValue,TEmbedding](IEmbeddingGeneration2 generator, TValue value, CancellationToken cancellationToken)
at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+MoveNext()
at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill.ExtractUserMemoriesAsync(SKContext context) in D:.net core\semantic-kernel\samples\apps\copilot-chat-app\webapi\CopilotChat\Skills\ChatSkills\ChatSkill.cs:line 166
at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill.ExtractUserMemoriesAsync(SKContext context) in D:.net core\semantic-kernel\samples\apps\copilot-chat-app\webapi\CopilotChat\Skills\ChatSkills\ChatSkill.cs:line 166
at Microsoft.SemanticKernel.SkillDefinition.SKFunction.InvokeNativeAsync(SKContext context)
at Microsoft.SemanticKernel.SkillDefinition.SKFunctionExtensions.InvokeWithCustomInputAsync(ISKFunction function, ContextVariables input, ISemanticTextMemory memory, IReadOnlySkillCollection skills, ILogger log, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.SemanticKernel.TemplateEngine.Blocks.CodeBlock.RenderFunctionCallAsync(FunctionIdBlock fBlock, SKContext context)
at Microsoft.SemanticKernel.TemplateEngine.Blocks.CodeBlock.RenderCodeAsync(SKContext context)
at Microsoft.SemanticKernel.TemplateEngine.PromptTemplateEngine.RenderAsync(IList1 blocks, SKContext context) at Microsoft.SemanticKernel.TemplateEngine.PromptTemplateEngine.RenderAsync(String templateText, SKContext context) at Microsoft.SemanticKernel.SemanticFunctions.PromptTemplate.RenderAsync(SKContext executionContext) at Microsoft.SemanticKernel.SkillDefinition.SKFunction.<>c__DisplayClass19_0.<<FromSemanticConfig>g__LocalFunc|0>d.MoveNext() fail: Microsoft.SemanticKernel.IKernel[0] Runtime error: Function ChatSkill.ExtractUserMemoriesexecution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404: Microsoft.SemanticKernel.TemplateEngine.TemplateException: Runtime error: FunctionChatSkill.ExtractUserMemories execution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404 ---> Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404 at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func1 request)
at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.InternalGenerateTextEmbeddingsAsync(IList1 data, CancellationToken cancellationToken) at Microsoft.SemanticKernel.AI.Embeddings.EmbeddingGenerationExtensions.GenerateEmbeddingAsync[TValue,TEmbedding](IEmbeddingGeneration2 generator, TValue value, CancellationToken cancellationToken)
at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+MoveNext()
at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill.ExtractUserMemoriesAsync(SKContext context) in D:.net core\semantic-kernel\samples\apps\copilot-chat-app\webapi\CopilotChat\Skills\ChatSkills\ChatSkill.cs:line 166
at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill.ExtractUserMemoriesAsync(SKContext context) in D:.net core\semantic-kernel\samples\apps\copilot-chat-app\webapi\CopilotChat\Skills\ChatSkills\ChatSkill.cs:line 166
at Microsoft.SemanticKernel.SkillDefinition.SKFunction.InvokeNativeAsync(SKContext context)
at Microsoft.SemanticKernel.SkillDefinition.SKFunctionExtensions.InvokeWithCustomInputAsync(ISKFunction function, ContextVariables input, ISemanticTextMemory memory, IReadOnlySkillCollection skills, ILogger log, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.SemanticKernel.TemplateEngine.Blocks.CodeBlock.RenderFunctionCallAsync(FunctionIdBlock fBlock, SKContext context)
at Microsoft.SemanticKernel.TemplateEngine.Blocks.CodeBlock.RenderCodeAsync(SKContext context)
at Microsoft.SemanticKernel.TemplateEngine.PromptTemplateEngine.RenderAsync(IList1 blocks, SKContext context) at Microsoft.SemanticKernel.TemplateEngine.PromptTemplateEngine.RenderAsync(String templateText, SKContext context) at Microsoft.SemanticKernel.SemanticFunctions.PromptTemplate.RenderAsync(SKContext executionContext) at Microsoft.SemanticKernel.SkillDefinition.SKFunction.<>c__DisplayClass19_0.<<FromSemanticConfig>g__LocalFunc|0>d.MoveNext() fail: Microsoft.SemanticKernel.IKernel[0] Function call fail during pipeline step 0: ChatSkill.Chat. Error: Runtime error: Function ChatSkill.ExtractUserMemories` execution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
Hello!
This is likely because your AIService was not set up correctly. Please share you AIService settings (hide any keys), or follow the ReadMe to make sure you have the correct settings.
Hello, Thank you for replying to me.Please see the configuration nearby. Could you please take a look? Thank you.
At 2023-05-25 01:48:38, "Tao Chen" @.***> wrote:
Hello!
This is likely because your AIService was not set up correctly. Please share you AIService settings (hide any keys), or follow the ReadMe to make sure you have the correct settings.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Hello!
Your response doesn't seem to contain the information requested. Please send again :)
error: fail: Microsoft.SemanticKernel.IKernel[0]
Something went wrong when invoking function with custom input: ChatSkill.ExtractUserMemories. Error: Invalid request: The request is not valid, HTTP status: 404
Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func`1 request)
at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.InternalGenerateTextEmbeddingsAsync(IList`1 data, CancellationToken cancellationToken)
at Microsoft.SemanticKernel.AI.Embeddings.EmbeddingGenerationExtensions.GenerateEmbeddingAsync[TValue,TEmbedding](IEmbeddingGeneration`2 generator, TValue value, CancellationToken cancellationToken)
at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+MoveNext()
at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill.ExtractUserMemoriesAsync(SKContext context) in D:\.net core\semantic-kernel\samples\apps\copilot-chat-app\webapi\CopilotChat\Skills\ChatSkills\ChatSkill.cs:line 166
at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill.ExtractUserMemoriesAsync(SKContext context) in D:\.net core\semantic-kernel\samples\apps\copilot-chat-app\webapi\CopilotChat\Skills\ChatSkills\ChatSkill.cs:line 166
at Microsoft.SemanticKernel.SkillDefinition.SKFunction.InvokeNativeAsync(SKContext context)
at Microsoft.SemanticKernel.SkillDefinition.SKFunctionExtensions.InvokeWithCustomInputAsync(ISKFunction function, ContextVariables input, ISemanticTextMemory memory, IReadOnlySkillCollection skills, ILogger log, CancellationToken cancellationToken)
fail: Microsoft.SemanticKernel.IKernel[0]
Function `ChatSkill.ExtractUserMemories` execution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
fail: Microsoft.SemanticKernel.IKernel[0]
Something went wrong while rendering the semantic function or while executing the text completion. Function: ChatSkill.func18d07838d94149c39641a0728e453432. Error: Runtime error: Function `ChatSkill.ExtractUserMemories` execution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
Microsoft.SemanticKernel.TemplateEngine.TemplateException: Runtime error: Function `ChatSkill.ExtractUserMemories` execution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
---> Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func`1 request)
at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.InternalGenerateTextEmbeddingsAsync(IList`1 data, CancellationToken cancellationToken)
at Microsoft.SemanticKernel.AI.Embeddings.EmbeddingGenerationExtensions.GenerateEmbeddingAsync[TValue,TEmbedding](IEmbeddingGeneration`2 generator, TValue value, CancellationToken cancellationToken)
at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+MoveNext()
at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill.ExtractUserMemoriesAsync(SKContext context) in D:\.net core\semantic-kernel\samples\apps\copilot-chat-app\webapi\CopilotChat\Skills\ChatSkills\ChatSkill.cs:line 166
at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill.ExtractUserMemoriesAsync(SKContext context) in D:\.net core\semantic-kernel\samples\apps\copilot-chat-app\webapi\CopilotChat\Skills\ChatSkills\ChatSkill.cs:line 166
at Microsoft.SemanticKernel.SkillDefinition.SKFunction.InvokeNativeAsync(SKContext context)
at Microsoft.SemanticKernel.SkillDefinition.SKFunctionExtensions.InvokeWithCustomInputAsync(ISKFunction function, ContextVariables input, ISemanticTextMemory memory, IReadOnlySkillCollection skills, ILogger log, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.SemanticKernel.TemplateEngine.Blocks.CodeBlock.RenderFunctionCallAsync(FunctionIdBlock fBlock, SKContext context)
at Microsoft.SemanticKernel.TemplateEngine.Blocks.CodeBlock.RenderCodeAsync(SKContext context)
at Microsoft.SemanticKernel.TemplateEngine.PromptTemplateEngine.RenderAsync(IList`1 blocks, SKContext context)
at Microsoft.SemanticKernel.TemplateEngine.PromptTemplateEngine.RenderAsync(String templateText, SKContext context)
at Microsoft.SemanticKernel.SemanticFunctions.PromptTemplate.RenderAsync(SKContext executionContext)
at Microsoft.SemanticKernel.SkillDefinition.SKFunction.<>c__DisplayClass19_0.<<FromSemanticConfig>g__LocalFunc|0>d.MoveNext()
fail: Microsoft.SemanticKernel.IKernel[0]
Runtime error: Function `ChatSkill.ExtractUserMemories` execution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404: Microsoft.SemanticKernel.TemplateEngine.TemplateException: Runtime error: Function `ChatSkill.ExtractUserMemories` execution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
---> Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.RunRequestAsync[T](Func`1 request)
at Microsoft.SemanticKernel.Connectors.AI.OpenAI.AzureSdk.ClientBase.InternalGenerateTextEmbeddingsAsync(IList`1 data, CancellationToken cancellationToken)
at Microsoft.SemanticKernel.AI.Embeddings.EmbeddingGenerationExtensions.GenerateEmbeddingAsync[TValue,TEmbedding](IEmbeddingGeneration`2 generator, TValue value, CancellationToken cancellationToken)
at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+MoveNext()
at Microsoft.SemanticKernel.Memory.SemanticTextMemory.SearchAsync(String collection, String query, Int32 limit, Double minRelevanceScore, Boolean withEmbeddings, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill.ExtractUserMemoriesAsync(SKContext context) in D:\.net core\semantic-kernel\samples\apps\copilot-chat-app\webapi\CopilotChat\Skills\ChatSkills\ChatSkill.cs:line 166
at SemanticKernel.Service.CopilotChat.Skills.ChatSkills.ChatSkill.ExtractUserMemoriesAsync(SKContext context) in D:\.net core\semantic-kernel\samples\apps\copilot-chat-app\webapi\CopilotChat\Skills\ChatSkills\ChatSkill.cs:line 166
at Microsoft.SemanticKernel.SkillDefinition.SKFunction.InvokeNativeAsync(SKContext context)
at Microsoft.SemanticKernel.SkillDefinition.SKFunctionExtensions.InvokeWithCustomInputAsync(ISKFunction function, ContextVariables input, ISemanticTextMemory memory, IReadOnlySkillCollection skills, ILogger log, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.SemanticKernel.TemplateEngine.Blocks.CodeBlock.RenderFunctionCallAsync(FunctionIdBlock fBlock, SKContext context)
at Microsoft.SemanticKernel.TemplateEngine.Blocks.CodeBlock.RenderCodeAsync(SKContext context)
at Microsoft.SemanticKernel.TemplateEngine.PromptTemplateEngine.RenderAsync(IList`1 blocks, SKContext context)
at Microsoft.SemanticKernel.TemplateEngine.PromptTemplateEngine.RenderAsync(String templateText, SKContext context)
at Microsoft.SemanticKernel.SemanticFunctions.PromptTemplate.RenderAsync(SKContext executionContext)
at Microsoft.SemanticKernel.SkillDefinition.SKFunction.<>c__DisplayClass19_0.<<FromSemanticConfig>g__LocalFunc|0>d.MoveNext()
fail: Microsoft.SemanticKernel.IKernel[0]
Function call fail during pipeline step 0: ChatSkill.Chat. Error: Runtime error: Function `ChatSkill.ExtractUserMemories` execution failed. Microsoft.SemanticKernel.AI.AIException: Invalid request: The request is not valid, HTTP status: 404
config:
"AIService": {
"Type": "AzureOpenAI",
"Key": "a8f0d94f2bb64e3a8be4f0032431514c",
"Endpoint": "https://auto-dev-gpt02.openai.azure.com/", // ignored when AIService is "OpenAI"
//"Endpoint": "https://auto-dev-gpt02.openai.azure.com/openai/deployments/devgpt02/chat/completions?api-version=2023-03-15-preview", // ignored when AIService is "OpenAI"
"Models": {
"Completion": "devgpt02",
"Planner": "devgpt02",
//"Completion": "gpt-35-turbo", // For OpenAI, change to 'gpt-3.5-turbo' (with a period).
//"Planner": "gpt-35-turbo", // For OpenAI, change to 'gpt-3.5-turbo' (with a period).
//"Completion": "gpt-3.5-turbo", // For OpenAI
//"Planner": "gpt-3.5-turbo", // For OpenAI
"Embedding": "text-embedding-ada-002"
}
}
"Authorization": {
//"Type": "None",
//"ApiKey": "",
"ApiKey": "a8f0d94f2bb64e3a8be4f0032431514c",
//"AzureAd": {
// "Instance": "https://login.microsoftonline.com/",
// "TenantId": "",
// "ClientId": "",
// "Scopes": "access_as_user" // Scopes that the client app requires to access the API
//}
}
At 2023-05-26 03:33:44, "Tao Chen" @.***> wrote:
Hello!
Your response doesn't seem to contain the information requested. Please send again :)
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
I had the same issue- check if you have a config/settings.json file and if it is correct. I re-ran the 0-AI-settings.ipynb notebook using VS Code and that seems to have have corrected the issue for me. hope this helps you.
Thanks
At 2023-05-28 08:48:04, "roger-mccann" @.***> wrote:
I had the same issue- check if you have a config/settings.json file and if it is correct. I re-ran the 0-AI-settings.ipynb notebook using VS Code and that seems to have have corrected the issue for me. hope this helps you.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
@xuyaqiang were you able to get unblocked here?
Closing now as it appears this issue has been resolved. Please reopen as needed.
we are also getting the same kind of error. However, we are getting only if we enter something in between ${{ }} Example: ${{parameters.SOMETHING}}. I feel it is the regex on chatHistoryItem is giving trouble.