-
Notifications
You must be signed in to change notification settings - Fork 9
/ai/spell/search (toolshed)
#277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
91ca554 to
0299e31
Compare
/ai/spell/search + clipper integration (toolshed)
typescript/packages/toolshed/routes/storage/blobby/blobby.index.ts
Outdated
Show resolved
Hide resolved
typescript/packages/toolshed/lib/behavior/strategies/scanByCollections.ts
Outdated
Show resolved
Hide resolved
typescript/packages/toolshed/lib/behavior/strategies/scanBySchema.ts
Outdated
Show resolved
Hide resolved
typescript/packages/toolshed/lib/behavior/strategies/scanForKey.ts
Outdated
Show resolved
Hide resolved
typescript/packages/toolshed/lib/behavior/strategies/scanForText.ts
Outdated
Show resolved
Hide resolved
3e8ec4a to
842d900
Compare
typescript/packages/toolshed/routes/ai/spell/behavior/effects.ts
Outdated
Show resolved
Hide resolved
typescript/packages/toolshed/routes/ai/spell/behavior/effects.ts
Outdated
Show resolved
Hide resolved
/ai/spell/search + clipper integration (toolshed)/ai/spell/search (toolshed)
| @@ -0,0 +1,57 @@ | |||
| export interface Logger { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a heads up, I already have some fancy logging stuff using pino-logger https://github.com/pinojs/pino
It's currently only hooked up to hono via a middleware, and not super obvious how to use elsewhere: https://github.com/commontoolsinc/labs/blob/main/typescript/packages/toolshed/middlewares/pino-logger.ts
I'm cool merging this as-is, but I'll probably make a follow-up pass at killing pino or this setup in the next week or two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM! I would prefer to use a library, I was just losing my sanity without context in the logs. Let's rip it out soon 👍
Mostly taming errors unsure if anything works
935cde9 to
9a5d50a
Compare
Need to work out how to handle LLM in CI
| const app = createApp() | ||
| .route("/", router) | ||
| .route("/", llmRouter) | ||
| .route("/", blobbyRouter); | ||
| Deno.serve(app.fetch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the routes I'm testing using hono/client, they need an actual server to hit I think? Maybe you can pass a router directly to the client.
Regardless, this actually worked but there's no LLM configured in CI so it fails.
Tests are commented out, they work locally for me.
| return c.json( | ||
| formatResponse(transcription, chunks, responseType), | ||
| 200, | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tweaks, I had to resolve every type error to run the spell tests
/ai/spell/searchroute#e.g.{ key: '#email', value: ['an-email-key', 'another-email-key'] }The idea is to create a set of building blocks (strategies) we can compose into different behavior trees. Those strategies can mix and match platform features, so I've factored those out into
lib. This is basically what I meant by functional-core, imperative-shell the other day. In practice I mean splitting the service concerns from the API concerns, the services do not need to care that they are exposed via HTTP endpoints.I've got some mixed file naming conventions going on, can do camelCase or kebab-case but it feels a bit weird to export one function called
scanForTextfrom a file calledscan-for-text.ts?