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

Bug: INFO:openai._base_client:Retrying request to /chat/completions in ... seconds #666

Open
ErfolgreichCharismatisch opened this issue Dec 27, 2024 · 0 comments

Comments

@ErfolgreichCharismatisch
Copy link

ErfolgreichCharismatisch commented Dec 27, 2024

What happened?

I am using

import logging
logger = logging.getLogger(__name__)
logging.basicConfig(filename='mylog.log', encoding='utf-8', level=logging.INFO)
logger.info("Anfrage: "+str(System) + " "+str(Prompt)) #System and Prompt sent to the ai

and

def ki(system, user):
    client = OpenAI(
        base_url="http://localhost:8080/v1", # "http://<Your api-server IP>:port"
        api_key = "sk-no-key-required"
    )
    completion = client.chat.completions.create(
        model="LLaMA_CPP",
        messages=[
            {
                'role': 'system',
                'content': system,
            },
            {
                'role': 'user',
                'content': user,
            },
        ]
    )
    
    return completion.choices[0].message.content

And I get

INFO:openai._base_client:Retrying request to /chat/completions in 0.404439 seconds
INFO:openai._base_client:Retrying request to /chat/completions in 0.981867 seconds

to every request after a while even though at the beginning it works.

Version

llamafile v0.8.9

What operating system are you seeing the problem on?

Linux

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

No branches or pull requests

1 participant