-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from alkem-io/develop
Release: Chat History
- Loading branch information
Showing
9 changed files
with
752 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,34 @@ | ||
import os | ||
from dotenv import load_dotenv | ||
|
||
load_dotenv() | ||
|
||
config = { | ||
"db_host": os.getenv('VECTOR_DB_HOST'), | ||
"db_port": os.getenv('VECTOR_DB_PORT'), | ||
"llm_deployment_name": os.getenv('LLM_DEPLOYMENT_NAME'), | ||
"model_temperature": os.getenv('AI_MODEL_TEMPERATURE'), | ||
"embeddings_deployment_name": os.getenv('EMBEDDINGS_DEPLOYMENT_NAME'), | ||
"openai_endpoint": os.getenv('AZURE_OPENAI_ENDPOINT'), | ||
"openai_api_key": os.getenv('AZURE_OPENAI_API_KEY'), | ||
"openai_api_version": os.getenv('OPENAI_API_VERSION'), | ||
"rabbitmq_host": os.getenv('RABBITMQ_HOST'), | ||
"rabbitmq_user": os.getenv('RABBITMQ_USER'), | ||
"rabbitmq_password": os.getenv('RABBITMQ_PASSWORD'), | ||
"rabbitmq_queue": os.getenv('RABBITMQ_QUEUE'), | ||
"source_website": os.getenv('AI_SOURCE_WEBSITE'), | ||
"local_path": os.getenv('AI_LOCAL_PATH') or '' | ||
"db_host": os.getenv("VECTOR_DB_HOST"), | ||
"db_port": os.getenv("VECTOR_DB_PORT"), | ||
"llm_deployment_name": os.getenv("LLM_DEPLOYMENT_NAME"), | ||
"model_temperature": os.getenv("AI_MODEL_TEMPERATURE"), | ||
"embeddings_deployment_name": os.getenv("EMBEDDINGS_DEPLOYMENT_NAME"), | ||
"openai_endpoint": os.getenv("AZURE_OPENAI_ENDPOINT"), | ||
"openai_api_key": os.getenv("AZURE_OPENAI_API_KEY"), | ||
"openai_api_version": os.getenv("OPENAI_API_VERSION"), | ||
"rabbitmq_host": os.getenv("RABBITMQ_HOST"), | ||
"rabbitmq_user": os.getenv("RABBITMQ_USER"), | ||
"rabbitmq_password": os.getenv("RABBITMQ_PASSWORD"), | ||
"rabbitmq_queue": os.getenv("RABBITMQ_QUEUE"), | ||
"source_website": os.getenv("AI_SOURCE_WEBSITE"), | ||
"local_path": os.getenv("AI_LOCAL_PATH") or "", | ||
"history_length": int(os.getenv("HISTORY_LENGTH") or "10"), | ||
} | ||
|
||
local_path = config['local_path'] | ||
vectordb_path = local_path + os.sep + 'vectordb' | ||
local_path = config["local_path"] | ||
vectordb_path = local_path + os.sep + "vectordb" | ||
|
||
chunk_size = 3000 | ||
# token limit for for the completion of the chat model, this does not include the overall context length | ||
max_token_limit = 2000 | ||
|
||
LOG_LEVEL = os.getenv('LOG_LEVEL') # Possible values: 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL' | ||
assert LOG_LEVEL in ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] | ||
LOG_LEVEL = os.getenv( | ||
"LOG_LEVEL" | ||
) # Possible values: 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL' | ||
assert LOG_LEVEL in ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"] |
Oops, something went wrong.