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

refactor: deprecate cortex configs #901

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Jul 22, 2024

Describe Your Changes

  • There is no need to introduce a generic configurations endpoint for use globally in Cortex. So every engine update could go under /engines/[engine] and cortex engines [engine] set
  • Return engine configuration values is also an anti-pattern. Client should not know configured values In order to support multiple users, authentication but just the status of the engine: (e.g. not configured, not initialized)
  • Deprecated cortex kill command

To update an engine via REST API:
PATCH: /engines/[engine]

{
     "config": "openai",
     "value": "sk-xxxxxx"
}

To update an engine via CLI:

cortex engines <engine> set <config> <value>

Get engine response via /engines/[engine] or cortex engines [engine] get

{
      "name": "<name>",
      "description": "<description>",
      "version": "<version>",
      "productName": "<productName>",
      "status": "<status>",
}

Available engine statuses:

'ready', // Engine is ready to use
'missing_configuration', // Engine is missing configurations
'not_initialized', // Engine is not intialized
'error', // General error

Fixes Issues

  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@louis-jan louis-jan force-pushed the refactor/deprecate-configs-endpoints branch 3 times, most recently from 7ec99a2 to 79c00d6 Compare July 22, 2024 11:09
@louis-jan
Copy link
Contributor Author

Updated: there is no /update under /engines/[engine]. Just Patch

@louis-jan louis-jan force-pushed the refactor/deprecate-configs-endpoints branch 2 times, most recently from 3e2e1c5 to 7ed3c3f Compare July 23, 2024 05:08
@louis-jan louis-jan force-pushed the refactor/deprecate-configs-endpoints branch from 7ed3c3f to d492819 Compare July 23, 2024 05:10
@louis-jan louis-jan merged commit d22fdd3 into dev Jul 23, 2024
2 checks passed
@louis-jan louis-jan deleted the refactor/deprecate-configs-endpoints branch July 23, 2024 05:51
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

Successfully merging this pull request may close these issues.

2 participants