mirror of
https://github.com/langchain-ai/llmanager.git
synced 2026-06-30 20:57:54 -04:00
fix: Formatting
This commit is contained in:
Vendored
+1
-1
@@ -12,4 +12,4 @@
|
||||
"Userless"
|
||||
],
|
||||
"python.languageServer": "None"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,4 +2,4 @@ import { AgentState, AgentUpdate } from "../types.js";
|
||||
|
||||
export async function buildPrompt(state: AgentState): Promise<AgentUpdate> {
|
||||
throw new Error("Not implemented" + state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,4 +2,4 @@ import { AgentState, AgentUpdate } from "../types.js";
|
||||
|
||||
export async function finalGeneration(state: AgentState): Promise<AgentUpdate> {
|
||||
throw new Error("Not implemented" + state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,4 +2,4 @@ import { AgentState, AgentUpdate } from "../types.js";
|
||||
|
||||
export async function humanNode(state: AgentState): Promise<AgentUpdate> {
|
||||
throw new Error("Not implemented" + state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { AgentState, AgentUpdate } from "../types.js";
|
||||
|
||||
export async function initialReasoning(state: AgentState): Promise<AgentUpdate> {
|
||||
export async function initialReasoning(
|
||||
state: AgentState,
|
||||
): Promise<AgentUpdate> {
|
||||
throw new Error("Not implemented" + state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export const AgentZodState = z.object({
|
||||
.custom<BaseMessage[]>()
|
||||
.langgraph.reducer(
|
||||
(a, b) => addMessages(a, b),
|
||||
z.custom<BaseMessage | BaseMessage[]>()
|
||||
z.custom<BaseMessage | BaseMessage[]>(),
|
||||
),
|
||||
/**
|
||||
* The few shot examples to be used in the prompt.
|
||||
@@ -26,10 +26,12 @@ export const AgentZodState = z.object({
|
||||
/**
|
||||
* The final answer, and explanation.
|
||||
*/
|
||||
answer: z.object({
|
||||
answer: z.string(),
|
||||
explanation: z.string()
|
||||
}).default(() => ({ answer: "", explanation: "" }))
|
||||
answer: z
|
||||
.object({
|
||||
answer: z.string(),
|
||||
explanation: z.string(),
|
||||
})
|
||||
.default(() => ({ answer: "", explanation: "" })),
|
||||
});
|
||||
|
||||
export type AgentState = z.infer<typeof AgentZodState>;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { reflect } from "./nodes/reflect.js";
|
||||
|
||||
const workflow = new StateGraph(ReflectionZodState)
|
||||
.addNode("reflect", reflect)
|
||||
.addEdge(START, "reflect")
|
||||
.addEdge(START, "reflect");
|
||||
|
||||
// TODO: Remove as any once type error fixed
|
||||
export const graph = workflow.compile() as any;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { ReflectionState, ReflectionUpdate } from "../types.js";
|
||||
|
||||
export async function reflect(state: ReflectionState): Promise<ReflectionUpdate> {
|
||||
export async function reflect(
|
||||
state: ReflectionState,
|
||||
): Promise<ReflectionUpdate> {
|
||||
throw new Error("Not implemented" + state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export const ReflectionZodState = z.object({
|
||||
.custom<BaseMessage[]>()
|
||||
.langgraph.reducer(
|
||||
(a, b) => addMessages(a, b),
|
||||
z.custom<BaseMessage | BaseMessage[]>()
|
||||
z.custom<BaseMessage | BaseMessage[]>(),
|
||||
),
|
||||
/**
|
||||
* The reasoning generated based on the system prompt, few shots, and input messages.
|
||||
@@ -21,10 +21,12 @@ export const ReflectionZodState = z.object({
|
||||
/**
|
||||
* The final answer, and explanation.
|
||||
*/
|
||||
answer: z.object({
|
||||
answer: z.string(),
|
||||
explanation: z.string()
|
||||
}).default(() => ({ answer: "", explanation: "" }))
|
||||
answer: z
|
||||
.object({
|
||||
answer: z.string(),
|
||||
explanation: z.string(),
|
||||
})
|
||||
.default(() => ({ answer: "", explanation: "" })),
|
||||
});
|
||||
|
||||
export type ReflectionState = z.infer<typeof ReflectionZodState>;
|
||||
|
||||
Reference in New Issue
Block a user