diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 9b7994e..18282b2 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -63,6 +63,9 @@ export default withTwoslash( // apiKey: '', // indexName: 'hopfield', // }, + search: { + provider: 'local', + }, editLink: { pattern: 'https://github.com/propology/hopfield/edit/main/docs/:path', text: 'Suggest changes to this page', @@ -168,7 +171,6 @@ export default withTwoslash( title: 'Hopfield: Typescript-first LLM framework with static type inference, testability, and composability.', twoslash: { - addTryButton: true, defaultCompilerOptions: { target: ScriptTarget.ESNext, }, diff --git a/docs/chat/functions.md b/docs/chat/functions.md index 7543703..c06ab33 100644 --- a/docs/chat/functions.md +++ b/docs/chat/functions.md @@ -74,6 +74,18 @@ All of these checks are entirely customizable and can be disabled with the `opti You can then use the `HopfieldFunction` with OpenAI: -::: info -This is under construction. +### Roadmap + +We have more plans for the features we build for function calling. + +1. **Streaming arguments validation:** we are working on adding support for validating the arguments which are + streamed back from a provider. Currently, streaming responses are not fully validated against the input schema, + due to receiving the content in chunks. + +::: info Feedback + +To influence these features, reach out on [Discord](https://discord.gg/2hag5fc6) or +[Github Discussions](https://github.com/propology/hopfield/discussions). +We want your feedback! + ::: diff --git a/docs/chat/streaming.md b/docs/chat/streaming.md index 13d7d39..8487260 100644 --- a/docs/chat/streaming.md +++ b/docs/chat/streaming.md @@ -13,7 +13,7 @@ API providers with type guarantees with Zod. Use streaming chat models from OpenAI with a few lines of code: ```ts twoslash -const takeAction = (message: string) => {}; +const takeAction = async (message: string) => {}; // ---cut--- import hop from "hopfield"; import openai from "hopfield/openai"; @@ -42,8 +42,8 @@ for await (const part of response) { if (part.choices[0].__type === "content") { // ^? // action based on the delta for the streaming message content - takeAction(part.choices[0].delta.content); - // ^? + await takeAction(part.choices[0].delta.content); + // ^? parts.push(part); } diff --git a/docs/embeddings/overview.md b/docs/embeddings/overview.md index 6b724ac..f51fe46 100644 --- a/docs/embeddings/overview.md +++ b/docs/embeddings/overview.md @@ -8,7 +8,7 @@ title: "Embeddings - Overview" Hopfield provides an easy way to get type-safe embeddings. You can use different API providers with type guarantees with Zod, and composability across providers. -::: info +::: info API Providers We currently only support OpenAI, but are working on adding further providers. Reach out on [Discord](https://discord.gg/2hag5fc6) or diff --git a/docs/index.md b/docs/index.md index 960f413..a2942d5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,6 +8,24 @@ title: "Hopfield: Typescript-first LLM framework with static type inference, tes titleTemplate: false --- + +

Hopfield Hopfield @@ -247,10 +265,16 @@ Oh, and liking Typescript is a nice-to-have. If you have questions or need help, reach out to the community at the [Hopfield GitHub Discussions](https://github.com/propology/hopfield/discussions) or join the [Propology Discord](https://discord.gg/2hag5fc6) and check out the `🐇-hopfield` channel. -## Learn More +

+ +
+ +## Learn more Read the [Getting Started](/guide/getting-started) guide to learn more how to use Hopfield. +### Inspiration + Shoutout to these projects which inspired us: - [Zod](https://github.com/colinhacks/zod)