MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / __call__

Method __call__

src/hyperagent/agents/llms.py:60–71  ·  view source on GitHub ↗
(self, prompt: str)

Source from the content-addressed store, hash-verified

58 )
59
60 def __call__(self, prompt: str):
61 prompt = truncate_tokens_hf(prompt, encoding_name=self.config["model"])
62 response = self.client.chat.completions.create(
63 temperature=0,
64 model=self.config["model"],
65 messages=[
66 {"role": "system", "content": self.system_prompt},
67 {"role": "user", "content": prompt},
68 ],
69 max_tokens=None
70 )
71 return response.choices[0].message.content
72
73
74class OpenAILLM(LLM):

Callers

nothing calls this directly

Calls 2

truncate_tokens_hfFunction · 0.70
createMethod · 0.45

Tested by

no test coverage detected