Adjusted default character truncation to safer levels for local embedding models.

This commit is contained in:
swj.premkumar 2026-01-11 08:07:26 -06:00
parent 903e5d0aeb
commit 92a47f1994
2 changed files with 4 additions and 2 deletions

View File

@ -64,7 +64,7 @@ if [ -z "$EMBEDDING_API_URL" ]; then
fi fi
if [ -z "$EMBEDDING_TRUNCATION_LIMIT" ]; then if [ -z "$EMBEDDING_TRUNCATION_LIMIT" ]; then
export EMBEDDING_TRUNCATION_LIMIT=1000 export EMBEDDING_TRUNCATION_LIMIT=800
fi fi
# 3. Start the Trading Agents # 3. Start the Trading Agents

View File

@ -4,6 +4,7 @@
import os import os
from dotenv import load_dotenv from dotenv import load_dotenv
from langchain_openai import ChatOpenAI from langchain_openai import ChatOpenAI
from langchain_google_genai import ChatGoogleGenerativeAI
# Load environment variables # Load environment variables
load_dotenv() load_dotenv()
@ -12,7 +13,7 @@ def test_google_api():
"""Test Google API with different models via local proxy.""" """Test Google API with different models via local proxy."""
# Use local proxy # Use local proxy
proxy_url = "http://localhost:10909" proxy_url = "http://localhost:8080"
print(f"🔧 Using proxy: {proxy_url}") print(f"🔧 Using proxy: {proxy_url}")
@ -37,6 +38,7 @@ def test_google_api():
llm = ChatGoogleGenerativeAI( llm = ChatGoogleGenerativeAI(
model=model_name, model=model_name,
max_retries=3, max_retries=3,
base_url="http://localhost:8080",
request_timeout=30 request_timeout=30
) )