fix memory router naming

This commit is contained in:
Xi Yan 2024-09-22 22:30:53 -07:00
parent 28065ca53a
commit e0ad4fb99c
3 changed files with 52 additions and 41 deletions

View file

@ -81,16 +81,18 @@ def configure_api_providers(
except Exception:
existing = None
cfg = prompt_for_config(config_type, existing)
config.api_providers[api_str] = GenericProviderConfig(
provider_id=p,
config=cfg.dict(),
)
if api_str in router_api2builtin_api:
# a routing api, we need to assign it a routing_key and put it in the routing_table
# a routing api, we need to infer and assign it a routing_key and put it in the routing_table
routing_key = prompt(
"> Enter routing key for the {} provider: ".format(api_str),
)
config.routing_table[]
else:
config.api_providers[api_str] = GenericProviderConfig(
provider_id=p,
config=cfg.dict(),
)
print("")