optz: Goal orchestrator
This commit is contained in:
@@ -171,6 +171,11 @@ def call_ollama(model_name, prompt, role):
|
||||
# small budget is consumed by reasoning and `response` comes back empty.
|
||||
body["think"] = False
|
||||
body["options"]["num_predict"] = 16 # terse final answer + fast
|
||||
else:
|
||||
# Prevent an unconstrained local generation from consuming the whole
|
||||
# request window. Goal Orchestrator can tune this without weakening the
|
||||
# shorter classifier/judge budgets.
|
||||
body["options"]["num_predict"] = max(64, int(os.environ.get("CASAN_MODEL_GENERATE_MAX_TOKENS", "1400")))
|
||||
data = json.dumps(body).encode()
|
||||
req = urllib.request.Request(url, data=data, headers={"Content-Type": "application/json"})
|
||||
t0 = time.time()
|
||||
|
||||
Reference in New Issue
Block a user