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

How to change openai inference call to docker for video? #148

Closed
cholland-nv opened this issue Nov 8, 2024 · 1 comment
Closed

How to change openai inference call to docker for video? #148

cholland-nv opened this issue Nov 8, 2024 · 1 comment

Comments

@cholland-nv
Copy link

cholland-nv commented Nov 8, 2024

How can I modify this to be used for video querying and description??


client = OpenAI(
    base_url="http://localhost:8000",
    api_key="fake-key",
)
response = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "What’s in this image?"},
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://blog.logomyway.com/wp-content/uploads/2022/01/NVIDIA-logo.jpg",
                        # Or you can pass in a base64 encoded image
                        # "url": "data:image/png;base64,<base64_encoded_image>",
                    },
                },
            ],
        }
    ],
    max_tokens=300,
    model="VILA1.5-3B",
    # You can pass in extra parameters as follows
    extra_body={"num_beams": 1, "use_cache": False},
)
print(response.choices[0].message.content)```
@Lyken17
Copy link
Collaborator

Lyken17 commented Feb 25, 2025

we have an internal branch to support that for nvidian users.

@cholland-nv could you send your request in slack # vila user?

@Lyken17 Lyken17 closed this as completed Mar 1, 2025
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