File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 11import ast
22from abc import ABC
3- from typing import Iterable
3+ from typing import ClassVar , Iterable
44
55from typing_extensions import Self , TypeAlias
66
@@ -15,9 +15,12 @@ class BaseCallerContext(ABC):
1515 the caller environment to the filters. LLM will always return `Context()`
1616 when the context is required and this call will be later substituted by an instance of
1717 a class implementing this interface, selected based on the filter method signature (type hints).
18+
19+ Attributes:
20+ alias: Class variable defining an alias which is defined in the prompt for the LLM to reference context.
1821 """
1922
20- alias : str = "AskerContext"
23+ alias : ClassVar [ str ] = "AskerContext"
2124
2225 @classmethod
2326 def select_context (cls , contexts : Iterable [CustomContext ]) -> Self :
@@ -38,8 +41,8 @@ class by its right instance.
3841
3942 if not contexts :
4043 raise ContextNotAvailableError (
41- "The LLM detected that the context is required to execute the query + \
42- and the filter signature allows contextualization while the context was not provided."
44+ "The LLM detected that the context is required to execute the query"
45+ " and the filter signature allows contextualization while the context was not provided."
4346 )
4447
4548 # TODO confirm whether it is possible to design a correct type hints here and skipping `type: ignore`
You can’t perform that action at this time.
0 commit comments