MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / verify

Method verify

plugin/bundles/dalle_3/bundle.py:8–22  ·  view source on GitHub ↗
(self, credentials: BundleCredentials)

Source from the content-addressed store, hash-verified

6
7class Dalle3(BundleHandler):
8 async def verify(self, credentials: BundleCredentials):
9 openai_api_key: str = credentials.credentials.get("OPENAI_API_KEY")
10
11 url = "https://api.openai.com/v1/models"
12 headers = {
13 "Authorization": f"Bearer {openai_api_key}",
14 "Content-Type": "application/json"
15 }
16
17 async with ClientSession() as session:
18 async with session.get(url=url, headers=headers, proxy=CONFIG.PROXY) as response:
19 if response.status == 200:
20 pass
21 else:
22 raise_credentials_validation_error()

Callers

nothing calls this directly

Calls 2

getMethod · 0.45

Tested by

no test coverage detected