Jun 29 - Improve AI analysis function 2
This commit is contained in:
@@ -182,9 +182,10 @@ def _extract_text(file_obj, ext: str) -> str:
|
|||||||
# Office address used as origin for distance/travel-time estimates.
|
# Office address used as origin for distance/travel-time estimates.
|
||||||
_OFFICE_ADDRESS = "2815 Hartland Road, Falls Church, VA 22043, USA"
|
_OFFICE_ADDRESS = "2815 Hartland Road, Falls Church, VA 22043, USA"
|
||||||
|
|
||||||
# Text character limit sent to the API. llama-3.3-70b supports 128K tokens (~500K chars);
|
# Text character limit sent to the API per stage-1 call.
|
||||||
# 60K chars is a safe ceiling that leaves room for the prompt and response.
|
# Groq's HTTP payload limit is ~100 KB; our prompt template adds ~2.5 KB of overhead,
|
||||||
_TEXT_LIMIT = 60_000
|
# so 30K chars of document text keeps the total JSON body safely under that ceiling.
|
||||||
|
_TEXT_LIMIT = 30_000
|
||||||
|
|
||||||
# Analyst persona injected as the system message in every API call.
|
# Analyst persona injected as the system message in every API call.
|
||||||
_SYSTEM_PROMPT = (
|
_SYSTEM_PROMPT = (
|
||||||
|
|||||||
Reference in New Issue
Block a user