Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit

Permalink
feat: update model names
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcadams committed Jun 11, 2024
1 parent 9d09c9e commit e1734ac
Show file tree
Hide file tree
Showing 30 changed files with 1,166 additions and 1,342 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-clocks-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hopfield": patch
---

**Feature:**: updated the model names for OpenAI to be more complete and up to date.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.codeActionsOnSave": {
"quickfix.biome": true,
"source.organizeImports.biome": true
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
Expand Down
6 changes: 1 addition & 5 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.0.0/schema.json",
"$schema": "https://biomejs.dev/schemas/1.3.3/schema.json",
"files": {
"ignore": [
"_cjs",
Expand Down Expand Up @@ -29,9 +29,6 @@
"correctness": {
"noUnusedVariables": "error"
},
"nursery": {
"useGroupedTypeImport": "off"
},
"performance": {
"noDelete": "off"
},
Expand All @@ -50,7 +47,6 @@
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingComma": "all",
"semicolons": "always"
}
},
Expand Down
Binary file modified bun.lockb
Binary file not shown.
22 changes: 0 additions & 22 deletions docs/chat/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,25 +156,3 @@ if (response.choices[0].__type === "function_call") {
// ^?
}
```

### Options

The `function` also allows an optional `options` parameter, which lets you override the runtime checks for the
schema. This includes the checks for requiring descriptions on Zod schema parameters, as well as overriding the
list of "disabled types", which are Zod types which typically produce unreliable results from an LLM.

```ts
type HopfieldFunctionOptions = {
/**
* Allows descriptions to not be checked on the function parameters. This defaults to `true`.
*/
requireDescriptions?: boolean;
/**
* Allows you override or disable "unstable" types, which are types that do not typically
* produce good results with a given model. These are defined on a per-model basis.
*
* Set to false to allow all "unstable" types.
*/
disabledTypes?: ZodFirstPartyTypeKind[] | false;
};
```
2 changes: 1 addition & 1 deletion examples/cloudflare-worker/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UnstableDevWorker, unstable_dev } from 'wrangler';
import { type UnstableDevWorker, unstable_dev } from 'wrangler';
import { describe, beforeAll, afterAll, it, expect } from 'vitest';

describe('Worker', () => {
Expand Down
Loading

0 comments on commit e1734ac

Please sign in to comment.