Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation for config to match controller patterns #197

Closed
nepalevov opened this issue Feb 7, 2024 · 1 comment
Closed

Add validation for config to match controller patterns #197

nepalevov opened this issue Feb 7, 2024 · 1 comment
Assignees

Comments

@nepalevov
Copy link
Contributor

In src/main/java/com/epam/aidial/core/controller/ControllerSelector.java there are naming regexes for models, deployments, etc. e.g.:

private static final Pattern PATTERN_DEPLOYMENT = Pattern.compile("/+openai/deployments/([-.@a-zA-Z0-9]+)");
private static final Pattern PATTERN_MODEL = Pattern.compile("/+openai/models/([-.@a-zA-Z0-9]+)");
private static final Pattern PATTERN_ADDON = Pattern.compile("/+openai/addons/([-.@a-zA-Z0-9]+)");
private static final Pattern PATTERN_ASSISTANT = Pattern.compile("/+openai/assistants/([-.@a-zA-Z0-9]+)");
private static final Pattern PATTERN_APPLICATION = Pattern.compile("/+openai/applications/([-.@a-zA-Z0-9]+)");

This implements special constraints on how models, deployments, assistants, and applications should be named. However, there is no

  1. information about special chars, cases, and length constraints in documentation
  2. config validation exceptions for invalid names (application should fail to start if an invalid name is used)
@artsiomkorzun
Copy link
Collaborator

Fixed in #200. Now deployments with any characters are supported. Given that, one needs to encode reserved characters in HTTP path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants