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

Method __init__

src/hyperagent/agents/llms.py:47–58  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

45
46class LocalLLM(LLM):
47 def __init__(self, config):
48 super().__init__(config)
49 openai_api_key = os.environ["TOGETHER_API_KEY"]
50 openai_api_base = "https://api.together.xyz"
51 # openai_api_base = "http://localhost:8004/v1"
52 # openai_api_key="token-abc123"
53
54
55 self.client = OpenAI(
56 api_key=openai_api_key,
57 base_url=openai_api_base,
58 )
59
60 def __call__(self, prompt: str):
61 prompt = truncate_tokens_hf(prompt, encoding_name=self.config["model"])

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected