Skip to content

Commit

Permalink
added new environment variable for taking the embedding model in engi…
Browse files Browse the repository at this point in the history
…ne. (#516)

Co-authored-by: = <=>
  • Loading branch information
ashvin-a committed Jun 24, 2024
1 parent 19080de commit 7f5efdd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions services/engine/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ MINIO_ROOT_USER=
MINIO_ROOT_PASSWORD=

CORE_PORT = 80 # This env var defines the port that will be exposed by the container. It serves as the configuration for both the internal and external container ports.

# While using Azure, mention the embedding model here. If you are using OpenAI, use the "text-embedding-3-large"
EMBEDDING_MODEL = "text-embedding-3-large"
2 changes: 1 addition & 1 deletion services/engine/dataherald/finetuning/openai_finetuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from dataherald.utils.models_context_window import OPENAI_FINETUNING_MODELS_WINDOW_SIZES

FILE_PROCESSING_ATTEMPTS = 20
EMBEDDING_MODEL = "text-embedding-3-large"
EMBEDDING_MODEL = os.environ.get("EMBEDDING_MODEL","text-embedding-3-large")
CATEGORICAL_COLUMNS_THRESHOLD = 60

logger = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@


TOP_K = SQLGenerator.get_upper_bound_limit()
EMBEDDING_MODEL = "text-embedding-3-large"
EMBEDDING_MODEL = os.environ.get("EMBEDDING_MODEL","text-embedding-3-large")
TOP_TABLES = 20


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@


TOP_K = SQLGenerator.get_upper_bound_limit()
EMBEDDING_MODEL = "text-embedding-3-large"
EMBEDDING_MODEL = os.environ.get("EMBEDDING_MODEL","text-embedding-3-large")
TOP_TABLES = 20


Expand Down Expand Up @@ -147,7 +147,7 @@ class QuerySQLDataBaseTool(BaseSQLDatabaseTool, BaseTool):

name = "SqlDbQuery"
description = """
Input: A well-formed multi-line SQL query between ```sql and ``` tags.
Input: -- A well-formed multi-line SQL query between ```sql and ``` tags.
Output: Result from the database or an error message if the query is incorrect.
If an error occurs, rewrite the query and retry.
Use this tool to execute SQL queries.
Expand Down

0 comments on commit 7f5efdd

Please sign in to comment.