Skip to content

add #216

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

Merged
merged 6 commits into from
Jun 13, 2025
Merged

add #216

merged 6 commits into from
Jun 13, 2025

Conversation

wemoveon2
Copy link
Contributor

@wemoveon2 wemoveon2 commented Jun 12, 2025

This pull request introduces significant enhancements to the testing framework for public models, focusing on integration with OpenAI-compatible endpoints and improving test reliability through retry mechanisms. It also adds new dependencies to support OpenAI API usage. Below is a summary of the most important changes.

Integration with OpenAI-compatible endpoints:

  • Added helper functions _call_openai_model and _list_featured_models to test OpenAI-compatible models with retry logic for chat completions and image generation. These functions include error handling and parameter corrections for API compatibility. (tests/public_models/test_public_models_predicts.py, tests/public_models/test_public_models_predicts.pyR356-R500)
  • Introduced new test functions test_openai_compatible_endpoint_on_featured_models and test_openai_compatible_endpoint_on_featured_models_async to validate OpenAI-compatible endpoints on featured models, both synchronously and asynchronously. (tests/public_models/test_public_models_predicts.py, tests/public_models/test_public_models_predicts.pyR356-R500)

Improvements to test reliability:

Dependency updates:

  • Added openai==1.86.0 to tests/requirements.txt to enable OpenAI API integration. (tests/requirements.txt, tests/requirements.txtR5)

@wemoveon2 wemoveon2 requested review from ackizilkale and Copilot June 12, 2025 16:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds end-to-end integration tests for the new OpenAI-compatible Clarifai endpoint, covering both synchronous and asynchronous flows.

  • Introduces API_KEY constant sourced from CLARIFAI_PAT
  • Adds helper functions (_call_openai_model, _list_featured_models) for sync/async calls
  • Implements synchronous (test_openai_compatible_endpoint_on_featured_models) and async (test_openai_compatible_endpoint_on_featured_models_async) integration tests

Copy link
Contributor

@ackizilkale ackizilkale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@wemoveon2 wemoveon2 requested a review from ackizilkale June 12, 2025 19:52
@wemoveon2 wemoveon2 force-pushed the add-tests branch 2 times, most recently from fb4ed95 to 9338767 Compare June 12, 2025 21:08
@wemoveon2 wemoveon2 merged commit 98bfa0a into master Jun 13, 2025
6 checks passed
@wemoveon2 wemoveon2 deleted the add-tests branch June 13, 2025 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants