Scope entity resolution reasoning effort independently
This commit is contained in:
1 parent
6c3415b13a
commit
69e4f3b349
6 files changed
+105
-4
No files matched your search
@@ -3,6 +3,8 @@ import copy
|
||||
import logging
|
||||
import time
|
||||
import math
|
||||
import re
|
||||
from dataclasses import replace
|
||||
|
||||
from jsonschema import Draft202012Validator
|
||||
from jsonschema.exceptions import SchemaError, ValidationError
|
||||
@@ -73,6 +75,9 @@ class LLMGateway:
|
||||
for provider in self.config.providers:
|
||||
if not provider.enabled or provider.privacy not in (PRIVACY[request["privacy"]] & PRIVACY[self.config.privacy_profile]):
|
||||
continue
|
||||
if (provider.entity_resolution_reasoning_effort is not None
|
||||
and re.fullmatch(r"entity_resolution_(plan|assessment)_v[1-9][0-9]*", request["prompt_version"])):
|
||||
provider = replace(provider, reasoning_effort=provider.entity_resolution_reasoning_effort)
|
||||
started = time.monotonic()
|
||||
response = None
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user