MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / create_provider

Method create_provider

tests/test_fastapi_v1_dashboard.py:227–231  ·  view source on GitHub ↗
(self, new_config: dict)

Source from the content-addressed store, hash-verified

225 raise ValueError(f"Provider ID {origin_provider_id} not found")
226
227 async def create_provider(self, new_config: dict) -> None:
228 next_id = new_config.get("id")
229 if any(provider.get("id") == next_id for provider in self.providers_config):
230 raise ValueError(f"Provider ID {next_id} already exists")
231 self.providers_config.append(copy.deepcopy(new_config))
232
233 async def delete_provider(
234 self,

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected