Skip to content

Commit bb4f36e

Browse files
authored
Dexter V4 (#52)
* Add build step before typecheck in CI workflow * Catch tokenizer error without console output * Update `openai-fetch` to 3.3.1 and handle refusals This commit updates the `openai-fetch` dependency to version 3.3.1. It also introduces handling for message refusals by throwing a `RefusalError` when a refusal is returned. This includes changes in `chat.ts`, test enhancements, and updates to message types and checks. * Delete documentation website * Remove Datastore classes & add Knip to clean up * Remove unused code and exports * Refactor to remove top-level exports * Remove remnants of deleted Datastore class * Refactor telemetry file structure and imports * Refactor: Move utils to `model/utils` directory - Updated import paths for helper functions from `utils` to `model/utils` - Removed `./` export paths in `package.json` for `utils` - Deleted `src/utils/index.ts` file as it's no longer needed * Refactor error handling into `model/utils/errors.ts` Moved error-related functions and classes from `prompt` to the `model/utils/errors.ts` file for better organization and reuse. Updated imports to reflect this change. * Refactor `Msg` to `MsgUtil` and update related imports This commit refactors the `Msg` utility to `MsgUtil` and updates all related imports and references throughout the codebase. Additionally, it includes the unification of message type definitions under the `Model` namespace and removes the duplicated type definitions. * Refactor `prompt` directory to `ai-function` This change restructures the codebase by renaming and relocating files from the `prompt` directory to the `ai-function` directory. This includes moving functions like `createAIFunction` and `createAIRunner`, along with their corresponding types and tests. * Move `@dexaai/dexter/model` exports to package root * Update readme * Remove unused exports * Add `createExtractFunction` for data extraction Introduce `createExtractFunction` using OpenAI's structured output feature, leveraging a Zod schema for data validation and extraction. This is a better and more modern alternative to the `createAIExtractFunction` utility, which is now deprecated. * Add rough Swarm implementation This commit introduces a new `Swarm` module that includes REPL functionality and tools for handling functions. Additional changes include the integration of the `chalk` library for colorful terminal output. Modifications are made to `package.json` to reflect these new dependencies and module structures. * 4.0.0-0 * Rename `Runner` to `AIRunner` for consistency ...with AIFunction. * Add optional strict validation to extract function * Replace legacy `Model.Message` type with `Msg` * Enhance `readme.md` based on feedback * Upgrade `openai-zod-to-json-schema` to v1.0.3 * Refactor imports and simplify module exports * 4.0.0-1
1 parent 3f88f13 commit bb4f36e

File tree

249 files changed

+2112
-45065
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+2112
-45065
lines changed

.env.example

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,5 @@
77

88
OPENAI_API_KEY=
99

10-
# Most examples will work with a free-tier index, but you'll need a paid hybrid-compatible index to run the chatbot example
11-
PINECONE_API_KEY=
12-
PINECONE_BASE_URL=
13-
14-
# Optional; only needed if using a hybrid datastore
10+
# Optional; only needed if using SPLADE embeddings
1511
#SPLADE_SERVICE_URL=

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515
- uses: ./.github/actions/install-node-pnpm
16-
- run: pnpm run typecheck
16+
- run: pnpm run build && pnpm run typecheck
1717

1818
lint:
1919
name: Lint

contributing.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,3 @@ For example:
4141
```bash
4242
npx tsx examples/basic.ts
4343
```
44-
45-
## Docs
46-
47-
The `./docs/pages/docs` directory is autogenerated via [typedoc](https://typedoc.org) and [typedoc-plugin-markdown](https://github.com/tgreyuk/typedoc-plugin-markdown/tree/next/packages/typedoc-plugin-markdown).
48-
49-
To rebuild the docs, run:
50-
51-
```bash
52-
pnpm run docs
53-
```
54-
55-
Please don't run this command when submitting PRs to keep them uncluttered, unless you're making changes to the docs themselves.
56-
57-
The docs folder is a normal [Next.js](https://nextjs.org) pages app built using [Nextra](https://nextra.site/).
58-
59-
You can run the docs dev server to preview your changes via:
60-
61-
```bash
62-
cd docs
63-
pnpm dev
64-
```
65-
66-
The docs are automatically deployed to [Vercel](https://vercel.com).

docs/bin/transform-docs.ts

Lines changed: 0 additions & 113 deletions
This file was deleted.

docs/next-env.d.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/next.config.mjs

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/package.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/pages/_app.mdx

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/pages/_meta.json

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/pages/docs/.nojekyll

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)