bklieger-groq / g1

g1: Using Llama-3.1 70b on Groq to create o1-like reasoning chains
MIT License
3.82k stars 347 forks source link

Failed to generate step after 3 attempts. Error: local variable 'client' referenced before assignment #29

Closed jianlingl closed 1 month ago

jianlingl commented 1 month ago

I run according to the readme but get Failed to generate step after 3 attempts. Error: local variable 'client' referenced before assignment what does this mean?

dashi6174 commented 1 month ago
...
def make_api_call(messages, max_tokens, is_final_answer=False, custom_client=None):
    **global client**

    if custom_client != None:
        client = custom_client
...

add global client can fix this bug

jianlingl commented 1 month ago
font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}

    Thanks!And another problem occurred:“Please enable cookies.Sorry, you have been blockedYou are unable to access groq.com"
How can I fix this problem?Thanks for your time.Jailing li

---- Replied Message ----

     From 

        ***@***.***>

     Date 

    09/24/2024 16:12

     To 

        ***@***.***>

     Cc 

        ***@***.***>
        ,

        ***@***.***>

     Subject 

          Re: [bklieger-groq/g1] Failed to generate step after 3 attempts. Error: local variable 'client' referenced before assignment (Issue #29)

... def make_api_call(messages, max_tokens, is_final_answer=False, custom_client=None): global client

if custom_client != None:
    client = custom_client

... add global client can fix this bug

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

bklieger-groq commented 1 month ago
...
def make_api_call(messages, max_tokens, is_final_answer=False, custom_client=None):
    **global client**

    if custom_client != None:
        client = custom_client
...

add global client can fix this bug

Thank you. This will be added via #28.

bklieger-groq commented 1 month ago

Thanks!And another problem occurred:“Please enable cookies.Sorry, you have been blockedYou are unable to access groq.com" How can I fix this problem?Thanks for your time.Jailing li

This looks like an issue with your access to Groq. Please reach out to Groq to troubleshoot (https://groq.com/contact/).