Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KernelHttpServer sample app returns 404 #1303

Closed
andreas-deruiter opened this issue Jun 1, 2023 · 2 comments
Closed

KernelHttpServer sample app returns 404 #1303

andreas-deruiter opened this issue Jun 1, 2023 · 2 comments

Comments

@andreas-deruiter
Copy link

Describe the bug
KernelHttpServer is calling the Chat endpoint instead of the Text completion endpoint. Because of this, sample apps like the Book Creator App calling it get the following:

Invalid request: The request is not valid, HTTP status: 404 - Detail: This is not a chat model and thus not supported in the v1/chat/completions endpoint. Did you mean to use v1/completions?
Status: 404 (Not Found)

Content:
{
"error": {
"message": "This is not a chat model and thus not supported in the v1/chat/completions endpoint. Did you mean to use v1/completions?",
"type": "invalid_request_error",
"param": "model",
"code": null
}
}

Headers:
Date: Thu, 01 Jun 2023 16:56:14 GMT
Connection: keep-alive
Access-Control-Allow-Origin: REDACTED
openai-organization: REDACTED
openai-processing-ms: REDACTED
openai-version: REDACTED
Strict-Transport-Security: REDACTED
x-ratelimit-limit-requests: REDACTED
x-ratelimit-limit-tokens: REDACTED
x-ratelimit-remaining-requests: REDACTED
x-ratelimit-remaining-tokens: REDACTED
x-ratelimit-reset-requests: REDACTED
x-ratelimit-reset-tokens: REDACTED
X-Request-ID: REDACTED
CF-Cache-Status: REDACTED
Server: cloudflare
CF-RAY: REDACTED
Alt-Svc: REDACTED
Content-Type: application/json
Content-Length: 236

This bug was probably introduced in PR #1279. SemanticKernelFactory.cs line 49 should call AddOpenAITextCompletionService() instead of AddOpenAIChatCompletionService(). Line 54 should call AddAzureTextCompletionService() instead of AddAzureChatCompletionService()

@craigomatic
Copy link
Contributor

We updated the samples to use chat completion models, if you use gpt35 turbo or gpt4 you should not see this error.

@evchaki evchaki added the samples label Jun 1, 2023
@andreas-deruiter
Copy link
Author

OK, got it, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants