refactor: integrate Nous Portal support in auxiliary client
- Added functionality to include product attribution tags for Nous Portal in auxiliary API calls. - Introduced a mechanism to determine if the auxiliary client is backed by Nous Portal, affecting the extra body of requests. - Updated various tools to utilize the new extra body configuration for enhanced tracking in API calls.
This commit is contained in:
@@ -314,11 +314,14 @@ async def vision_analyze_tool(
|
||||
logger.info("Processing image with %s...", model)
|
||||
|
||||
# Call the vision API
|
||||
from agent.auxiliary_client import get_auxiliary_extra_body
|
||||
_extra = get_auxiliary_extra_body()
|
||||
response = await _aux_async_client.chat.completions.create(
|
||||
model=model,
|
||||
messages=messages,
|
||||
temperature=0.1,
|
||||
max_tokens=2000,
|
||||
**({} if not _extra else {"extra_body": _extra}),
|
||||
)
|
||||
|
||||
# Extract the analysis
|
||||
|
||||
Reference in New Issue
Block a user