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] OpenFunctions-v2: <HTTP code 502> #467

Closed
philuxzhu opened this issue Jun 12, 2024 · 1 comment
Closed

[bug] OpenFunctions-v2: <HTTP code 502> #467

philuxzhu opened this issue Jun 12, 2024 · 1 comment
Labels
hosted-openfunctions-v2 Issues with OpenFunctions-v2

Comments

@philuxzhu
Copy link

Describe the bug
The example code to invoke the hosted Gorilla Openfunctions-v2 model shows HTTP code 502. Anybody knows what’s the problem?

The example code:

def get_gorilla_response(prompt="", model="gorilla-openfunctions-v2", functions=[]):
openai.api_key = "EMPTY" # Hosted for free with ❤️ from UC Berkeley
openai.api_base = "http:https://luigi.millennium.berkeley.edu:8000/v1"
try:
completion = openai.ChatCompletion.create(
model="gorilla-openfunctions-v2",
temperature=0.0,
messages=[{"role": "user", "content": prompt}],
functions=functions,
)
# completion.choices[0].message.content, string format of the function call
# completion.choices[0].message.functions, Json format of the function call
return completion.choices[0]
except Exception as e:
print(e, model, prompt)

Screenshots
image

@philuxzhu philuxzhu added the hosted-openfunctions-v2 Issues with OpenFunctions-v2 label Jun 12, 2024
@ShishirPatil
Copy link
Owner

Hey @philuxzhu the model was down then. This should now be fixed? I was able to run this without any issues. Please feel to re-open if you run into any issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hosted-openfunctions-v2 Issues with OpenFunctions-v2
Projects
None yet
Development

No branches or pull requests

2 participants