Skip to content

Commit

Permalink
fix: typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
massi-ang committed Aug 6, 2024
1 parent 00f976e commit 6d6149a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cli/magic-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,10 @@ async function processCreateOptions(options: any): Promise<void> {
// Knowledge Bases
let newKB =
answers.enableRag && answers.ragsToEnable.includes("knowledgeBase");
let kbExternal: any[] = [];
const kbExternal: any[] = [];
const existingKBIndices = Array.from(options.kbExternal || []);
while (newKB === true) {
let existingIndex: any = existingKBIndices.pop();
const existingIndex: any = existingKBIndices.pop();
const kbQ = [
{
type: "input",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { AppContext } from "../../../common/app-context";
import { ApiClient } from "../../../common/api-client/api-client";
import { BedrockKB } from "../../../API";
import { HybridSearchField } from "./hybrid-search-field";
import { MetadataFilter } from "../../../components/rag/metadata-filter";

export interface KBFormProps {
data: BedrockKBWorkspaceCreateInput;
Expand Down
9 changes: 9 additions & 0 deletions tests/utils/config-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ export function getTestConfig(): SystemConfig {
createIndex: true,
enterprise: true,
},
knowledgeBase: {
enabled: true,
external: [
{
name: "test",
knowledgeBaseId: "ABCDEIWED",
},
],
},
},
embeddingsModels: [
{
Expand Down

0 comments on commit 6d6149a

Please sign in to comment.