Skip to content

Commit

Permalink
add azure OpenAI
Browse files Browse the repository at this point in the history
Update OpenAI v4 to latest beta and fixed a few bugs
  • Loading branch information
yisding committed Aug 7, 2023
1 parent 9214b06 commit 3316c6b
Show file tree
Hide file tree
Showing 40 changed files with 672 additions and 461 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-poems-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"llamaindex": patch
---

Add Azure OpenAI support
5 changes: 5 additions & 0 deletions .changeset/tricky-windows-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"llamaindex": patch
---

OpenAI Node v4-beta.8
26 changes: 13 additions & 13 deletions apps/docs/docs/api/classes/Anthropic.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Anthropic LLM implementation

#### Defined in

[llm/LLM.ts:353](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L353)
[llm/LLM.ts:387](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L387)

## Properties

Expand All @@ -36,7 +36,7 @@ Anthropic LLM implementation

#### Defined in

[llm/LLM.ts:346](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L346)
[llm/LLM.ts:380](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L380)

___

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

#### Defined in

[llm/LLM.ts:351](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L351)
[llm/LLM.ts:385](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L385)

___

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

#### Defined in

[llm/LLM.ts:347](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L347)
[llm/LLM.ts:381](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L381)

___

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

#### Defined in

[llm/LLM.ts:343](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L343)
[llm/LLM.ts:377](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L377)

___

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

#### Defined in

[llm/LLM.ts:340](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L340)
[llm/LLM.ts:374](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L374)

___

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

#### Defined in

[llm/LLM.ts:349](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L349)
[llm/LLM.ts:383](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L383)

___

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

#### Defined in

[llm/LLM.ts:341](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L341)
[llm/LLM.ts:375](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L375)

___

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

#### Defined in

[llm/LLM.ts:348](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L348)
[llm/LLM.ts:382](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L382)

___

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

#### Defined in

[llm/LLM.ts:342](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L342)
[llm/LLM.ts:376](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L376)

## Methods

Expand All @@ -143,7 +143,7 @@ Get a chat response from the LLM

#### Defined in

[llm/LLM.ts:388](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L388)
[llm/LLM.ts:422](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L422)

___

Expand All @@ -170,7 +170,7 @@ Get a prompt completion from the LLM

#### Defined in

[llm/LLM.ts:406](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L406)
[llm/LLM.ts:440](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L440)

___

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

#### Defined in

[llm/LLM.ts:373](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L373)
[llm/LLM.ts:407](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/llm/LLM.ts#L407)
6 changes: 3 additions & 3 deletions apps/docs/docs/api/classes/BaseEmbedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ custom_edit_url: null

#### Defined in

[Embedding.ts:206](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L206)
[Embedding.ts:213](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L213)

___

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

#### Defined in

[Embedding.ts:205](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L205)
[Embedding.ts:212](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L212)

___

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

#### Defined in

[Embedding.ts:197](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L197)
[Embedding.ts:204](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Embedding.ts#L204)
18 changes: 9 additions & 9 deletions apps/docs/docs/api/classes/BaseIndex.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ they can be retrieved for our queries.

#### Defined in

[indices/BaseIndex.ts:122](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L122)
[indices/BaseIndex.ts:127](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L127)

## Properties

Expand All @@ -53,7 +53,7 @@ they can be retrieved for our queries.

#### Defined in

[indices/BaseIndex.ts:117](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L117)
[indices/BaseIndex.ts:122](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L122)

___

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

#### Defined in

[indices/BaseIndex.ts:119](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L119)
[indices/BaseIndex.ts:124](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L124)

___

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

#### Defined in

[indices/BaseIndex.ts:120](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L120)
[indices/BaseIndex.ts:125](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L125)

___

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

#### Defined in

[indices/BaseIndex.ts:115](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L115)
[indices/BaseIndex.ts:120](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L120)

___

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

#### Defined in

[indices/BaseIndex.ts:116](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L116)
[indices/BaseIndex.ts:121](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L121)

___

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

#### Defined in

[indices/BaseIndex.ts:118](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L118)
[indices/BaseIndex.ts:123](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L123)

## Methods

Expand All @@ -128,7 +128,7 @@ and response synthezier if they are not provided.

#### Defined in

[indices/BaseIndex.ts:142](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L142)
[indices/BaseIndex.ts:147](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L147)

___

Expand All @@ -150,4 +150,4 @@ Create a new retriever from the index.

#### Defined in

[indices/BaseIndex.ts:135](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L135)
[indices/BaseIndex.ts:140](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/indices/BaseIndex.ts#L140)
16 changes: 16 additions & 0 deletions apps/docs/docs/api/classes/BaseNode.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,19 @@ ___
#### Defined in

[Node.ts:56](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L56)

___

### toJSON

**toJSON**(): `Record`<`string`, `any`\>

Used with built in JSON.stringify

#### Returns

`Record`<`string`, `any`\>

#### Defined in

[Node.ts:136](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L136)
46 changes: 33 additions & 13 deletions apps/docs/docs/api/classes/Document.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ A document is just a special text node with a docId.

#### Defined in

[Node.ts:216](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L216)
[Node.ts:229](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L229)

## Properties

Expand Down Expand Up @@ -60,7 +60,7 @@ ___

#### Defined in

[Node.ts:139](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L139)
[Node.ts:147](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L147)

___

Expand Down Expand Up @@ -144,7 +144,7 @@ ___

#### Defined in

[Node.ts:142](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L142)
[Node.ts:150](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L150)

___

Expand Down Expand Up @@ -172,7 +172,7 @@ ___

#### Defined in

[Node.ts:138](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L138)
[Node.ts:146](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L146)

___

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

#### Defined in

[Node.ts:137](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L137)
[Node.ts:145](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L145)

## Accessors

Expand Down Expand Up @@ -218,7 +218,7 @@ ___

#### Defined in

[Node.ts:225](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L225)
[Node.ts:238](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L238)

___

Expand Down Expand Up @@ -344,7 +344,7 @@ ___

#### Defined in

[Node.ts:149](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L149)
[Node.ts:157](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L157)

___

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

#### Defined in

[Node.ts:157](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L157)
[Node.ts:165](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L165)

___

Expand Down Expand Up @@ -410,7 +410,7 @@ ___

#### Defined in

[Node.ts:162](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L162)
[Node.ts:170](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L170)

___

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

#### Defined in

[Node.ts:187](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L187)
[Node.ts:195](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L195)

___

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

#### Defined in

[Node.ts:191](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L191)
[Node.ts:199](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L199)

___

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

#### Defined in

[Node.ts:221](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L221)
[Node.ts:234](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L234)

___

Expand All @@ -493,4 +493,24 @@ ___

#### Defined in

[Node.ts:183](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L183)
[Node.ts:191](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L191)

___

### toJSON

**toJSON**(): `Record`<`string`, `any`\>

Used with built in JSON.stringify

#### Returns

`Record`<`string`, `any`\>

#### Inherited from

[TextNode](TextNode.md).[toJSON](TextNode.md#tojson)

#### Defined in

[Node.ts:136](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/core/src/Node.ts#L136)
Loading

0 comments on commit 3316c6b

Please sign in to comment.