Skip to content

Commit

Permalink
Remove modelId from config (elastic#200181)
Browse files Browse the repository at this point in the history
Follow up to elastic#186499

This removes `modelId` from the config file. We don't need it anymore
since it can be supplied as a url param. Currently it's only needed in
the setup route (`POST /internal/observability_ai_assistant/kb/setup`)
  • Loading branch information
sorenlouv authored Nov 15, 2024
1 parent d2f07b3 commit 875313e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { schema, type TypeOf } from '@kbn/config-schema';

export const config = schema.object({
enabled: schema.boolean({ defaultValue: true }),
modelId: schema.maybe(schema.string()), // TODO: Remove
scope: schema.maybe(schema.oneOf([schema.literal('observability'), schema.literal('search')])),
enableKnowledgeBase: schema.boolean({ defaultValue: true }),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@ export class ObservabilityAIAssistantPlugin

// Using once to make sure the same model ID is used during service init and Knowledge base setup
const getSearchConnectorModelId = once(async () => {
// TODO: Remove this once the modelId is removed from the config
const configModelId = this.config.modelId;
if (configModelId) {
return configModelId;
}
const defaultModelId = '.elser_model_2';
const [_, pluginsStart] = await core.getStartServices();
// Wait for the license to be available so the ML plugin's guards pass once we ask for ELSER stats
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import { mapValues } from 'lodash';
import path from 'path';
import { createTestConfig, CreateTestConfig } from '../common/config';
import { SUPPORTED_TRAINED_MODELS } from '../../functional/services/ml/api';

export const observabilityAIAssistantDebugLogger = {
name: 'plugins.observabilityAIAssistant',
Expand All @@ -31,7 +30,6 @@ export const observabilityAIAssistantFtrConfigs = {
__dirname,
'../../../../test/analytics/plugins/analytics_ftr_helpers'
),
'xpack.observabilityAIAssistant.modelId': SUPPORTED_TRAINED_MODELS.TINY_ELSER.name, // TODO: Remove
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* 2.0.
*/

import { SUPPORTED_TRAINED_MODELS } from '@kbn/test-suites-xpack/functional/services/ml/api';
import { createTestConfig } from '../../../config.base';
import { ObservabilityAIAssistantServices } from './common/ftr_provider_context';
import { services as inheritedServices } from '../../../services';
Expand All @@ -28,7 +27,4 @@ export default createTestConfig({
// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/observability/config/elasticsearch.yml
esServerArgs: ['xpack.ml.dfa.enabled=false'],
kbnServerArgs: [
`--xpack.observabilityAIAssistant.modelId=${SUPPORTED_TRAINED_MODELS.TINY_ELSER.name}`, // TODO: Remove
],
});

0 comments on commit 875313e

Please sign in to comment.