Skip to content

Commit f8a8f14

Browse files
authored
fix: increase body size for ingestion API (#292)
1 parent a45c399 commit f8a8f14

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

langfuse/task_manager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
from langfuse.serializer import EventSerializer
2424

2525
# largest message size in db is 331_000 bytes right now
26-
MAX_MSG_SIZE = 650_000
26+
MAX_MSG_SIZE = 1_000_000
2727

2828
# https://vercel.com/docs/functions/serverless-functions/runtimes#request-body-size
2929
# The maximum payload size for the request body or the response body of a Serverless Function is 4.5 MB
3030
# 4_500_000 Bytes = 4.5 MB
31-
# https://nextjs.org/docs/pages/building-your-application/routing/api-routes#custom-config
32-
# The default nextjs body parser takes a max body size of 1mb. Hence, our BATCH_SIZE_LIMIT should be less to accomodate the final event.
33-
BATCH_SIZE_LIMIT = 650_000
31+
# configured to be 3 MB to be safe
32+
33+
BATCH_SIZE_LIMIT = 2_500_000
3434

3535

3636
class LangfuseMetadata(pydantic.BaseModel):

tests/test_langchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def test_callback_simple_chain():
308308
)
309309

310310
llm = ChatOpenAI(openai_api_key=os.environ.get("OPENAI_API_KEY"))
311-
template = """You are a playwright. Given the title of play, it is your job to write a synopsis for that title.
311+
template = """You are a playwright. Given the title of play, it is your job to write a synopsis for that title. It should be as long as possible.
312312
Title: {title}
313313
Playwright: This is a synopsis for the above play:"""
314314

0 commit comments

Comments
 (0)