Skip to content

Commit

Permalink
feat(latest-queries): add natural answer column to LatestQueries comp…
Browse files Browse the repository at this point in the history
…onent
  • Loading branch information
mert-ergun committed Feb 12, 2025
1 parent 56c7e8c commit c73e260
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crossbar_llm/frontend/src/components/LatestQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function LatestQueries({ queries, onSelectQuery }) {
{ field: 'query', headerName: 'Query', flex: 2 },
{ field: 'type', headerName: 'Type', flex: 1 },
{ field: 'llmType', headerName: 'LLM', flex: 1 },
{ field: 'naturalAnswer', headerName: 'Answer', flex: 2 } // Added new column
];

const rows = queries.slice().reverse().map((item, index) => ({
Expand All @@ -16,6 +17,7 @@ function LatestQueries({ queries, onSelectQuery }) {
query: item.query,
type: item.type,
llmType: item.llmType,
naturalAnswer: item.naturalAnswer // Include natural language answer
}));

const handleRowClick = (params) => {
Expand Down
2 changes: 2 additions & 0 deletions crossbar_llm/frontend/src/components/QueryInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ function QueryInput({
query: response.data.query,
type: 'Generate Query',
llmType: llmType,
naturalAnswer: 'N/A',
});
} catch (err) {
console.error(err);
Expand Down Expand Up @@ -219,6 +220,7 @@ function QueryInput({
query: generatedQuery,
type: 'Run Query',
llmType: llmType,
naturalAnswer: response.data,
});
} catch (err) {
console.error(err);
Expand Down

0 comments on commit c73e260

Please sign in to comment.