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

Error: Expected content-type to be text/event-stream, Actual: application/json; charset=utf-8 #10

Open
topcook opened this issue Jul 3, 2023 · 3 comments

Comments

@topcook
Copy link

topcook commented Jul 3, 2023

When I try to run this project, I got this error.
It is caught in query.ts file.
image
this function occurs this error.
What is the solution?
Thanks.

@haimh
Copy link

haimh commented Jul 7, 2023

Just replaced modelName from "gpt-4" to "gpt-turbo-3.5-16k" in "./lib/chain.ts" then it worked like a champ in my case. Hope that help!
================== ./lib/chain.ts =============
const docChain = loadQAChain(
new OpenAIChat({
temperature: 0,
modelName: "gpt-3.5-turbo-16k", //change this to older versions (e.g. gpt-3.5-turbo) if you don't have access to gpt-4
streaming: Boolean(onTokenStream),
callbackManager: onTokenStream
? CallbackManager.fromHandlers({
async handleLLMNewToken(token) {
onTokenStream(token)
},
})
: undefined,
}),
{ prompt: IMPROVED_QA_PROMPT }
)

@topcook
Copy link
Author

topcook commented Jul 7, 2023

@haimh
Thanks for your reply.
But I still got that error.
Could you share the github repo working in your side?
Thanks.

@haimh
Copy link

haimh commented Jul 7, 2023

@haimh Thanks for your reply. But I still got that error. Could you share the github repo working in your side? Thanks.

I used main repo in github. Good luck!

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

2 participants