Skip to content

Commit

Permalink
fix(ts, docs): missing docs of classes / types
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Nov 18, 2024
1 parent 0c04b5e commit 1bfc8d8
Show file tree
Hide file tree
Showing 8 changed files with 545 additions and 79 deletions.
328 changes: 313 additions & 15 deletions docs/API/README.md

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions docs/API/classes/LlamaContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@

| Name | Type |
| :------ | :------ |
| `«destructured»` | `NativeLlamaContext` |
| `«destructured»` | [`NativeLlamaContext`](../README.md#nativellamacontext) |

#### Defined in

[index.ts:84](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L84)
[index.ts:105](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L105)

## Properties

Expand All @@ -52,7 +52,7 @@

#### Defined in

[index.ts:76](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L76)
[index.ts:97](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L97)

___

Expand All @@ -62,7 +62,7 @@ ___

#### Defined in

[index.ts:74](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L74)
[index.ts:95](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L95)

___

Expand All @@ -78,7 +78,7 @@ ___

#### Defined in

[index.ts:80](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L80)
[index.ts:101](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L101)

___

Expand All @@ -88,7 +88,7 @@ ___

#### Defined in

[index.ts:78](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L78)
[index.ts:99](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L99)

## Methods

Expand All @@ -111,13 +111,13 @@ ___

#### Defined in

[index.ts:176](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L176)
[index.ts:197](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L197)

___

### completion

**completion**(`params`, `callback?`): `Promise`<`NativeCompletionResult`\>
**completion**(`params`, `callback?`): `Promise`<[`NativeCompletionResult`](../README.md#nativecompletionresult)\>

#### Parameters

Expand All @@ -128,11 +128,11 @@ ___

#### Returns

`Promise`<`NativeCompletionResult`\>
`Promise`<[`NativeCompletionResult`](../README.md#nativecompletionresult)\>

#### Defined in

[index.ts:120](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L120)
[index.ts:141](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L141)

___

Expand All @@ -152,28 +152,28 @@ ___

#### Defined in

[index.ts:165](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L165)
[index.ts:186](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L186)

___

### embedding

**embedding**(`text`, `params?`): `Promise`<`NativeEmbeddingResult`\>
**embedding**(`text`, `params?`): `Promise`<[`NativeEmbeddingResult`](../README.md#nativeembeddingresult)\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `text` | `string` |
| `params?` | `NativeEmbeddingParams` |
| `params?` | [`NativeEmbeddingParams`](../README.md#nativeembeddingparams) |

#### Returns

`Promise`<`NativeEmbeddingResult`\>
`Promise`<[`NativeEmbeddingResult`](../README.md#nativeembeddingresult)\>

#### Defined in

[index.ts:169](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L169)
[index.ts:190](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L190)

___

Expand All @@ -185,7 +185,7 @@ ___

| Name | Type |
| :------ | :------ |
| `messages` | `RNLlamaOAICompatibleMessage`[] |
| `messages` | [`RNLlamaOAICompatibleMessage`](../README.md#rnllamaoaicompatiblemessage)[] |
| `template?` | `string` |

#### Returns
Expand All @@ -194,13 +194,13 @@ ___

#### Defined in

[index.ts:110](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L110)
[index.ts:131](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L131)

___

### loadSession

**loadSession**(`filepath`): `Promise`<`NativeSessionLoadResult`\>
**loadSession**(`filepath`): `Promise`<[`NativeSessionLoadResult`](../README.md#nativesessionloadresult)\>

Load cached prompt & completion state from a file.

Expand All @@ -212,11 +212,11 @@ Load cached prompt & completion state from a file.

#### Returns

`Promise`<`NativeSessionLoadResult`\>
`Promise`<[`NativeSessionLoadResult`](../README.md#nativesessionloadresult)\>

#### Defined in

[index.ts:94](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L94)
[index.ts:115](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L115)

___

Expand All @@ -230,7 +230,7 @@ ___

#### Defined in

[index.ts:196](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L196)
[index.ts:217](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L217)

___

Expand All @@ -254,7 +254,7 @@ Save current cached prompt & completion state to a file.

#### Defined in

[index.ts:103](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L103)
[index.ts:124](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L124)

___

Expand All @@ -268,13 +268,13 @@ ___

#### Defined in

[index.ts:157](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L157)
[index.ts:178](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L178)

___

### tokenize

**tokenize**(`text`): `Promise`<`NativeTokenizeResult`\>
**tokenize**(`text`): `Promise`<[`NativeTokenizeResult`](../README.md#nativetokenizeresult)\>

#### Parameters

Expand All @@ -284,8 +284,8 @@ ___

#### Returns

`Promise`<`NativeTokenizeResult`\>
`Promise`<[`NativeTokenizeResult`](../README.md#nativetokenizeresult)\>

#### Defined in

[index.ts:161](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/index.ts#L161)
[index.ts:182](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/index.ts#L182)
38 changes: 19 additions & 19 deletions docs/API/classes/SchemaGrammarConverter.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
| `options` | `Object` |
| `options.allow_fetch?` | `boolean` |
| `options.dotall?` | `boolean` |
| `options.prop_order?` | `PropOrder` |
| `options.prop_order?` | [`SchemaGrammarConverterPropOrder`](../interfaces/SchemaGrammarConverterPropOrder.md) |

#### Defined in

[grammar.ts:211](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L211)
[grammar.ts:213](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L213)

## Properties

Expand All @@ -56,7 +56,7 @@

#### Defined in

[grammar.ts:201](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L201)
[grammar.ts:203](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L203)

___

Expand All @@ -66,17 +66,17 @@ ___

#### Defined in

[grammar.ts:203](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L203)
[grammar.ts:205](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L205)

___

### \_propOrder

`Private` **\_propOrder**: `PropOrder`
`Private` **\_propOrder**: [`SchemaGrammarConverterPropOrder`](../interfaces/SchemaGrammarConverterPropOrder.md)

#### Defined in

[grammar.ts:199](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L199)
[grammar.ts:201](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L201)

___

Expand All @@ -90,7 +90,7 @@ ___

#### Defined in

[grammar.ts:207](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L207)
[grammar.ts:209](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L209)

___

Expand All @@ -100,7 +100,7 @@ ___

#### Defined in

[grammar.ts:209](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L209)
[grammar.ts:211](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L211)

___

Expand All @@ -114,7 +114,7 @@ ___

#### Defined in

[grammar.ts:205](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L205)
[grammar.ts:207](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L207)

## Methods

Expand All @@ -127,15 +127,15 @@ ___
| Name | Type |
| :------ | :------ |
| `name` | `string` |
| `rule` | `undefined` \| `BuiltinRule` |
| `rule` | `undefined` \| [`SchemaGrammarConverterBuiltinRule`](SchemaGrammarConverterBuiltinRule.md) |

#### Returns

`string`

#### Defined in

[grammar.ts:693](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L693)
[grammar.ts:695](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L695)

___

Expand All @@ -156,7 +156,7 @@ ___

#### Defined in

[grammar.ts:224](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L224)
[grammar.ts:226](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L226)

___

Expand All @@ -179,7 +179,7 @@ ___

#### Defined in

[grammar.ts:710](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L710)
[grammar.ts:712](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L712)

___

Expand All @@ -200,7 +200,7 @@ ___

#### Defined in

[grammar.ts:312](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L312)
[grammar.ts:314](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L314)

___

Expand All @@ -220,7 +220,7 @@ ___

#### Defined in

[grammar.ts:518](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L518)
[grammar.ts:520](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L520)

___

Expand All @@ -241,7 +241,7 @@ ___

#### Defined in

[grammar.ts:323](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L323)
[grammar.ts:325](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L325)

___

Expand All @@ -255,7 +255,7 @@ ___

#### Defined in

[grammar.ts:813](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L813)
[grammar.ts:815](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L815)

___

Expand All @@ -276,7 +276,7 @@ ___

#### Defined in

[grammar.ts:247](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L247)
[grammar.ts:249](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L249)

___

Expand All @@ -297,4 +297,4 @@ ___

#### Defined in

[grammar.ts:529](https://github.com/mybigday/llama.rn/blob/8e54cbb/src/grammar.ts#L529)
[grammar.ts:531](https://github.com/mybigday/llama.rn/blob/0c04b5e/src/grammar.ts#L531)
Loading

0 comments on commit 1bfc8d8

Please sign in to comment.