stuartleeks / aoai-simulated-api

An exploration into creating a simulated API implementation for Azure OpenAI (AOAI)
MIT License
11 stars 4 forks source link

PR: Update generator support for embeddings (vary with model and support dimension request parameter) #39

Closed MDUYN closed 2 months ago

MDUYN commented 2 months ago

PR for OpenAI Embedding Models Support

Overview

This PR introduces support for various OpenAI embedding models, implementing response length variability based on a configuration file named openai_deployment_embedding_config.json. This enhancement allows for flexible and customizable embedding model usage within the application.

Key Changes

Configuration-Based Model Selection:

Support for Additional Models:

In the absence of the configuration file, the application defaults to using the text-embedding-ada-002 model with a embedding size of 1536.This ensures backward compatibility and provides a seamless experience for users who may not have the configuration file set up.

Testing and Validation:

The test suite has been updated to include tests for the text-embedding-3 and later models. These tests ensure that the new models are correctly supported and integrated within the application's functionality.