Skip to content

Commit

Permalink
docs(api): build
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Feb 5, 2025
1 parent aaf9f50 commit 2c097fb
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 64 deletions.
98 changes: 73 additions & 25 deletions docs/API/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ llama.rn

### Functions

- [addNativeLogListener](README.md#addnativeloglistener)
- [convertJsonSchemaToGrammar](README.md#convertjsonschematogrammar)
- [initLlama](README.md#initllama)
- [loadLlamaModelInfo](README.md#loadllamamodelinfo)
- [releaseAllLlama](README.md#releaseallllama)
- [setContextLimit](README.md#setcontextlimit)
- [toggleNativeLog](README.md#togglenativelog)

## Type Aliases

Expand All @@ -65,7 +67,7 @@ llama.rn

#### Defined in

[index.ts:118](https://github.com/mybigday/llama.rn/blob/877054a/src/index.ts#L118)
[index.ts:134](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L134)

___

Expand All @@ -78,6 +80,7 @@ ___
| Name | Type |
| :------ | :------ |
| `chatTemplate?` | `string` |
| `chat_template?` | `string` |
| `jinja?` | `boolean` |
| `messages?` | [`RNLlamaOAICompatibleMessage`](README.md#rnllamaoaicompatiblemessage)[] |
| `parallel_tool_calls?` | `object` |
Expand All @@ -88,7 +91,7 @@ ___

#### Defined in

[index.ts:103](https://github.com/mybigday/llama.rn/blob/877054a/src/index.ts#L103)
[index.ts:117](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L117)

___

Expand All @@ -98,7 +101,7 @@ ___

#### Defined in

[index.ts:113](https://github.com/mybigday/llama.rn/blob/877054a/src/index.ts#L113)
[index.ts:128](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L128)

___

Expand All @@ -118,7 +121,7 @@ ___

#### Defined in

[index.ts:94](https://github.com/mybigday/llama.rn/blob/877054a/src/index.ts#L94)
[index.ts:108](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L108)

___

Expand All @@ -128,7 +131,7 @@ ___

#### Defined in

[index.ts:67](https://github.com/mybigday/llama.rn/blob/877054a/src/index.ts#L67)
[index.ts:81](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L81)

___

Expand All @@ -138,7 +141,7 @@ ___

#### Defined in

[index.ts:92](https://github.com/mybigday/llama.rn/blob/877054a/src/index.ts#L92)
[index.ts:106](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L106)

___

Expand Down Expand Up @@ -187,7 +190,7 @@ ___

#### Defined in

[NativeRNLlama.ts:61](https://github.com/mybigday/llama.rn/blob/877054a/src/NativeRNLlama.ts#L61)
[NativeRNLlama.ts:66](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/NativeRNLlama.ts#L66)

___

Expand All @@ -213,7 +216,7 @@ ___

#### Defined in

[NativeRNLlama.ts:220](https://github.com/mybigday/llama.rn/blob/877054a/src/NativeRNLlama.ts#L220)
[NativeRNLlama.ts:225](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/NativeRNLlama.ts#L225)

___

Expand All @@ -236,7 +239,7 @@ ___

#### Defined in

[NativeRNLlama.ts:209](https://github.com/mybigday/llama.rn/blob/877054a/src/NativeRNLlama.ts#L209)
[NativeRNLlama.ts:214](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/NativeRNLlama.ts#L214)

___

Expand All @@ -253,7 +256,7 @@ ___

#### Defined in

[NativeRNLlama.ts:204](https://github.com/mybigday/llama.rn/blob/877054a/src/NativeRNLlama.ts#L204)
[NativeRNLlama.ts:209](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/NativeRNLlama.ts#L209)

___

Expand All @@ -270,7 +273,7 @@ ___

#### Defined in

[NativeRNLlama.ts:199](https://github.com/mybigday/llama.rn/blob/877054a/src/NativeRNLlama.ts#L199)
[NativeRNLlama.ts:204](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/NativeRNLlama.ts#L204)

___

Expand All @@ -284,6 +287,7 @@ ___
| :------ | :------ | :------ |
| `cache_type_k?` | `string` | KV cache data type for the K (Experimental in llama.cpp) |
| `cache_type_v?` | `string` | KV cache data type for the V (Experimental in llama.cpp) |
| `chat_template?` | `string` | Chat template to override the default one from the model. |
| `embd_normalize?` | `number` | - |
| `embedding?` | `boolean` | - |
| `flash_attn?` | `boolean` | Enable flash attention, only recommended in GPU device (Experimental in llama.cpp) |
Expand All @@ -307,7 +311,7 @@ ___

#### Defined in

[NativeRNLlama.ts:8](https://github.com/mybigday/llama.rn/blob/877054a/src/NativeRNLlama.ts#L8)
[NativeRNLlama.ts:8](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/NativeRNLlama.ts#L8)

___

Expand All @@ -323,7 +327,7 @@ ___

#### Defined in

[NativeRNLlama.ts:4](https://github.com/mybigday/llama.rn/blob/877054a/src/NativeRNLlama.ts#L4)
[NativeRNLlama.ts:4](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/NativeRNLlama.ts#L4)

___

Expand All @@ -339,7 +343,7 @@ ___

#### Defined in

[NativeRNLlama.ts:240](https://github.com/mybigday/llama.rn/blob/877054a/src/NativeRNLlama.ts#L240)
[NativeRNLlama.ts:245](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/NativeRNLlama.ts#L245)

___

Expand Down Expand Up @@ -384,7 +388,7 @@ ___

#### Defined in

[NativeRNLlama.ts:244](https://github.com/mybigday/llama.rn/blob/877054a/src/NativeRNLlama.ts#L244)
[NativeRNLlama.ts:249](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/NativeRNLlama.ts#L249)

___

Expand All @@ -401,7 +405,7 @@ ___

#### Defined in

[NativeRNLlama.ts:285](https://github.com/mybigday/llama.rn/blob/877054a/src/NativeRNLlama.ts#L285)
[NativeRNLlama.ts:291](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/NativeRNLlama.ts#L291)

___

Expand All @@ -417,7 +421,7 @@ ___

#### Defined in

[NativeRNLlama.ts:236](https://github.com/mybigday/llama.rn/blob/877054a/src/NativeRNLlama.ts#L236)
[NativeRNLlama.ts:241](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/NativeRNLlama.ts#L241)

___

Expand All @@ -433,7 +437,7 @@ ___

#### Defined in

[chat.ts:3](https://github.com/mybigday/llama.rn/blob/877054a/src/chat.ts#L3)
[chat.ts:3](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/chat.ts#L3)

___

Expand All @@ -450,7 +454,7 @@ ___

#### Defined in

[chat.ts:7](https://github.com/mybigday/llama.rn/blob/877054a/src/chat.ts#L7)
[chat.ts:7](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/chat.ts#L7)

___

Expand All @@ -467,10 +471,34 @@ ___

#### Defined in

[index.ts:57](https://github.com/mybigday/llama.rn/blob/877054a/src/index.ts#L57)
[index.ts:71](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L71)

## Functions

### addNativeLogListener

**addNativeLogListener**(`listener`): `Object`

#### Parameters

| Name | Type |
| :------ | :------ |
| `listener` | (`level`: `string`, `message`: `string`) => `void` |

#### Returns

`Object`

| Name | Type |
| :------ | :------ |
| `remove` | () => `void` |

#### Defined in

[index.ts:381](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L381)

___

### convertJsonSchemaToGrammar

**convertJsonSchemaToGrammar**(`«destructured»`): `string` \| `Promise`<`string`\>
Expand All @@ -491,7 +519,7 @@ ___

#### Defined in

[grammar.ts:829](https://github.com/mybigday/llama.rn/blob/877054a/src/grammar.ts#L829)
[grammar.ts:829](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/grammar.ts#L829)

___

Expand All @@ -512,7 +540,7 @@ ___

#### Defined in

[index.ts:390](https://github.com/mybigday/llama.rn/blob/877054a/src/index.ts#L390)
[index.ts:421](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L421)

___

Expand All @@ -532,7 +560,7 @@ ___

#### Defined in

[index.ts:375](https://github.com/mybigday/llama.rn/blob/877054a/src/index.ts#L375)
[index.ts:406](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L406)

___

Expand All @@ -546,7 +574,7 @@ ___

#### Defined in

[index.ts:456](https://github.com/mybigday/llama.rn/blob/877054a/src/index.ts#L456)
[index.ts:487](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L487)

___

Expand All @@ -566,4 +594,24 @@ ___

#### Defined in

[index.ts:361](https://github.com/mybigday/llama.rn/blob/877054a/src/index.ts#L361)
[index.ts:392](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L392)

___

### toggleNativeLog

**toggleNativeLog**(`enabled`): `Promise`<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `enabled` | `boolean` |

#### Returns

`Promise`<`void`\>

#### Defined in

[index.ts:377](https://github.com/mybigday/llama.rn/blob/aaf9f50/src/index.ts#L377)
Loading

0 comments on commit 2c097fb

Please sign in to comment.