Parent class
| 3 | |
| 4 | |
| 5 | class ContextBuilder: |
| 6 | ''' |
| 7 | Parent class |
| 8 | ''' |
| 9 | def __init__(self): |
| 10 | pass |
| 11 | |
| 12 | def make_context( |
| 13 | self, |
| 14 | model, |
| 15 | tokenizer, |
| 16 | query: str, |
| 17 | system: str = "" |
| 18 | ): |
| 19 | ''' |
| 20 | Make context for query, default is do nothing |
| 21 | ''' |
| 22 | raw_text = query |
| 23 | context_tokens = tokenizer.encode(raw_text) |
| 24 | return raw_text, context_tokens |
| 25 | |
| 26 | if __name__ == '__main__': |
| 27 | pass |
nothing calls this directly
no outgoing calls
no test coverage detected