sagemaker + llm creator class

This commit is contained in:
Alex
2023-09-29 01:09:01 +01:00
parent c1c54f4848
commit e4be38b9f7
5 changed files with 57 additions and 25 deletions

View File

@@ -1,4 +1,5 @@
from application.llm.base import BaseLLM
from application.core.settings import settings
class OpenAILLM(BaseLLM):
@@ -44,9 +45,9 @@ class AzureOpenAILLM(OpenAILLM):
def __init__(self, openai_api_key, openai_api_base, openai_api_version, deployment_name):
super().__init__(openai_api_key)
self.api_base = openai_api_base
self.api_version = openai_api_version
self.deployment_name = deployment_name
self.api_base = settings.OPENAI_API_BASE,
self.api_version = settings.OPENAI_API_VERSION,
self.deployment_name = settings.AZURE_DEPLOYMENT_NAME,
def _get_openai(self):
openai = super()._get_openai()