Skip to content

Commit

Permalink
Merging disparate chatgxy changes, bugfixes and code cleanup.
Browse files Browse the repository at this point in the history
Most of this was from a branch that didn't share a common base with the
ChatGXY PR and didn't cleanly cherry-pick unfortunately, hence the
manual additions and massaging.
  • Loading branch information
dannon committed Nov 18, 2024
1 parent deca54e commit 234558d
Show file tree
Hide file tree
Showing 9 changed files with 469 additions and 119 deletions.
128 changes: 114 additions & 14 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,44 @@ export interface paths {
trace?: never;
};
"/api/chat": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/**
* Query
* @description We're off to ask the wizard
*/
post: operations["query_api_chat_post"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/chat/{job_id}/feedback": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
/**
* Feedback
* @description Provide feedback on the chatbot response.
*/
put: operations["feedback_api_chat__job_id__feedback_put"];
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/configuration": {
parameters: {
Expand Down Expand Up @@ -6551,16 +6584,16 @@ export interface components {
/** ChatPayload */
ChatPayload: {
/**
* Message
* @description The message to be sent to the chat.
* Context
* @description The context for the chatbot.
* @default
*/
query: string;
context: string | null;
/**
* Context
* @description The context identifier to be used by the chat.
* @enum {string}
* Query
* @description The query to be sent to the chatbot.
*/
context?: "username" | "tool_error";
query: string;
};
/** CheckForUpdatesResponse */
CheckForUpdatesResponse: {
Expand Down Expand Up @@ -18680,10 +18713,17 @@ export interface operations {
};
};
query_api_chat_post: {
/**
* Query
* @description We're off to ask the wizard
*/
parameters: {
query: {
job_id: string | null;
};
header?: {
/** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */
"run-as"?: string | null;
};
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["ChatPayload"];
Expand All @@ -18692,14 +18732,74 @@ export interface operations {
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": string;
};
};
/** @description Validation Error */
422: {
/** @description Request Error */
"4XX": {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["MessageExceptionModel"];
};
};
/** @description Server Error */
"5XX": {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["HTTPValidationError"];
"application/json": components["schemas"]["MessageExceptionModel"];
};
};
};
};
feedback_api_chat__job_id__feedback_put: {
parameters: {
query: {
feedback: number;
};
header?: {
/** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */
"run-as"?: string | null;
};
path: {
job_id: string | null;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": number;
};
};
/** @description Request Error */
"4XX": {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["MessageExceptionModel"];
};
};
/** @description Server Error */
"5XX": {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["MessageExceptionModel"];
};
};
};
Expand Down
22 changes: 16 additions & 6 deletions client/src/components/DatasetInformation/DatasetError.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { library } from "@fortawesome/fontawesome-svg-core";
import { faBug } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { BAlert, BButton } from "bootstrap-vue";
import { BAlert, BButton, BCard } from "bootstrap-vue";
import { storeToRefs } from "pinia";
import { computed, onMounted, ref } from "vue";
Expand Down Expand Up @@ -155,6 +155,21 @@ onMounted(async () => {
>.
</p>

<h4 class="mb-3 h-md">Possible Causes</h4>
<p>
<span>
We can use AI to analyze the issue and suggest possible fixes. Please note that the diagnosis may
not always be accurate.
</span>
</p>
<BCard class="mb-2">
<GalaxyWizard
view="error"
:query="jobDetails.tool_stderr"
context="tool_error"
:job-id="jobDetails.id" />
</BCard>

<DatasetErrorDetails
:tool-stderr="jobDetails.tool_stderr"
:job-stderr="jobDetails.job_stderr"
Expand Down Expand Up @@ -189,11 +204,6 @@ onMounted(async () => {
</b>
</p>

<h4 class="mb-3 h-md">What might have happened?</h4>
<b-card>
<GalaxyWizard view="error" :query="jobDetails.tool_stderr" context="tool_error" />
</b-card>

<h4 class="mb-3 h-md">Issue Report</h4>
<BAlert v-for="(resultMessage, index) in resultMessages" :key="index" :variant="resultMessage[1]" show>
<span v-html="renderMarkdown(resultMessage[0])" />
Expand Down
Loading

0 comments on commit 234558d

Please sign in to comment.