Skip to content

[Bug]: Enable Local endpoints on another network #326

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

Open
kevin-support-bot bot opened this issue Mar 18, 2025 · 2 comments
Open

[Bug]: Enable Local endpoints on another network #326

kevin-support-bot bot opened this issue Mar 18, 2025 · 2 comments

Comments

@kevin-support-bot
Copy link

All-Hands-AI#7312 Issue


@metalshanked, Would you check whether this litellm script is working?

@metalshanked
Copy link

Sure, this seems to work

ModelResponse(id='chatcmpl-edee5eb2-d579-4a1c-8fd8-4a4fb2cf7ad3', created=1742301578, model='ollama/ ...

I also use the other option of directly using Litellm endpoingts with an OpenAI client

import openai
client = openai.OpenAI(
    api_key="my_key",
    base_url="http://mylitellmlocalserver" # LiteLLM Proxy is OpenAI compatible, Read More: https://docs.litellm.ai/docs/proxy/user_keys
)

response = client.chat.completions.create(
    model="ollama", # model to send to the proxy
    messages = [
        {
            "role": "user",
            "content": "this is a test request, write a short poem"
        }
    ]
)

print(response)

@SmartManoj
Copy link
Owner

Does this work in the docker "openhands app" container's terminal?

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

No branches or pull requests

2 participants