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

fix: config remote engine #922

Merged
merged 2 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cortex-js/src/extensions/anthropic.engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class AnthropicEngineExtension extends OAIEngineExtension {
super(httpService);

eventEmmitter.on('config.updated', async (data) => {
if (data.group === this.name) {
if (data.engine === this.name) {
this.apiKey = data.value;
this.status =
(this.apiKey?.length ?? 0) > 0
Expand Down
2 changes: 1 addition & 1 deletion cortex-js/src/extensions/groq.engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class GroqEngineExtension extends OAIEngineExtension {
super(httpService);

eventEmmitter.on('config.updated', async (data) => {
if (data.group === this.name) {
if (data.engine === this.name) {
this.apiKey = data.value;
this.status =
(this.apiKey?.length ?? 0) > 0
Expand Down
2 changes: 1 addition & 1 deletion cortex-js/src/extensions/mistral.engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class MistralEngineExtension extends OAIEngineExtension {
super(httpService);

eventEmmitter.on('config.updated', async (data) => {
if (data.group === this.name) {
if (data.engine === this.name) {
this.apiKey = data.value;
this.status =
(this.apiKey?.length ?? 0) > 0
Expand Down
2 changes: 1 addition & 1 deletion cortex-js/src/extensions/openai.engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default class OpenAIEngineExtension extends OAIEngineExtension {
super(httpService);

eventEmmitter.on('config.updated', async (data) => {
if (data.group === this.name) {
if (data.engine === this.name) {
this.apiKey = data.value;
this.status =
(this.apiKey?.length ?? 0) > 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ export class CortexCommand extends CommandRunner {
) {
const config = await this.fileManagerService.getConfig();
try {
const startEngineSpinner = ora('Starting Cortex...');
const startEngineSpinner = ora('Starting Cortex engine...');
await this.cortexUseCases.startCortex().catch((e) => {
startEngineSpinner.fail('Failed to start Cortex');
startEngineSpinner.fail('Failed to start Cortex engine');
throw e;
});
startEngineSpinner.succeed('Cortex started successfully');
Expand Down
Loading