File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export function Altair() {
3737
3838 useEffect (() => {
3939 setConfig ({
40- model: " models/gemini-v3-s-test " ,
40+ model: " models/gemini-2.0-flash-exp " ,
4141 systemInstruction: {
4242 parts: [
4343 {
@@ -50,7 +50,7 @@ export function Altair() {
5050 }, [setConfig ]);
5151
5252 useEffect (() => {
53- client . on ( " toolcall " , (toolCall ) => {
53+ const onToolCall = (toolCall : ToolCall ) => {
5454 console .log (` got toolcall ` , toolCall );
5555 const fc = toolCall .functionCalls .find (
5656 (fc ) => fc .name === declaration .name
@@ -59,7 +59,11 @@ export function Altair() {
5959 const str = (fc .args as any ).json_graph ;
6060 setJSONString (str );
6161 }
62- });
62+ };
63+ client .on (" toolcall" , onToolCall );
64+ return () => {
65+ client .off (" toolcall" , onToolCall );
66+ };
6367 }, [client ]);
6468
6569 const embedRef = useRef <HTMLDivElement >(null );
You can’t perform that action at this time.
0 commit comments