From 92a47f1994a709fc07c827167148bfb988139d69 Mon Sep 17 00:00:00 2001 From: "swj.premkumar" Date: Sun, 11 Jan 2026 08:07:26 -0600 Subject: [PATCH] Adjusted default character truncation to safer levels for local embedding models. --- startAgent.sh | 2 +- test_google_api.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/startAgent.sh b/startAgent.sh index a23b5af9..484c058a 100755 --- a/startAgent.sh +++ b/startAgent.sh @@ -64,7 +64,7 @@ if [ -z "$EMBEDDING_API_URL" ]; then fi if [ -z "$EMBEDDING_TRUNCATION_LIMIT" ]; then - export EMBEDDING_TRUNCATION_LIMIT=1000 + export EMBEDDING_TRUNCATION_LIMIT=800 fi # 3. Start the Trading Agents diff --git a/test_google_api.py b/test_google_api.py index fa4e2e3a..bd34a53c 100644 --- a/test_google_api.py +++ b/test_google_api.py @@ -4,6 +4,7 @@ import os from dotenv import load_dotenv from langchain_openai import ChatOpenAI +from langchain_google_genai import ChatGoogleGenerativeAI # Load environment variables load_dotenv() @@ -12,7 +13,7 @@ def test_google_api(): """Test Google API with different models via local proxy.""" # Use local proxy - proxy_url = "http://localhost:10909" + proxy_url = "http://localhost:8080" print(f"🔧 Using proxy: {proxy_url}") @@ -37,6 +38,7 @@ def test_google_api(): llm = ChatGoogleGenerativeAI( model=model_name, max_retries=3, + base_url="http://localhost:8080", request_timeout=30 )