Skip to content

Commit

Permalink
Fix/edit docs duplication and typos (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
gitkola authored Jan 8, 2025
1 parent c4f6ef6 commit 8cc05b0
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 15 deletions.
7 changes: 0 additions & 7 deletions docs/src/docs/core/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ async function analyticsEffect(context: RequestContext, response: MessageRespons

## Measures vs Marks

This concept comes from [Web Performance API](https://developer.mozilla.org/en-US/docs/Web/API/Performance).
Marks are just named 'sequences' for the performance tool to measure.
Let's say that you have a tool for your AI, and you'd like to check how it performs.
Issue might be that it's being triggered multiple times by AI. For that reason
one mark can be a part of multiple measures.
Single measure is constructed of two marks: `start` and `end`.

This concept is inspired by the [Web Performance API](https://developer.mozilla.org/en-US/docs/Web/API/Performance). Marks are essentially named sequences that the performance tool uses to measure execution time. For instance, if you have a tool for your AI and want to evaluate its performance, you might find it triggered multiple times by the AI. Therefore, a single mark can be part of multiple measures. A measure is constructed using two marks: `start` and `end`.

:::info
Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/core/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ The order of plugins is important! Depending on the call to `next`, they are exe
- Top-down before the call to `next`
- Bottom-up after the call to `next`

## Midleware early return
## Middleware early return

Your middleware can also break the execution chain early, stopping the execution of any subsequent middleware.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/core/references.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ When a tool call is triggered, you can add references to the context and later u
References are not automatically added for the AI. You need to implement this functionality if needed.
:::

Let's create middleware that adds relevant weather information to the context.
Let's create a tool that adds relevant weather information to the context.

```js
async function queryWeather(
Expand Down
5 changes: 0 additions & 5 deletions docs/src/docs/core/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,10 @@ OpenAI has implemented tools, but not all AI providers do.

## Adding tools

First lets start by implementing the tool function. There are two inputs for it `params` that are decided
by the AI and context that is passed by byorg. Tool function has to return a string, as the information
returned by it will be then passed back to AI as an 'addition' to system prompt.

To start, implement the tool function. It takes two inputs: `params`, which are determined by the AI, and `context`, which is passed by byorg.
The tool function must return a string, as this information will be passed back to the AI as an addition to the system prompt.

```js

async function queryUsers(params: { query: string }, context: RequestContext): Promise<string> {
const { query } = params;
const { references } = context;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/core/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ Here is step by step how to start with byorg.

{/* prettier-ignore-end */}

That's it! Your message is being handled an processed by byorg.
That's it! Your message is being handled and processed by byorg.

In next sections we will go through customisation, error handling and changing LLM provider, to better suit your needs.

0 comments on commit 8cc05b0

Please sign in to comment.