paper-qa
paper-qa copied to clipboard
Error Code 404
Not sure what I'm doing wrong but this is the error message I get when trying to run pqa ask:
NotFoundError: litellm.NotFoundError: OpenAIException - Error code: 404 - {'error': {'message': 'The model
gpt-4o-2024-08-06 does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None,
'code': 'model_not_found'}}
Received Model Group=gpt-4o-2024-08-06
Available Model Group Fallbacks=None
Hey @thedimpop! I'm here to assist you with any bugs, questions, or contributions you have. Let's work on solving this together!
The error message indicates that the model gpt-4o-2024-08-06 does not exist or you do not have access to it. This could be due to a typo in the model name or a lack of permissions to access the specified model.
To resolve this issue, you can try the following steps:
-
Check the Model Name: Ensure that the model name
gpt-4o-2024-08-06is correct and exists in the list of available models. -
Update the Model Configuration: If the model name is incorrect or unavailable, update the model configuration in your settings. You can specify a different model that you have access to. For example:
from paperqa import Settings, ask answer = ask( "What manufacturing challenges are unique to bispecific antibodies?", settings=Settings( llm="gpt-4o-mini", summary_llm="gpt-4o-mini", paper_directory="my_papers" ), ) -
Check Permissions: Ensure that you have the necessary permissions to access the specified model. If you are using a service like OpenAI, verify that your API key has access to the model.
-
Fallback Mechanism: Implement a fallback mechanism to handle cases where the specified model is not found. This can be done by catching the
NotFoundErrorand using an alternative model. For example:try: answer = ask( "What manufacturing challenges are unique to bispecific antibodies?", settings=Settings( llm="gpt-4o-2024-08-06", summary_llm="gpt-4o-2024-08-06" ), ) except litellm.NotFoundError: answer = ask( "What manufacturing challenges are unique to bispecific antibodies?", settings=Settings( llm="gpt-4o-mini", summary_llm="gpt-4o-mini" ), )
By following these steps, you should be able to resolve the NotFoundError and successfully run the pqa ask command.
To continue talking to Dosu, mention @dosu.
Do you have funds added to the account associated with the OpenAI API key? If yes, I would try creating a new key and testing with it.
@taabishm2 thank you. I'm making progress. Now looks like I'm hitting 30k TPM limit even when only 1 paper is in the folder. Relevant Papers=1 | Current Evidence=14, but the answer is blank. Is 30k TPM not enough to process such request?
Hi @thedimpop we are working on figuring out rate limits in https://github.com/Future-House/paper-qa/issues/377
Since it looks like your OpenAI key issue is resolved here, do you mind if I consolidate the TPM limit stuff on https://github.com/Future-House/paper-qa/issues/377?
This should be fixed by latest release and setting to use tier1_limits (or equiv tier)