File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
import ast
2
- from dataclasses import dataclass
2
+ from abc import ABC
3
3
from typing import Iterable
4
4
5
5
from typing_extensions import Self , TypeAlias
9
9
CustomContext : TypeAlias = "BaseCallerContext"
10
10
11
11
12
- @dataclass
13
- class BaseCallerContext :
12
+ class BaseCallerContext (ABC ):
14
13
"""
15
- Pydantic-based record class. Base class for contexts that are used to pass additional knowledge about
16
- the caller environment to the filters. It is not made abstract for the convinience of IQL parsing.
17
- LLM will always return `BaseCallerContext()` when the context is required and this call will be
18
- later substituted by a proper subclass instance selected based on the filter method signature (type hints).
14
+ An interface for contexts that are used to pass additional knowledge about
15
+ the caller environment to the filters. LLM will always return `BaseCallerContext()`
16
+ when the context is required and this call will be later substituted by an instance of
17
+ a class implementing this interface, selected based on the filter method signature (type hints).
19
18
"""
20
19
21
20
@classmethod
You can’t perform that action at this time.
0 commit comments