Update to gpt-4o-mini and latest model OpenAI #854
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a significant refactor across multiple files to make various classes in the
vannapackage abstract by inheriting from Python’sABC(Abstract Base Class). Additionally, it includes enhancements to theOpenAI_Chatclass to improve configurability and default behavior. Below are the key changes grouped by theme:Refactoring to Abstract Base Classes:
ABCto indicate that they are abstract and may include abstract methods. This change was applied to classes such asZhipuAI_Chat,ZhipuAI_Embeddings,Cohere_Chat,Cohere_Embeddings,DeepSeekChat,FAISS,BigQuery_VectorStore,GoogleGeminiChat,Hf,Marqo_VectorStore,Mistral,MockEmbedding,MockLLM,OpenAI_Embeddings,OpenSearch_VectorStore, andOpenSearch_Semantic_VectorStore. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]Enhancements to
OpenAI_Chat:OpenAI_Chatnow inherits fromABCand includes new attributes (temperature,client,model,max_retries) with default values.max_retriesandmodelto be set via the configuration. Defaults togpt-3.5-turboif no model is specified. [1] [2]__init__method to includemax_retrieswhen initializing the OpenAI client.submit_promptmethod to handle default model selection more robustly and clarified comments.Cleanup and Minor Adjustments:
anthropic_chat.py,auth.py, and others for better readability. [1] [2]ABCin files where classes were updated to be abstract. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]This refactor improves the codebase by enforcing abstraction where appropriate, enhancing clarity, and making the
OpenAI_Chatclass more flexible and robust.