Skip to content

Commit c0b0522

Browse files
adjusted existing unit tests to work with new contextualization logic
1 parent d42a369 commit c0b0522

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/unit/test_iql_format.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ async def test_iql_prompt_format_default() -> None:
2323
"You MUST use only these methods:\n"
2424
"\n\n"
2525
"It is VERY IMPORTANT not to use methods other than those listed above."
26+
"Finally, if a called function argument value is not directly specified in the query but instead requires knowledge of some additional context, than substitute that argument value by: BaseCallerContext()."
27+
'The typical input phrase referencing some additional context contains the word "my" or similar phrasing, e.g. "my position name", "my company valuation".'
28+
"In that case, the part of the output will look like this:"
29+
"filter4(BaseCallerContext())"
2630
"""If you DON'T KNOW HOW TO ANSWER DON'T SAY \"\", SAY: `UNSUPPORTED QUERY` INSTEAD! """
2731
"This is CRUCIAL, otherwise the system will crash. ",
2832
"is_example": False,
@@ -53,6 +57,10 @@ async def test_iql_prompt_format_few_shots_injected() -> None:
5357
"You MUST use only these methods:\n"
5458
"\n\n"
5559
"It is VERY IMPORTANT not to use methods other than those listed above."
60+
"Finally, if a called function argument value is not directly specified in the query but instead requires knowledge of some additional context, than substitute that argument value by: BaseCallerContext()."
61+
'The typical input phrase referencing some additional context contains the word "my" or similar phrasing, e.g. "my position name", "my company valuation".'
62+
"In that case, the part of the output will look like this:"
63+
"filter4(BaseCallerContext())"
5664
"""If you DON'T KNOW HOW TO ANSWER DON'T SAY \"\", SAY: `UNSUPPORTED QUERY` INSTEAD! """
5765
"This is CRUCIAL, otherwise the system will crash. ",
5866
"is_example": False,

tests/unit/test_iql_generator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ async def test_iql_generation(iql_generator: IQLGenerator, event_tracker: EventT
8080
source="filter_by_id(1)",
8181
allowed_functions=filters,
8282
event_tracker=event_tracker,
83+
contexts=None
8384
)
8485

8586

0 commit comments

Comments
 (0)