From aec8730e9cc393fba0d441874397da0a6e8f8a35 Mon Sep 17 00:00:00 2001 From: Cedric Vidal Date: Tue, 3 Sep 2024 05:43:39 -0700 Subject: [PATCH] Activate local_tracing in main + Don't override max_tokens in writer.py (#156) * Activate local_tracing from env var in main * Don't override max_tokens in writer.py --- src/api/agents/writer/writer.py | 2 +- src/api/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/agents/writer/writer.py b/src/api/agents/writer/writer.py index add93ac5..1a474655 100644 --- a/src/api/agents/writer/writer.py +++ b/src/api/agents/writer/writer.py @@ -11,7 +11,7 @@ def write(researchContext, research, productContext, products, assignment, feedb result = prompty.execute( "writer.prompty", - parameters={"stream": True, "max_tokens": 2000}, + parameters={"stream": True}, inputs={ "researchContext": researchContext, "research": research, diff --git a/src/api/main.py b/src/api/main.py index e0e22870..862fd519 100644 --- a/src/api/main.py +++ b/src/api/main.py @@ -15,7 +15,7 @@ load_dotenv() LOCAL_TRACING = True if os.getenv("LOCAL_TRACING", "false").lower() == "true" else False -tracer = init_tracing() +tracer = init_tracing(local_tracing=LOCAL_TRACING) app = FastAPI()