Add poolId as parameter to allocateContainer (#1588)

This commit is contained in:
Armando Trejo Oliver
2023-08-24 12:56:31 -07:00
committed by GitHub
parent 449118a1bf
commit 3d02f07262
10 changed files with 45 additions and 34 deletions

View File

@@ -1,4 +1,8 @@
import { QueryCopilotSampleContainerSchema, ShortenedQueryCopilotSampleContainerSchema } from "Common/Constants";
import {
PoolIdType,
QueryCopilotSampleContainerSchema,
ShortenedQueryCopilotSampleContainerSchema,
} from "Common/Constants";
import { handleError } from "Common/ErrorHandlingUtils";
import { createUri } from "Common/UrlUtility";
import Explorer from "Explorer/Explorer";
@@ -24,7 +28,7 @@ export const SendQueryRequest = async ({
.setChatMessages([...useQueryCopilot.getState().chatMessages, { source: 0, message: userPrompt }]);
try {
if (useQueryCopilot.getState().shouldAllocateContainer) {
await explorer.allocateContainer();
await explorer.allocateContainer(PoolIdType.DefaultPoolId);
useQueryCopilot.getState().setShouldAllocateContainer(false);
}
@@ -98,7 +102,7 @@ export const SubmitFeedback = async ({
contact: contact || "",
};
if (shouldAllocateContainer && userContext.features.enableCopilotPhoenixGateaway) {
await explorer.allocateContainer();
await explorer.allocateContainer(PoolIdType.DefaultPoolId);
setShouldAllocateContainer(false);
}
const serverInfo = useNotebook.getState().notebookServerInfo;