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

Feature/agent audio and images endpoints #27

Merged
merged 4 commits into from
May 3, 2024

Conversation

dockhardman
Copy link
Owner

ENH: Implement agent mode for audio and image endpoints

  • Add support for agent mode in audio speech, transcription, and translation endpoints
  • Implement agent mode for image generation, edit, and variation endpoints
  • Retrieve model information from ModelDiscovery and route requests to the appropriate model
  • Update tests to cover agent mode functionality

- Add audio speech, transcription, and translation request handling logic
- Retrieve appropriate models from ModelDiscovery based on request
- Utilize OpenAI client to process audio requests with selected models
- Return StreamingResponse for speech and regular responses for others
- Raise HTTPException if requested model is not found
- Add test case for /v1/audio/speech endpoint
- Add test case for /v1/audio/transcriptions endpoint
- Add test case for /v1/audio/translations endpoint
- Add request handling logic for `/images/generations`, `/images/edits`,
  and `/images/variations` endpoints
- Retrieve appropriate model based on request and model discovery
- Use OpenAI client to generate, edit, or create variations of images
- Return the generated image response
- Log relevant information and handle model not found error
- Add test for /v1/images/generations endpoint
- Add test for /v1/images/edits endpoint
- Add test for /v1/images/variations endpoint
- Use TestClient to make requests and assert status code 200
- Validate request data using pydantic models
- Reload languru.server.main module for each test
Copy link
Owner Author

@dockhardman dockhardman left a comment

Choose a reason for hiding this comment

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

ok

@dockhardman dockhardman merged commit e81a538 into master May 3, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

None yet

1 participant