Issue draft for https://github.com/openai/openai-deno-build or deno itself
- openai-deno-build does not work with deno 1.40.*
This is bug for https://github.com/openai/openai-deno-build
import { defineAgent, ok, err, runAgent, stepAgent, chain, initAgent } from "./agent.ts"; | |
import { Agent, AgentError, AgentErrorCode } from "./types.ts"; | |
import { expect } from "https://deno.land/std@0.214.0/expect/mod.ts"; | |
Deno.test("stepAgent: simple", async () => { | |
const simple = defineAgent((_init) => { | |
return { | |
async invoke(input, _options) { | |
return `Hello, ${input}`; | |
}, |
// prompt can not catch ctrl-c | |
const ret = prompt('input>'); | |
console.log(ret); // SIGINT interrupt before this line | |
// returns null with ctrl-c if signal handler is registerred. | |
function getInput(message: string): string | null { | |
const handler = () => {}; | |
Deno.addSignalListener('SIGINT', handler); | |
const ret = prompt(message); | |
Deno.removeSignalListener('SIGINT', handler); |
Issue draft for https://github.com/openai/openai-deno-build or deno itself
This is bug for https://github.com/openai/openai-deno-build
/* | |
Universal testing library for Deno, Node.js, Vitest and the browser. | |
// foo.test.{js,mjs,ts} | |
import { test, eq } from './unitest.mjs'; | |
test('1 === 1', () => { | |
eq(1, 1); | |
}); | |
$ deno test foo.test.ts |
タロンで3/4/5で勝利した試合の反省。
https://www.op.gg/summoners/jp/mizchi2-JP1
正直対面には負けた試合だったがマクロの判断でいくつか勝って、学びが多い回だった。
うろ覚えで書いているので、動画見ながら読むといくつか齟齬があるかも。
// deno test --no-check --allow-env counter.tsx | |
import { useCallback, useState } from "react"; | |
// increment counter by click | |
export default function Counter() { | |
const [count, setCount] = useState(0); | |
const onClick = useCallback(() => setCount(count + 1), [count]); | |
return <div> | |
<span data-testid="count">{count}</span> | |
<button type="button" onClick={onClick} data-testid="increment-button">+</button> |
年末年始遊びまくってLv15 から Lv49 になった。その記録。
自分が the k4sen を意識してたわけでは無いが、やってた間に the k4sen が盛り上がって新規流入がめちゃくちゃに増えたらしい。 めちゃくちゃわかりやすいチュートリアルが提供されてるので、はじめどきではある。
https://www.twitch.tv/videos/2015988986?filter=archives&sort=time
レーンでファイトしながら CS 狙うのが神経削れてきついと感じたので、 CS とる必要がないジャングルとサポートから始めることにした。ミクロをやりながらマクロを掴んでいきたい、という方向性。
#!/usr/bin/env -S deno run --allow-net --allow-read --allow-env --unstable --ext=ts | |
// USAGE: $ deno run cfai-text.ts "Hello Cloudflare AI!" | |
type RequestType = { | |
messages: { | |
role: string; | |
content: string; | |
}[]; | |
}; |