For the same code, I run it on Google Colab and it does not time out, but in local Python it prompts that the llm call timed out and reports an error:
nfo: request_timeout: None
timeout: None. Received Model Group=gpt-4o-2024-11-20
Available Model Group Fallbacks=None LiteLLM Retried: 2 times, LiteLLM Max Retries: 3
my code:
`from paperqa import Settings, ask, agent_query
from paperqa.settings import AgentSettings
import os
import openai
OPENAI_API_KEY = "sk-......."
os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY
openai.api_key = OPENAI_API_KEY
print("✅ OpenAI API key configured successfully!")
answer = ask(
"what is PaperQA2?",
settings=Settings(
llm="gpt-4o-2024-11-20",
summary_llm="gpt-4o-2024-11-20",
agent=AgentSettings(
agent_llm="gpt-4o-2024-11-20",
search_count=6,
timeout=600.0,
),
embedding="text-embedding-3-large",
answer=dict(
evidence_k=8,
answer_max_sources=4,
evidence_summary_length="about 80 words",
answer_length="about 150 words, but can be longer",
max_concurrent_requests=2,
),
parsing=dict(
chunk_size=4000,
overlap=200,
),
verbosity=1,
)
)`
ps:My test code and paperqa2.pdf are in the same folder
For the same code, I run it on Google Colab and it does not time out, but in local Python it prompts that the llm call timed out and reports an error:
nfo: request_timeout: None
timeout: None. Received Model Group=gpt-4o-2024-11-20
Available Model Group Fallbacks=None LiteLLM Retried: 2 times, LiteLLM Max Retries: 3
my code:
`from paperqa import Settings, ask, agent_query
from paperqa.settings import AgentSettings
import os
import openai
OPENAI_API_KEY = "sk-......."
os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY
openai.api_key = OPENAI_API_KEY
print("✅ OpenAI API key configured successfully!")
answer = ask(
"what is PaperQA2?",
settings=Settings(
llm="gpt-4o-2024-11-20",
summary_llm="gpt-4o-2024-11-20",
ps:My test code and paperqa2.pdf are in the same folder