From 6e8d614e4b43a048a89eeeb417b2fc489d8da5dc Mon Sep 17 00:00:00 2001 From: bracesproul Date: Thu, 10 Apr 2025 16:00:49 -0700 Subject: [PATCH] fix: Formatting --- .vscode/settings.json | 2 +- README.md | 2 +- src/llmanager/nodes/build-prompt.ts | 2 +- src/llmanager/nodes/final-generation.ts | 2 +- src/llmanager/nodes/human-node.ts | 2 +- src/llmanager/nodes/initial-reasoning.ts | 6 ++++-- src/llmanager/types.ts | 12 +++++++----- src/reflection/index.ts | 2 +- src/reflection/nodes/reflect.ts | 6 ++++-- src/reflection/types.ts | 12 +++++++----- 10 files changed, 28 insertions(+), 20 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index f399c3e..4ecddd7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,4 +12,4 @@ "Userless" ], "python.languageServer": "None" -} \ No newline at end of file +} diff --git a/README.md b/README.md index 598f91f..17ec007 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# LLManager \ No newline at end of file +# LLManager diff --git a/src/llmanager/nodes/build-prompt.ts b/src/llmanager/nodes/build-prompt.ts index d04888c..40cdfe9 100644 --- a/src/llmanager/nodes/build-prompt.ts +++ b/src/llmanager/nodes/build-prompt.ts @@ -2,4 +2,4 @@ import { AgentState, AgentUpdate } from "../types.js"; export async function buildPrompt(state: AgentState): Promise { throw new Error("Not implemented" + state); -} \ No newline at end of file +} diff --git a/src/llmanager/nodes/final-generation.ts b/src/llmanager/nodes/final-generation.ts index dc0f466..754f5ab 100644 --- a/src/llmanager/nodes/final-generation.ts +++ b/src/llmanager/nodes/final-generation.ts @@ -2,4 +2,4 @@ import { AgentState, AgentUpdate } from "../types.js"; export async function finalGeneration(state: AgentState): Promise { throw new Error("Not implemented" + state); -} \ No newline at end of file +} diff --git a/src/llmanager/nodes/human-node.ts b/src/llmanager/nodes/human-node.ts index 026413d..e978832 100644 --- a/src/llmanager/nodes/human-node.ts +++ b/src/llmanager/nodes/human-node.ts @@ -2,4 +2,4 @@ import { AgentState, AgentUpdate } from "../types.js"; export async function humanNode(state: AgentState): Promise { throw new Error("Not implemented" + state); -} \ No newline at end of file +} diff --git a/src/llmanager/nodes/initial-reasoning.ts b/src/llmanager/nodes/initial-reasoning.ts index 5dc5af9..7d93b43 100644 --- a/src/llmanager/nodes/initial-reasoning.ts +++ b/src/llmanager/nodes/initial-reasoning.ts @@ -1,5 +1,7 @@ import { AgentState, AgentUpdate } from "../types.js"; -export async function initialReasoning(state: AgentState): Promise { +export async function initialReasoning( + state: AgentState, +): Promise { throw new Error("Not implemented" + state); -} \ No newline at end of file +} diff --git a/src/llmanager/types.ts b/src/llmanager/types.ts index 94333c3..6577ae5 100644 --- a/src/llmanager/types.ts +++ b/src/llmanager/types.ts @@ -12,7 +12,7 @@ export const AgentZodState = z.object({ .custom() .langgraph.reducer( (a, b) => addMessages(a, b), - z.custom() + z.custom(), ), /** * 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; diff --git a/src/reflection/index.ts b/src/reflection/index.ts index e3139a8..966028b 100644 --- a/src/reflection/index.ts +++ b/src/reflection/index.ts @@ -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; diff --git a/src/reflection/nodes/reflect.ts b/src/reflection/nodes/reflect.ts index e58b10f..23ea915 100644 --- a/src/reflection/nodes/reflect.ts +++ b/src/reflection/nodes/reflect.ts @@ -1,5 +1,7 @@ import { ReflectionState, ReflectionUpdate } from "../types.js"; -export async function reflect(state: ReflectionState): Promise { +export async function reflect( + state: ReflectionState, +): Promise { throw new Error("Not implemented" + state); -} \ No newline at end of file +} diff --git a/src/reflection/types.ts b/src/reflection/types.ts index 4ff9b03..ac37991 100644 --- a/src/reflection/types.ts +++ b/src/reflection/types.ts @@ -12,7 +12,7 @@ export const ReflectionZodState = z.object({ .custom() .langgraph.reducer( (a, b) => addMessages(a, b), - z.custom() + z.custom(), ), /** * 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;