Skip to content

Commit

Permalink
chore: Update DashboardGrid component to fix rendering issue with bot…
Browse files Browse the repository at this point in the history
… source
  • Loading branch information
n4ze3m committed Jul 13, 2024
1 parent 7ba152e commit d5eb28e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/ui/src/components/Dashboard/DashboardGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ export const DashboardGrid = () => {
</div>

<div className="px-4 my-3 flex flex-wrap gap-2 text-gray-500 text-xs dark:text-gray-400">
{bot.source.map((source: any) => (
<span title={`${source.type} source`}>
{bot.source.map((source: any, idx: number) => (
<span title={`${source.type} source`} key={idx}>
{sources[source.type as keyof typeof sources]}
</span>
))}
Expand Down
4 changes: 2 additions & 2 deletions server/src/handlers/api/v1/bot/playground/chat.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const chatRequestHandler = async (
const botResponse = await chain.invoke({
question: sanitizedQuestion,
chat_history: groupMessagesByConversation(
history.map((message) => ({
history.slice(-bot.noOfChatHistoryInContext).map((message) => ({
type: message.type,
content: message.text,
}))
Expand Down Expand Up @@ -193,7 +193,7 @@ export const chatRequestStreamHandler = async (
const stream = await chain.stream({
question: sanitizedQuestion,
chat_history: groupMessagesByConversation(
history.map((message) => ({
history.slice(-bot.noOfChatHistoryInContext).map((message) => ({
type: message.type,
content: message.text,
}))
Expand Down

0 comments on commit d5eb28e

Please sign in to comment.