@@ -38,12 +38,11 @@ def __init__(
38
38
"""
39
39
self ._llm = llm
40
40
self ._prompt_template = prompt_template or copy .deepcopy (default_iql_template )
41
- self ._promptify_view = promptify_view or _promptify_filters or _promptify_aggregations
41
+ self ._promptify_view = promptify_view or _promptify_filters
42
42
43
43
async def generate_iql (
44
44
self ,
45
45
filters : List [ExposedFunction ],
46
- aggregations : List [ExposedFunction ],
47
46
question : str ,
48
47
event_tracker : EventTracker ,
49
48
conversation : Optional [IQLPromptTemplate ] = None ,
@@ -63,14 +62,12 @@ async def generate_iql(
63
62
IQL - iql generated based on the user question
64
63
"""
65
64
filters_for_prompt = self ._promptify_view (filters )
66
- aggregations_for_prompt = self ._promptify_view (aggregations )
67
65
68
66
template = conversation or self ._prompt_template
69
67
70
68
llm_response = await self ._llm .generate_text (
71
69
template = template ,
72
- fmt = {"filters" : filters_for_prompt , "question" : question ,
73
- "aggregation" : aggregations_for_prompt },
70
+ fmt = {"filters" : filters_for_prompt , "question" : question },
74
71
event_tracker = event_tracker ,
75
72
options = llm_options ,
76
73
)
@@ -117,19 +114,3 @@ def _promptify_filters(
117
114
"""
118
115
filters_for_prompt = "\n " .join ([str (filter ) for filter in filters ])
119
116
return filters_for_prompt
120
-
121
-
122
- def _promptify_aggregations (
123
- aggregations : List [ExposedFunction ],
124
- ) -> str :
125
- """
126
- Formats filters for prompt
127
-
128
- Args:
129
- filters: list of filters exposed by the view
130
-
131
- Returns:
132
- filters_for_prompt: filters formatted for prompt
133
- """
134
- aggregations_for_prompt = "\n " .join ([str (aggregation ) for aggregation in aggregations ])
135
- return aggregations_for_prompt
0 commit comments