-
Notifications
You must be signed in to change notification settings - Fork 750
Model updates #1409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Model updates #1409
Changes from all commits
aafa79c
f7bc1dc
768c481
00d2fd5
b8aa905
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,10 +1,10 @@ | ||||||||
| OPENAI_API_KEY = "" #This is required if you are using openai embedding model | ||||||||
| EMBEDDING_MODEL = "all-MiniLM-L6-v2" #this can be openai or vertexai or by default all-MiniLM-L6-v2 | ||||||||
| RAGAS_EMBEDDING_MODEL = "openai" #Keep blank if you want to use all-MiniLM-L6-v2 for ragas embeddings | ||||||||
| EMBEDDING_MODEL = "" #values can be blank or "openai" or "vertexai" "titan" - defaults to all-MiniLM-L6-v2 | ||||||||
| RAGAS_EMBEDDING_MODEL = "" #values can be blank or "openai" | ||||||||
| IS_EMBEDDING = "TRUE" | ||||||||
| KNN_MIN_SCORE = "0.94" | ||||||||
| # Enable Gemini (default is False) | Can be False or True | ||||||||
| GEMINI_ENABLED = False | ||||||||
| GEMINI_ENABLED = "False" #Keep true if you are using gemini model | ||||||||
| # Enable Google Cloud logs (default is False) | Can be False or True | ||||||||
| GCP_LOG_METRICS_ENABLED = False | ||||||||
| NUMBER_OF_CHUNKS_TO_COMBINE = 6 | ||||||||
|
|
@@ -19,7 +19,7 @@ LANGCHAIN_API_KEY = "" | |||||||
| LANGCHAIN_PROJECT = "" | ||||||||
| LANGCHAIN_TRACING_V2 = "" | ||||||||
| LANGCHAIN_ENDPOINT = "" | ||||||||
| GCS_FILE_CACHE = "" #save the file into GCS or local, SHould be True or False | ||||||||
| GCS_FILE_CACHE = "" #save the file into GCS or local, Should be True or False | ||||||||
| NEO4J_USER_AGENT="" | ||||||||
| ENABLE_USER_AGENT = "" | ||||||||
| LLM_MODEL_CONFIG_model_version="" | ||||||||
|
|
@@ -28,30 +28,26 @@ DUPLICATE_SCORE_VALUE =0.97 | |||||||
| DUPLICATE_TEXT_DISTANCE =3 | ||||||||
| DEFAULT_DIFFBOT_CHAT_MODEL="openai_gpt_4o" #whichever model specified here , need to add config for that model in below format) | ||||||||
|
||||||||
| DEFAULT_DIFFBOT_CHAT_MODEL="openai_gpt_4o" #whichever model specified here , need to add config for that model in below format) | |
| DEFAULT_DIFFBOT_CHAT_MODEL="openai_gpt_5_mini" #whichever model specified here , need to add config for that model in below format) |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent model naming: The model is referenced as anthropic_claude_4.5_sonnet in the constants but the example configuration uses a different naming pattern claude-sonnet-4-5-20250929. For maintainability, ensure the mapping between the constant name and the actual model identifier is clear and documented.
| LLM_MODEL_CONFIG_groq_llama3.1_8b="llama-3.1-8b-instant,base_url,groq_api_key" | |
| LLM_MODEL_CONFIG_groq_llama3.1_8b="llama-3.1-8b-instant,base_url,groq_api_key" | |
| # Note: The constant name 'anthropic_claude_4.5_sonnet' maps to the model identifier 'claude-sonnet-4-5-20250929' as used by Anthropic. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -112,9 +112,9 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send): | |||||||||||||||||||
| ) | ||||||||||||||||||||
| app.add_middleware(SessionMiddleware, secret_key=os.urandom(24)) | ||||||||||||||||||||
|
|
||||||||||||||||||||
| is_gemini_enabled = os.environ.get("GEMINI_ENABLED", "False").lower() in ("true", "1", "yes") | ||||||||||||||||||||
| if is_gemini_enabled: | ||||||||||||||||||||
| add_routes(app,ChatVertexAI(), path="/vertexai") | ||||||||||||||||||||
| # is_gemini_enabled = os.environ.get("GEMINI_ENABLED", "False").lower() in ("true", "1", "yes") | ||||||||||||||||||||
| # if is_gemini_enabled: | ||||||||||||||||||||
| # add_routes(app,ChatVertexAI(), path="/vertexai") | ||||||||||||||||||||
|
Comment on lines
+115
to
+117
|
||||||||||||||||||||
| # is_gemini_enabled = os.environ.get("GEMINI_ENABLED", "False").lower() in ("true", "1", "yes") | |
| # if is_gemini_enabled: | |
| # add_routes(app,ChatVertexAI(), path="/vertexai") | |
| is_gemini_enabled = os.environ.get("GEMINI_ENABLED", "False").lower() in ("true", "1", "yes") | |
| if is_gemini_enabled: | |
| add_routes(app, ChatVertexAI(), path="/vertexai") |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment appears to contain commented-out code.
| # is_gemini_enabled = os.environ.get("GEMINI_ENABLED", "False").lower() in ("true", "1", "yes") | |
| # if is_gemini_enabled: | |
| # add_routes(app,ChatVertexAI(), path="/vertexai") |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -50,7 +50,7 @@ def get_llm(model: str): | |||||||
| ) | ||||||||
| elif "openai" in model: | ||||||||
| model_name, api_key = env_value.split(",") | ||||||||
| if "o3-mini" in model: | ||||||||
| if "mini" in model: | ||||||||
|
||||||||
| if "mini" in model: | |
| # Only match specific "mini" models to avoid accidental matches (e.g., "gemini") | |
| if re.search(r'(^|\W)(o3-mini|gpt-4\.1-mini|gpt-5-mini)($|\W)', model): |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding ignore_tool_usage=True for all models removes the previous conditional logic that checked for tool-supported models. This may negatively impact performance or functionality for models that do support tool usage (like qwen3 and deepseek). Please verify that ignoring tool usage for all models is the intended behavior.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -204,7 +204,7 @@ def graph_schema_consolidation(graph): | |||||
| messages=[("system", GRAPH_CLEANUP_PROMPT), ("human", "{input}")], | ||||||
| partial_variables={"format_instructions": parser.get_format_instructions()} | ||||||
| ) | ||||||
| graph_cleanup_model = os.getenv("GRAPH_CLEANUP_MODEL", 'openai_gpt_4o') | ||||||
| graph_cleanup_model = os.getenv("GRAPH_CLEANUP_MODEL") | ||||||
|
||||||
| graph_cleanup_model = os.getenv("GRAPH_CLEANUP_MODEL") | |
| graph_cleanup_model = os.getenv("GRAPH_CLEANUP_MODEL", "gpt-3.5-turbo") |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -113,13 +113,13 @@ def load_embedding_model(embedding_model_name: str): | |||||
| logging.info(f"Embedding: Using OpenAI Embeddings , Dimension:{dimension}") | ||||||
| elif embedding_model_name == "vertexai": | ||||||
| embeddings = VertexAIEmbeddings( | ||||||
| model="textembedding-gecko@003" | ||||||
| model="gemini-embedding-001" | ||||||
| ) | ||||||
| dimension = 768 | ||||||
| dimension = 3072 | ||||||
|
||||||
| dimension = 3072 | |
| dimension = 768 |
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Bedrock Titan embedding dimension is updated to 1024, but this should be verified. Amazon Titan Embed Text v1 uses 1536 dimensions, while v2 can use 256, 512, or 1024 dimensions depending on configuration. Please ensure this dimension matches the actual Bedrock embedding model being used (as referenced in the BEDROCK_EMBEDDING_MODEL configuration).
Copilot
AI
Dec 5, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The embedding dimension for the Bedrock Titan model is changed from 1536 to 1024. However, Amazon Titan Text Embeddings v1 produces 1536-dimensional embeddings, while v2 produces 1024-dimensional embeddings. The comment on line 52 of example.env mentions amazon.titan-embed-text-v2.0, which would have 1024 dimensions. Please ensure this dimension matches the actual Titan model version being used by the get_bedrock_embeddings() function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate model configuration for
fireworks_gpt_oss. This model appears on both line 29 and line 48. Please remove the duplicate entry.