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

Function query

toolformer/tools.py:242–245  ·  view source on GitHub ↗
(payload)

Source from the content-addressed store, hash-verified

240 headers = {"Authorization": f"Bearer {API_TOKEN}".format(API_TOKEN=API_TOKEN)}
241
242 def query(payload):
243 data = json.dumps(payload)
244 response = requests.request("POST", API_URL, headers=headers, data=data)
245 return json.loads(response.content.decode("utf-8"))
246
247 data = query(input_query)
248 return data[0]["generated_text"]

Callers 1

HuggingfaceAPIFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected