Skip to content

Commit 9714e9c

Browse files
committed
misc: small fix or general refactoring i did not bother commenting
1 parent 11acc6d commit 9714e9c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nerve/generation/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
from abc import ABC, abstractmethod
66

77
from loguru import logger
8-
from pydantic import BaseModel
8+
from pydantic import BaseModel, ConfigDict
99

1010
from nerve.models import Usage
1111
from nerve.runtime import state
1212
from nerve.tools.protocol import get_tool_response, get_tool_schema
1313

1414

15-
class WindowStrategy(ABC, BaseModel):
15+
class WindowStrategy(ABC):
1616
@abstractmethod
1717
async def get_window(self, history: list[dict[str, t.Any]]) -> list[dict[str, t.Any]]:
1818
pass
@@ -22,6 +22,8 @@ def __str__(self) -> str:
2222
pass
2323

2424
class GenerationConfig(BaseModel):
25+
model_config = ConfigDict(arbitrary_types_allowed=True)
26+
2527
generator_id: str
2628
reasoning_effort: str | None = None
2729
window_strategy: WindowStrategy

0 commit comments

Comments
 (0)