fix the phoenix endpoint (#1691)

This commit is contained in:
sunghyunkang1111 2023-11-10 18:53:23 -06:00 committed by GitHub
parent 40b8127a6f
commit 0ab07419ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -70,7 +70,7 @@ export const WelcomeModal = ({ visible }: { visible: boolean }): JSX.Element =>
<Text> <Text>
Ask Copilot to generate a query by describing the query in your words. Ask Copilot to generate a query by describing the query in your words.
<br /> <br />
<Link target="_blank" href="https://aka.ms/CopilotInAzureCDBDocs"> <Link target="_blank" href="https://aka.ms/MicrosoftCopilotForAzureInCDBHowTo">
Learn more Learn more
</Link> </Link>
</Text> </Text>

View File

@ -111,7 +111,7 @@ exports[`Query Copilot Welcome Modal snapshot test should render when isOpen is
Ask Copilot to generate a query by describing the query in your words. Ask Copilot to generate a query by describing the query in your words.
<br /> <br />
<StyledLinkBase <StyledLinkBase
href="https://aka.ms/CopilotInAzureCDBDocs" href="https://aka.ms/MicrosoftCopilotForAzureInCDBHowTo"
target="_blank" target="_blank"
> >
Learn more Learn more

View File

@ -201,7 +201,7 @@ export const QueryCopilotPromptbar: React.FC<QueryCopilotPromptProps> = ({
const serverInfo = useQueryCopilot.getState().notebookServerInfo; const serverInfo = useQueryCopilot.getState().notebookServerInfo;
const queryUri = userContext.features.disableCopilotPhoenixGateaway const queryUri = userContext.features.disableCopilotPhoenixGateaway
? createUri("https://copilotorchestrater.azurewebsites.net/", "generateSQLQuery") ? createUri("https://copilotorchestrater.azurewebsites.net/", "generateSQLQuery")
: createUri(serverInfo.notebookServerEndpoint, "generateSQLQuery"); : createUri(serverInfo.notebookServerEndpoint, "public/generateSQLQuery");
const response = await fetch(queryUri, { const response = await fetch(queryUri, {
method: "POST", method: "POST",
headers: { headers: {

View File

@ -48,7 +48,7 @@ describe("Query Copilot Client", () => {
const feedbackUri = userContext.features.disableCopilotPhoenixGateaway const feedbackUri = userContext.features.disableCopilotPhoenixGateaway
? createUri("https://copilotorchestrater.azurewebsites.net/", "feedback") ? createUri("https://copilotorchestrater.azurewebsites.net/", "feedback")
: createUri(useQueryCopilot.getState().notebookServerInfo.notebookServerEndpoint, "feedback"); : createUri(useQueryCopilot.getState().notebookServerInfo.notebookServerEndpoint, "public/feedback");
it("should call fetch with the payload with like", async () => { it("should call fetch with the payload with like", async () => {
const mockFetch = jest.fn().mockResolvedValueOnce({}); const mockFetch = jest.fn().mockResolvedValueOnce({});

View File

@ -215,7 +215,7 @@ export const SendQueryRequest = async ({
const queryUri = userContext.features.disableCopilotPhoenixGateaway const queryUri = userContext.features.disableCopilotPhoenixGateaway
? createUri("https://copilotorchestrater.azurewebsites.net/", "generateSQLQuery") ? createUri("https://copilotorchestrater.azurewebsites.net/", "generateSQLQuery")
: createUri(serverInfo.notebookServerEndpoint, "generateSQLQuery"); : createUri(serverInfo.notebookServerEndpoint, "public/generateSQLQuery");
const payload = { const payload = {
containerSchema: userContext.features.enableCopilotFullSchema containerSchema: userContext.features.enableCopilotFullSchema
@ -298,7 +298,7 @@ export const SubmitFeedback = async ({
const serverInfo = useQueryCopilot.getState().notebookServerInfo; const serverInfo = useQueryCopilot.getState().notebookServerInfo;
const feedbackUri = userContext.features.disableCopilotPhoenixGateaway const feedbackUri = userContext.features.disableCopilotPhoenixGateaway
? createUri("https://copilotorchestrater.azurewebsites.net/", "feedback") ? createUri("https://copilotorchestrater.azurewebsites.net/", "feedback")
: createUri(serverInfo.notebookServerEndpoint, "feedback"); : createUri(serverInfo.notebookServerEndpoint, "public/feedback");
await fetch(feedbackUri, { await fetch(feedbackUri, {
method: "POST", method: "POST",
headers: { headers: {