Skip to content

Commit

Permalink
feat: update model names (#30)
Browse files Browse the repository at this point in the history
* feat: update model names

* fix: tests

* fix: move to Enjoin

* fix: biome
  • Loading branch information
0xcadams authored Jun 11, 2024
1 parent 8cb2e30 commit 0b3aea0
Show file tree
Hide file tree
Showing 48 changed files with 1,233 additions and 1,414 deletions.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "propology/hopfield" }
{ "repo": "EnjoinHQ/hopfield" }
],
"commit": false,
"access": "public",
Expand Down
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.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
VITE_OPENAI_API_KEY=""
VITE_REPLICATE_API_KEY=""
10 changes: 5 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Thanks for your interest in contributing to Hopfield! Please take a moment to review this document **before submitting a pull request.**

If you want to contribute, but aren't sure where to start, you can create a [new discussion](https://github.com/propology/hopfield/discussions).
If you want to contribute, but aren't sure where to start, you can create a [new discussion](https://github.com/EnjoinHQ/hopfield/discussions).

> **Note** **Please ask first before starting work on any significant new features.**
>
> It's never a fun experience to have your pull request declined after investing time and effort into a new feature. To avoid this from happening, we request that contributors create a [feature request](https://github.com/propology/hopfield/discussions/new?category=ideas) to first discuss any API changes or significant new ideas.
> It's never a fun experience to have your pull request declined after investing time and effort into a new feature. To avoid this from happening, we request that contributors create a [feature request](https://github.com/EnjoinHQ/hopfield/discussions/new?category=ideas) to first discuss any API changes or significant new ideas.
<br>

Expand Down Expand Up @@ -38,13 +38,13 @@ This guide covers more advanced topics. Pick the topics based on your needs.
To start contributing to the project, clone it to your local machine using git:

```bash
git clone https://github.com/propology/hopfield.git
git clone https://github.com/EnjoinHQ/hopfield.git
```

Or the [GitHub CLI](https://cli.github.com):

```bash
gh repo clone propology/hopfield
gh repo clone EnjoinHQ/hopfield
```

<div align="right">
Expand Down Expand Up @@ -154,7 +154,7 @@ The first time a PR with a changeset is merged after a release, a new PR will au

### Creating a snapshot release

If a PR has changesets, you can create a [snapshot release](https://github.com/changesets/changesets/blob/main/docs/snapshot-releases.md) by [manually dispatching](https://github.com/propology/hopfield/actions/workflows/snapshot.yml) the Snapshot workflow. This publishes a tagged version to npm with the PR branch name and timestamp.
If a PR has changesets, you can create a [snapshot release](https://github.com/changesets/changesets/blob/main/docs/snapshot-releases.md) by [manually dispatching](https://github.com/EnjoinHQ/hopfield/actions/workflows/snapshot.yml) the Snapshot workflow. This publishes a tagged version to npm with the PR branch name and timestamp.

<div align="right">
<a href="#advanced-guide">&uarr; back to top</a></b>
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ body:
label: Validations
description: Before submitting this issue, please make sure you do the following.
options:
- label: Checked there isn't [already an issue](https://github.com/propology/hopfield/issues) that exists for the bug you encountered.
- label: Checked there isn't [already an issue](https://github.com/EnjoinHQ/hopfield/issues) that exists for the bug you encountered.
required: true
- label: Read the [Contributing Guide](https://github.com/propology/hopfield/blob/main/.github/CONTRIBUTING.md).
- label: Read the [Contributing Guide](https://github.com/EnjoinHQ/hopfield/blob/main/.github/CONTRIBUTING.md).
required: true
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Question
url: https://github.com/propology/hopfield/discussions/new?category=q-a
url: https://github.com/EnjoinHQ/hopfield/discussions/new?category=q-a
about: Ask questions and discuss with other community members.
- name: Feature Request
url: https://github.com/propology/hopfield/discussions/new?category=ideas
url: https://github.com/EnjoinHQ/hopfield/discussions/new?category=ideas
about: Requests features or brainstorm ideas for new functionality.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ What changes are made in this PR? Is it a feature or a bug fix?

## Additional Information

- [ ] I read the [contributing guide](https://github.com/propology/hopfield/blob/main/.github/CONTRIBUTING.md)
- [ ] I read the [contributing guide](https://github.com/EnjoinHQ/hopfield/blob/main/.github/CONTRIBUTING.md)
- [ ] I added documentation related to the changes made.
- [ ] I added or updated tests related to the changes made.
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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023-present Propology
Copyright (c) 2023-present Enjoin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<p align="center">
<a href="https://hopfield.ai">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/propology/hopfield/main/.github/hopfield-w-text.png">
<img alt="Hopfield logo" src="https://raw.githubusercontent.com/propology/hopfield/main/.github/hopfield-white-w-text.png" width="auto" height="120">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/EnjoinHQ/hopfield/main/.github/hopfield-w-text.png">
<img alt="Hopfield logo" src="https://raw.githubusercontent.com/EnjoinHQ/hopfield/main/.github/hopfield-white-w-text.png" width="auto" height="120">
</picture>
</a>
</p>
Expand All @@ -22,7 +22,7 @@
<img src="https://img.shields.io/npm/dm/hopfield?colorA=f6f8fa&colorB=f6f8fa&style=flat" alt="Downloads per month">
</picture>
</a>
<a href="https://github.com/propology/hopfield/blob/main/LICENSE">
<a href="https://github.com/EnjoinHQ/hopfield/blob/main/LICENSE">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/l/hopfield?colorA=21262d&colorB=21262d&style=flat">
<img src="https://img.shields.io/npm/l/hopfield?colorA=f6f8fa&colorB=f6f8fa&style=flat" alt="MIT License">
Expand Down Expand Up @@ -125,8 +125,7 @@ For full documentation, visit [hopfield.ai](https://hopfield.ai).

## Community

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.
If you have questions or need help, reach out to the community in the [Hopfield GitHub Discussions](https://github.com/EnjoinHQ/hopfield/discussions).

## Inspiration

Expand All @@ -144,4 +143,4 @@ If you like Hopfield, go star them on Github too.

## Contributing

If you're interested in contributing to Hopfield, please read our [contributing docs](https://github.com/propology/hopfield/blob/main/.github/CONTRIBUTING.md) **before submitting a pull request**.
If you're interested in contributing to Hopfield, please read our [contributing docs](https://github.com/EnjoinHQ/hopfield/blob/main/.github/CONTRIBUTING.md) **before submitting a pull request**.
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.
11 changes: 5 additions & 6 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default withTwoslash(
provider: 'local',
},
editLink: {
pattern: 'https://github.com/propology/hopfield/edit/main/docs/:path',
pattern: 'https://github.com/EnjoinHQ/hopfield/edit/main/docs/:path',
text: 'Suggest changes to this page',
},
footer: {
Expand All @@ -89,11 +89,11 @@ export default withTwoslash(
items: [
{
text: 'Release Notes ',
link: 'https://github.com/propology/hopfield/releases',
link: 'https://github.com/EnjoinHQ/hopfield/releases',
},
{
text: 'Contributing ',
link: 'https://github.com/propology/hopfield/blob/main/.github/CONTRIBUTING.md',
link: 'https://github.com/EnjoinHQ/hopfield/blob/main/.github/CONTRIBUTING.md',
},
],
},
Expand Down Expand Up @@ -173,9 +173,8 @@ export default withTwoslash(
},
siteTitle: false,
socialLinks: [
{ icon: 'twitter', link: 'https://twitter.com/propology_' },
{ icon: 'discord', link: 'https://discord.gg/2hag5fc6' },
{ icon: 'github', link: 'https://github.com/propology/hopfield' },
{ icon: 'twitter', link: 'https://twitter.com/EnjoinHQ' },
{ icon: 'github', link: 'https://github.com/EnjoinHQ/hopfield' },
],
},
title:
Expand Down
4 changes: 2 additions & 2 deletions docs/chat/functions-streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ const response = await chat.get(

::: info Feedback

To influence these features, reach out on [Discord](https://discord.gg/2hag5fc6) or
[Github Discussions](https://github.com/propology/hopfield/discussions).
To influence these features, reach out on
[Github Discussions](https://github.com/EnjoinHQ/hopfield/discussions).
We want your feedback!

:::
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;
};
```
4 changes: 2 additions & 2 deletions docs/chat/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ guarantees with Zod.
::: info API Providers

We currently only support OpenAI, but are
working on adding further providers. Reach out on [Discord](https://discord.gg/2hag5fc6) or
[Github Discussions](https://github.com/propology/hopfield/discussions) if you have any suggestions!
working on adding further providers. Reach out on
[Github Discussions](https://github.com/EnjoinHQ/hopfield/discussions) if you have any suggestions!

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/embeddings/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ guarantees with Zod, and composability across providers.
::: info API Providers

We currently only support OpenAI, but are
working on adding further providers. Reach out on [Discord](https://discord.gg/2hag5fc6) or
[Github Discussions](https://github.com/propology/hopfield/discussions) if you have any suggestions!
working on adding further providers. Reach out on
[Github Discussions](https://github.com/EnjoinHQ/hopfield/discussions) if you have any suggestions!

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/frameworks/next-13.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ include any custom code for streaming token by token.

### Backpressure

The readable stream handles backpressure with a pull-based approach. See our [tests](https://github.com/propology/hopfield/blob/main/src/utils.test.ts) for how Hopfield handles backpressure. For a more detailed explanation on "backpressure" and how it factors into streaming LLM responses, please see the
The readable stream handles backpressure with a pull-based approach. See our [tests](https://github.com/EnjoinHQ/hopfield/blob/main/src/utils.test.ts) for how Hopfield handles backpressure. For a more detailed explanation on "backpressure" and how it factors into streaming LLM responses, please see the
[`vercel/ai` docs](https://sdk.vercel.ai/docs/concepts/backpressure-and-cancellation).

## Usage
Expand Down
11 changes: 5 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ const members = [
<img img-light src="https://img.shields.io/npm/dm/hopfield?colorA=fafafa&colorB=fafafa&style=flat" alt="Downloads per month">
</picture>
</a>
<a href="https://github.com/propology/hopfield/blob/main/LICENSE">
<a href="https://github.com/EnjoinHQ/hopfield/blob/main/LICENSE">
<picture>
<img img-dark src="https://img.shields.io/npm/l/hopfield?colorA=2e2e33&colorB=2e2e33&style=flat" alt="MIT License">
<img img-light src="https://img.shields.io/npm/l/hopfield?colorA=fafafa&colorB=fafafa&style=flat" alt="MIT License">
</picture>
</a>
<a href="https://github.com/propology/hopfield">
<a href="https://github.com/EnjoinHQ/hopfield">
<picture>
<img img-dark src="https://img.shields.io/github/stars/propology/hopfield?colorA=2e2e33&colorB=2e2e33&style=flat" alt="GitHub Repo stars">
<img img-light src="https://img.shields.io/github/stars/propology/hopfield?colorA=fafafa&colorB=fafafa&style=flat" alt="GitHub Repo stars">
<img img-dark src="https://img.shields.io/github/stars/EnjoinHQ/hopfield?colorA=2e2e33&colorB=2e2e33&style=flat" alt="GitHub Repo stars">
<img img-light src="https://img.shields.io/github/stars/EnjoinHQ/hopfield?colorA=fafafa&colorB=fafafa&style=flat" alt="GitHub Repo stars">
</picture>
</a>
</div>
Expand Down Expand Up @@ -262,8 +262,7 @@ Oh, and liking Typescript is a nice-to-have.

## Community

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.
If you have questions or need help, reach out to the community in the [Hopfield GitHub Discussions](https://github.com/EnjoinHQ/hopfield/discussions).

<div align="center" style="width:100%;">
<VPTeamMembers :members="members" />
Expand Down
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 0b3aea0

Please sign in to comment.