Skip to content

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: #1066

Description

@egtai

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions