refactor: simplify parameter
This commit is contained in:
parent
df396fc246
commit
b72eb61302
|
|
@ -2,11 +2,8 @@ import type { BaseMessage } from "@langchain/core/messages";
|
||||||
|
|
||||||
import type { AgentThread } from "./types";
|
import type { AgentThread } from "./types";
|
||||||
|
|
||||||
export function pathOfThread(thread: AgentThread, includeAssistantId = true) {
|
export function pathOfThread(threadId: string) {
|
||||||
if (includeAssistantId) {
|
return `/workspace/chats/${threadId}`;
|
||||||
return `/workspace/chats/${thread.thread_id}`;
|
|
||||||
}
|
|
||||||
return `/workspace/chats/${thread.thread_id}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function textOfMessage(message: BaseMessage) {
|
export function textOfMessage(message: BaseMessage) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue