Skip to content

Commit

Permalink
fix: debug, remove top-level obot and llm response/request label fix (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ivyjeong13 authored Jan 8, 2025
1 parent a633bd6 commit 85ab705
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions ui/admin/app/components/chat/CallFrames.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ const CallFrames = ({ calls }: { calls: CallsType }) => {
);

sortedCalls.forEach(([id, call]) => {
if (call.tool?.name === "GPTScript Gateway Provider") {
if (
call.tool?.name === "GPTScript Gateway Provider" ||
call.tool?.name === "Obot"
) {
return;
}

Expand Down Expand Up @@ -224,17 +227,16 @@ const CallFrames = ({ calls }: { calls: CallsType }) => {
{(call.llmRequest || call.llmResponse) && (
<details open={allOpen}>
<summary className="cursor-pointer">
{call.llmRequest &&
"messages" in call.llmRequest
{call.llmRequest?.chatCompletion?.messages
? "LLM Request & Response"
: "Tool Command and Output"}
</summary>
<div className="ml-5">
{call.llmRequest && (
<details open={allOpen}>
<summary className="cursor-pointer">
{call.llmRequest &&
"messages" in call.llmRequest
{call.llmRequest?.chatCompletion
?.messages
? "Request"
: "Command"}
</summary>
Expand All @@ -246,8 +248,8 @@ const CallFrames = ({ calls }: { calls: CallsType }) => {
{call.llmResponse && (
<details open={allOpen}>
<summary className="cursor-pointer">
{call.llmRequest &&
"messages" in call.llmRequest
{call.llmRequest?.chatCompletion
?.messages
? "Response"
: "Output"}
</summary>
Expand Down Expand Up @@ -321,7 +323,6 @@ const CallFrames = ({ calls }: { calls: CallsType }) => {
};

const { tree, rootNodes } = buildTree(calls);

return (
<div
className="h-full overflow-scroll p-4 rounded-2xl bg-foreground dark:bg-zinc-900 text-white"
Expand Down Expand Up @@ -395,12 +396,12 @@ const Summary = ({ call }: { call: CallFrame }) => {
const info = `[${category || "tool"}] [ID: ${call.id}] [${startTime} - ${endTime}, ${duration}]`;

return (
<h1 className="inline">
<h4 className="inline">
<span className="font-bold mr-2">
{typeof name === "string" ? name : name.Name}
</span>
<span className="text-sm text-gray-400">{info}</span>
</h1>
</h4>
);
};

Expand Down

0 comments on commit 85ab705

Please sign in to comment.