Comments (9)
I tried some googling and changed the model to:
modelName: 'gpt-3.5-turbo'
and now it seems to work. @sdugoten - can you try to change the modelName and see if it works for you?
Reference to the docs for a list of supported modelNames
ok, it does seems to be the model name, you have to use "gpt-3.5-turbo" instead of "gpt-3.5". I am gonna try my own pdf and see if that works.
from gpt4-pdf-chatbot-langchain.
For future readers: Yes. You are running into problems with text-davinci-003
because the OpenAI wrapper is hitting the https://api.openai.com/v1/chat/completions
endpoint.
These are the supported models for this endpoint:
gpt-4, gpt-4-0314, gpt-4-32k, gpt-4-32k-0314, gpt-3.5-turbo, gpt-3.5-turbo-0301
from gpt4-pdf-chatbot-langchain.
Can you provide more information on the source code behind this error? It appears to be an issue with your API keys.
from gpt4-pdf-chatbot-langchain.
Can you provide more information on the source code behind this error? It appears to be an issue with your API keys.
where can I give you more information so that I can help you to troubleshoot? I just follow the instruction from your main page https://github.com/mayooear/gpt4-pdf-chatbot-langchain and run the program.
I basically generate the openAI key in user setting page, and paste it inside .env
The entry looks something like this
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxohrzgxxxxx6BM
from gpt4-pdf-chatbot-langchain.
Hey. Thanks for the repo and the work you put in! I have the same error.
const docChain = loadQAChain(
new OpenAIChat({
temperature: 0,
modelName: 'text-davinci-003', // <--
streaming: Boolean(onTokenStream),
callbackManager: onTokenStream
? CallbackManager.fromHandlers({
async handleLLMNewToken(token) {
onTokenStream(token);
console.log(token);
},
})
: undefined,
}),
{ prompt: QA_PROMPT },
);
This is the only part I changed in the code.
This is the output I get from running curl https://api.openai.com/v1/models -H "Authorization: Bearer XXX"
// ...
{
"id": "text-davinci-003",
"object": "model",
"created": 1669599635,
"owned_by": "openai-internal",
"permission": [
{
"id": "modelperm",
"object": "model_permission",
"created": 1678585020,
"allow_create_engine": false,
"allow_sampling": true,
"allow_logprobs": true,
"allow_search_indices": false,
"allow_view": true,
"allow_fine_tuning": false,
"organization": "*",
"group": null,
"is_blocking": false
}
],
"root": "text-davinci-003",
"parent": null
},
// ...
These are my pinecone settings. I am not familiar with pinecone, so I copied (or thought that I copied) your values:
from gpt4-pdf-chatbot-langchain.
You can see the error in action here
https://www.youtube.com/watch?v=s82PalNVJiM
from gpt4-pdf-chatbot-langchain.
I tried some googling and changed the model to:
modelName: 'gpt-3.5-turbo'
and now it seems to work. @sdugoten - can you try to change the modelName and see if it works for you?
Reference to the docs for a list of supported modelNames
from gpt4-pdf-chatbot-langchain.
@ankri great find here! Appreciate it. Are you running into errors with text-davinci-003
?
from gpt4-pdf-chatbot-langchain.
For future readers: Yes. You are running into problems with
text-davinci-003
because the OpenAI wrapper is hitting thehttps://api.openai.com/v1/chat/completions
endpoint.These are the supported models for this endpoint:
gpt-4, gpt-4-0314, gpt-4-32k, gpt-4-32k-0314, gpt-3.5-turbo, gpt-3.5-turbo-0301
Good catch!
from gpt4-pdf-chatbot-langchain.
Related Issues (20)
- how do i ssl? HOT 3
- Conversion of code into Python HOT 1
- PineconeError: Error, message length too large: found 5453452 bytes, the limit is: 4194304 bytes HOT 6
- source output HOT 1
- How to include more than 4 results from Pinecone? HOT 3
- How to change the BaseUrl if I use a proxy HOT 1
- Can ChatGPT 3.5 be supported? HOT 6
- Text words overlay display HOT 1
- Does this project accepts image read from PDF? HOT 5
- Enhancement - ability to use a graph database such as neo4j instead of vector database HOT 1
- enhancement - integrate with llamaindex HOT 3
- Explain data ingestion code. HOT 4
- s HOT 1
- "TypeError: Cannot read properties of undefined (reading 'text')" HOT 1
- error TypeError: ids is not iterable HOT 1
- Add support for Pinecone Serverless HOT 5
- Error: Azure OpenAI API instance name not found HOT 3
- FetchError: request to https://api.openai.com/v1/embeddings failed HOT 1
- run "yarn run ingest" Japanese punctuation marks were converted to Korean HOT 1
- I get this error when I open my local server: Cannot read properties of undefined (reading 'text') HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpt4-pdf-chatbot-langchain.