MCPcopy Create free account
hub / github.com/SqueezeAILab/LLMCompiler / __init__

Method __init__

src/callbacks/callbacks.py:48–58  ·  view source on GitHub ↗
(self, stream: bool = False)

Source from the content-addressed store, hash-verified

46 Add more stats as needed."""
47
48 def __init__(self, stream: bool = False) -> None:
49 super().__init__()
50 self.cnt = 0
51 self.input_tokens = 0
52 self.output_tokens = 0
53 # same for gpt-3.5
54 self.encoder = tiktoken.encoding_for_model("gpt-4")
55 self.stream = stream
56 self.all_times = []
57 self.additional_fields = {}
58 self.start_time = 0
59
60 async def on_chat_model_start(self, serialized, prompts, **kwargs):
61 self.start_time = time.time()

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected