MCPcopy Create free account
hub / github.com/CarperAI/autocrit / __init__

Method __init__

toolformer/data_generation/base_api.py:18–35  ·  view source on GitHub ↗

Base API Postprocesing class :param start_tokens: token representation for [ or other tokens :param end_tokens: token representation for ] or other tokens :param minimum_percentage: pass percentage for candidate generation, less than this are ignored.

(
        self,
        start_tokens: List[int],
        end_tokens: List[int],
        minimum_percentage: float = 0.1,
    )

Source from the content-addressed store, hash-verified

16
17class APICallPostprocessing:
18 def __init__(
19 self,
20 start_tokens: List[int],
21 end_tokens: List[int],
22 minimum_percentage: float = 0.1,
23 ):
24 """
25 Base API Postprocesing class
26
27 :param start_tokens: token representation for [ or other tokens
28 :param end_tokens: token representation for ] or other tokens
29 :param minimum_percentage: pass percentage for candidate generation, less than this are ignored.
30 """
31 self.start_tokens = start_tokens
32 self.end_tokens = end_tokens
33 self.minimum_percentage = minimum_percentage
34 self.api_text = "" # API text, might be better to pass it in
35 self.k_values = 5 # Default topk generation, might be better to pass it in
36
37 def filter_continuations(
38 self,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected