Skip to content

Commit 3ac8497

Browse files
authored
chore: fix simple typos (#3463)
1 parent c8152a6 commit 3ac8497

File tree

13 files changed

+27
-27
lines changed

13 files changed

+27
-27
lines changed

js/core/src/schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class ValidationError extends GenkitError {
6363
}
6464

6565
/**
66-
* Convertes a Zod schema into a JSON schema, utilizing an in-memory cache for known objects.
66+
* Converts a Zod schema into a JSON schema, utilizing an in-memory cache for known objects.
6767
* @param options Provide a json schema and/or zod schema. JSON schema has priority.
6868
* @returns A JSON schema.
6969
*/
@@ -123,7 +123,7 @@ export function validateSchema(
123123
}
124124

125125
/**
126-
* Parses raw data object agaisnt the provided schema.
126+
* Parses raw data object against the provided schema.
127127
*/
128128
export function parseSchema<T = unknown>(
129129
data: unknown,

js/genkit/src/client/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ async function __flowRunEnvelope({
117117
if (decodedValue) {
118118
buffer += decodedValue;
119119
}
120-
// If buffer includes the delimiter that means we are still recieving chunks.
120+
// If buffer includes the delimiter that means we are still receiving chunks.
121121
while (buffer.includes(__flowStreamDelimiter)) {
122122
const chunk = JSON.parse(
123123
buffer
@@ -133,7 +133,7 @@ async function __flowRunEnvelope({
133133
`${chunk.error.status}: ${chunk.error.message}\n${chunk.error.details}`
134134
);
135135
} else {
136-
throw new Error('unkown chunk format: ' + JSON.stringify(chunk));
136+
throw new Error('unknown chunk format: ' + JSON.stringify(chunk));
137137
}
138138
buffer = buffer.substring(
139139
buffer.indexOf(__flowStreamDelimiter) + __flowStreamDelimiter.length

js/genkit/src/client/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
/**
20-
* A simple, browser-safe client library for remotely runnning/streaming deployed Genkit flows.
20+
* A simple, browser-safe client library for remotely running/streaming deployed Genkit flows.
2121
*
2222
* ```ts
2323
* import { runFlow, streamFlow } from 'genkit/beta/client';

js/genkit/src/genkit-beta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class GenkitBeta extends Genkit {
8686
chat<I>(options?: ChatOptions<I>): Chat;
8787

8888
/**
89-
* Create a chat session with the provided preabmle.
89+
* Create a chat session with the provided preamble.
9090
*
9191
* ```ts
9292
* const triageAgent = ai.definePrompt({
@@ -272,7 +272,7 @@ export class GenkitBeta extends Genkit {
272272
}
273273

274274
/**
275-
* Defines a resource. Resources can then be accessed from a genreate call.
275+
* Defines a resource. Resources can then be accessed from a generate call.
276276
*
277277
* ```ts
278278
* ai.defineResource({

js/genkit/src/genkit.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,14 +547,14 @@ export class Genkit implements HasRegistry {
547547
}
548548

549549
/**
550-
* create a handlebards helper (https://handlebarsjs.com/guide/block-helpers.html) to be used in dotpormpt templates.
550+
* create a handlebars helper (https://handlebarsjs.com/guide/block-helpers.html) to be used in dotprompt templates.
551551
*/
552552
defineHelper(name: string, fn: Handlebars.HelperDelegate): void {
553553
defineHelper(this.registry, name, fn);
554554
}
555555

556556
/**
557-
* Creates a handlebars partial (https://handlebarsjs.com/guide/partials.html) to be used in dotpormpt templates.
557+
* Creates a handlebars partial (https://handlebarsjs.com/guide/partials.html) to be used in dotprompt templates.
558558
*/
559559
definePartial(name: string, source: string): void {
560560
definePartial(this.registry, name, source);
@@ -1017,7 +1017,7 @@ function registerActionV2(
10171017
} else {
10181018
throw new GenkitError({
10191019
status: 'INVALID_ARGUMENT',
1020-
message: 'Unkown action type returned from plugin ' + plugin.name,
1020+
message: 'Unknown action type returned from plugin ' + plugin.name,
10211021
});
10221022
}
10231023
}

js/genkit/tests/prompts_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ describe('definePrompt', () => {
9999
const lookedUpPrompt = ai.prompt('hi');
100100
// This is a known limitation -- prompt lookup is async under the hood,
101101
// so we can't actually get the metadata...
102-
assert.deepStrictEqual(lookedUpPrompt.ref, { name: 'hi' }); // ideally metadatashould be: { foo: 'bar' }
102+
assert.deepStrictEqual(lookedUpPrompt.ref, { name: 'hi' }); // ideally metadata should be: { foo: 'bar' }
103103
});
104104

105105
it('should apply middleware to a prompt call', async () => {
@@ -692,7 +692,7 @@ describe('definePrompt', () => {
692692
defineEchoModel(ai);
693693
});
694694

695-
it('renderes dotprompt messages', async () => {
695+
it('renders dotprompt messages', async () => {
696696
const hi = ai.definePrompt({
697697
name: 'hi',
698698
input: {

js/genkit/tests/session_test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,8 @@ describe('session', () => {
370370

371371
const session = ai.createSession();
372372
const chat = session.chat(agent);
373-
const respose = await chat.send('hi');
374-
assert.deepStrictEqual(respose.messages, [
373+
const response = await chat.send('hi');
374+
assert.deepStrictEqual(response.messages, [
375375
{
376376
role: 'system',
377377
content: [{ text: 'hello from template' }],
@@ -405,8 +405,8 @@ describe('session', () => {
405405
name: 'Genkit',
406406
},
407407
});
408-
const respose = await chat.send('hi');
409-
assert.deepStrictEqual(respose.messages, [
408+
const response = await chat.send('hi');
409+
assert.deepStrictEqual(response.messages, [
410410
{
411411
role: 'system',
412412
content: [{ text: 'hello Genkit from template' }],
@@ -481,8 +481,8 @@ describe('session', () => {
481481
},
482482
});
483483
const chat = session.chat(agent);
484-
const respose = await chat.send('hi');
485-
assert.deepStrictEqual(respose.messages, [
484+
const response = await chat.send('hi');
485+
assert.deepStrictEqual(response.messages, [
486486
{
487487
role: 'system',
488488
content: [{ text: 'foo=bar' }],

js/plugins/compat-oai/src/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export function fromOpenAIToolCall(
244244
}
245245
const f = toolCall.function;
246246

247-
// Only parse arugments when it is a JSON object and the finish reason is tool_calls to avoid parsing errors
247+
// Only parse arguments when it is a JSON object and the finish reason is tool_calls to avoid parsing errors
248248
if (choice.finish_reason === 'tool_calls') {
249249
return {
250250
toolRequest: {

js/plugins/compat-oai/tests/compat_oai_test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ describe('openAIModelRunner', () => {
13171317
completions: {
13181318
stream: jest.fn(
13191319
() =>
1320-
// Simluate OpenAI SDK request streaming
1320+
// Simulate OpenAI SDK request streaming
13211321
new (class {
13221322
isFirstRequest = true;
13231323
[Symbol.asyncIterator]() {

js/plugins/google-genai/src/vertexai/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ export declare interface LyriaPredictResponse {
361361

362362
export declare interface LyriaPrediction {
363363
bytesBase64Encoded: string; // Base64 encoded Wav string
364-
mimeType: string; // autio/wav
364+
mimeType: string; // audio/wav
365365
}
366366

367367
export declare interface LyriaInstance {

0 commit comments

Comments
 (0)