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

chore: fix openai vision models #4246

Merged
merged 1 commit into from
Dec 9, 2024
Merged

chore: fix openai vision models #4246

merged 1 commit into from
Dec 9, 2024

Conversation

louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Dec 9, 2024

Describe Your Changes

This press release aims to enable the OpenAI GPT-4o model’s vision capabilities.

Fixes Issues

Changes made

The code changes in this Git diff involve three primary modifications across different files:

  1. package.json:

    • The version of the @janhq/inference-openai-extension package is updated from 1.0.4 to 1.0.5.
  2. models.json:

    • In the JSON configuration for a model with the "version" set to "1.1", a new entry "vision_model": true is added within the "settings" object.
  3. index.ts:

    • A new check is introduced in the transformPayload method to remove the stop property from the payload if it is an empty array. If payload.stop is an empty array, it uses destructuring to omit stop and reassigns the remaining parameters back to payload. This is done before the existing transformation logic for preview models.

These changes indicate a minor version update with an addition to the model settings to support a vision model and a code enhancement to handle empty stop word arrays in payload transformations.

@github-actions github-actions bot added the type: chore Maintenance, operational label Dec 9, 2024
Copy link
Contributor

github-actions bot commented Dec 9, 2024

Barecheck - Code coverage report

Total: 68.82%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@louis-jan louis-jan requested a review from urmauur December 9, 2024 02:44
Copy link
Contributor

github-actions bot commented Dec 9, 2024

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

@louis-jan louis-jan merged commit 5d9332f into dev Dec 9, 2024
21 checks passed
@louis-jan louis-jan deleted the fix/openai-vision-models branch December 9, 2024 11:42
@github-actions github-actions bot added this to the v0.5.12 milestone Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore Maintenance, operational
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants