Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
[lib] Remove v5 release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxijonson committed Jul 30, 2023
1 parent be4ea88 commit 358d77b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 118 deletions.
4 changes: 4 additions & 0 deletions packages/lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ export const myPlugin = createConversationPlugin(myPluginName, ({ conversation,
});
```

#### Recommended practices for TypeScript

For TypeScript users, the `conversation.getPlugin` method (and other alike such as `getPluginOutput`) has strong type inference to infer the plugin output and data type when called with a literal. However, in some cases, users may want to dynamically get plugins by their name. To help differentiate your plugin from other plugins in these cases while preserving types, it's recommended to ship a type guard with your plugin.

```ts
Expand All @@ -461,6 +463,8 @@ export const isMyPlugin = (plugin?: ConversationPluginDefinition): plugin is MyP
};
```

#### Custom plugin configuration

Because plugins are functions, you can allow custom options to be passed to your plugin by client code. This isn't a feature of GPT Turbo, it's just JavaScript! As long as your plugin function returns a plugin definition, you can do whatever you want with it.

```ts
Expand Down
118 changes: 0 additions & 118 deletions packages/lib/v5

This file was deleted.

0 comments on commit 358d77b

Please sign in to comment.