-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Is your feature request related to a problem? Please describe.
Currently, OpenSSA uses the OpenAI API but does not support the Azure OpenAI Service, which is important because many companies and organizations prefer the Azure OpenAI Service for security and compliance reasons.
Describe the solution you'd like
Add an implementation of calling Azure OpenAI Service from OpenSAA under openssa/examples
Describe alternatives you've considered
Create the following file under openssa/examples/xxxxx/lm
__init__.pyazure_llama_index.pyazure_program_store.pyazure_openai.pyconfig.py
1. config.py
A configuration class that compiles environment variable-based configuration such as Azure OpenAI-related API keys and endpoint information.
2. azure_openai.py
Implement a custom LLM class AzureOpenAILM using the OpenAI Azure client. Wrap configuration with from_defaults() and support JSON responses with retry logic.
3. azure_llama_index.py
Implemented an initialization process to bind the LLM (language model) and embedding model of llama-index to Azure OpenAI deployment. All configuration values are retrieved via LMConfig, making it possible to configure it consistently across applications.
4. azure_program_store.py
We define a ProgramStore class to select and apply programs (problem-solving procedures) based on tasks and knowledge in natural language. A notable feature is that it is implemented to support program search (LLM-based) using Azure OpenAI.
Additional context
Currently, OpenSSA uses the OpenAI API but does not support the Azure OpenAI Service, which we believe is an important feature since many companies and organizations prefer the Azure OpenAI Service for security and compliance reasons.