fix: bash

This commit is contained in:
Javier Martinez
2026-07-24 17:34:10 +02:00
parent f482732a41
commit 2adf815cee
2 changed files with 5 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
import uuid
from abc import ABC, abstractmethod
from typing import Literal
from private_gpt.components.chat.models.chat_config_models import (
ResolvedChatRequest,
@@ -52,11 +53,13 @@ def _wrapper_tool(
name: str,
description: str | None = None,
tool_type: str | None = None,
runtime: Literal["client", "server"] = "server",
) -> ToolSpec:
return ToolSpec(
name=name,
description=description or None,
type=tool_type or f"{name}_v1",
runtime=runtime,
)

View File

@@ -74,12 +74,6 @@ class ToolPipeline:
self, request: ResolvedChatRequest
) -> ResolvedChatRequest:
request_copy = request.model_copy(deep=True)
while await self._intercept_once(request_copy):
pass
return request_copy
async def _intercept_once(self, request: ResolvedChatRequest) -> bool:
for processor in self._processors:
if await processor.intercept(request):
return True
return False
await processor.intercept(request_copy)
return request_copy