fix: Formatting

This commit is contained in:
bracesproul
2025-04-10 16:00:49 -07:00
parent 167c910de3
commit 6e8d614e4b
10 changed files with 28 additions and 20 deletions
+1 -1
View File
@@ -12,4 +12,4 @@
"Userless"
],
"python.languageServer": "None"
}
}
+1 -1
View File
@@ -1 +1 @@
# LLManager
# LLManager
+1 -1
View File
@@ -2,4 +2,4 @@ import { AgentState, AgentUpdate } from "../types.js";
export async function buildPrompt(state: AgentState): Promise<AgentUpdate> {
throw new Error("Not implemented" + state);
}
}
+1 -1
View File
@@ -2,4 +2,4 @@ import { AgentState, AgentUpdate } from "../types.js";
export async function finalGeneration(state: AgentState): Promise<AgentUpdate> {
throw new Error("Not implemented" + state);
}
}
+1 -1
View File
@@ -2,4 +2,4 @@ import { AgentState, AgentUpdate } from "../types.js";
export async function humanNode(state: AgentState): Promise<AgentUpdate> {
throw new Error("Not implemented" + state);
}
}
+4 -2
View File
@@ -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);
}
}
+7 -5
View File
@@ -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>;
+1 -1
View File
@@ -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;
+4 -2
View File
@@ -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);
}
}
+7 -5
View File
@@ -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>;