diff --git a/chainforge/flask_app.py b/chainforge/flask_app.py index 81aa29e..fb2217a 100644 --- a/chainforge/flask_app.py +++ b/chainforge/flask_app.py @@ -268,13 +268,13 @@ def index(): def executepy(): """ Executes a Python function sent from JavaScript, - over all the `StandardizedLLMResponse` objects passed in from the front-end. + over all the `LLMResponse` objects passed in from the front-end. POST'd data should be in the form: { 'id': # a unique ID to refer to this information. Used when cache'ing responses. 'code': str, # the body of the lambda function to evaluate, in form: lambda responses:
- 'responses': List[StandardizedLLMResponse] # the responses to run on. + 'responses': List[LLMResponse] # the responses to run on. 'scope': 'response' | 'batch' # the scope of responses to run on --a single response, or all across each batch. # If batch, evaluator has access to 'responses'. Only matters if n > 1 for each prompt. 'process_type': 'evaluator' | 'processor' # the type of processing to perform. Evaluators only 'score'/annotate responses. Processors change responses (e.g. text). diff --git a/chainforge/react-server/src/AiPopover.tsx b/chainforge/react-server/src/AiPopover.tsx index d0eeabd..688935c 100644 --- a/chainforge/react-server/src/AiPopover.tsx +++ b/chainforge/react-server/src/AiPopover.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useMemo, useRef, useState } from "react"; +import React, { useCallback, useContext, useMemo, useState } from "react"; import { Stack, NumberInput, @@ -18,7 +18,7 @@ import { getAIFeaturesModels, } from "./backend/ai"; import { IconSparkles, IconAlertCircle } from "@tabler/icons-react"; -import AlertModal, { AlertModalRef } from "./AlertModal"; +import { AlertModalContext } from "./AlertModal"; import useStore from "./store"; import { INFO_CODEBLOCK_JS, @@ -30,7 +30,7 @@ import { queryLLM } from "./backend/backend"; import { splitText } from "./SplitNode"; import { escapeBraces } from "./backend/template"; import { cleanMetavarsFilterFunc } from "./backend/utils"; -import { Dict, TemplateVarInfo, VarsContext } from "./backend/typing"; +import { VarsContext } from "./backend/typing"; const zeroGap = { gap: "0rem" }; const popoverShadow = "rgb(38, 57, 77) 0px 10px 30px -14px"; @@ -255,7 +255,7 @@ export function AIGenReplaceItemsPopover({ const aiFeaturesProvider = useStore((state) => state.aiFeaturesProvider); // Alerts - const alertModal = useRef{alertMsg}
+{alertMsg}
-