Compare commits

..

4 Commits

Author SHA1 Message Date
github-actions[bot] 52c47cada3 Release 0.3.13 (#856)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-22 16:31:23 +07:00
Marcus Schiesser 9216312b11 docs: fix changsets and format 2024-05-22 11:25:09 +02:00
Philipp Serrer 660a2b3495 fix: text before heading in markdown reader (#864) 2024-05-22 16:49:52 +08:00
Henry Heng 6d21092805 Fix/Agent llm initialization (#866) 2024-05-21 15:35:18 -07:00
26 changed files with 110 additions and 43 deletions
-5
View File
@@ -1,5 +0,0 @@
---
"llamaindex": patch
---
Add vectorStores to storage context to define vector store per modality
-6
View File
@@ -1,6 +0,0 @@
---
"llamaindex": patch
"@llamaindex/examples": patch
---
Added support for accessing Gemini via Vertex AI
-5
View File
@@ -1,5 +0,0 @@
---
"llamaindex": patch
---
Add system prompt to ContextChatEngine
+10
View File
@@ -1,5 +1,15 @@
# docs
## 0.0.21
### Patch Changes
- Updated dependencies [1b1081b]
- Updated dependencies [37525df]
- Updated dependencies [660a2b3]
- Updated dependencies [a1f2475]
- llamaindex@0.3.13
## 0.0.20
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "docs",
"version": "0.0.20",
"version": "0.0.21",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
@@ -4,6 +4,17 @@
### Patch Changes
- Updated dependencies [1b1081b]
- Updated dependencies [37525df]
- Updated dependencies [660a2b3]
- Updated dependencies [a1f2475]
- llamaindex@0.3.13
- @llamaindex/autotool@0.0.1
## null
### Patch Changes
- Updated dependencies [34fb1d8]
- llamaindex@0.3.12
- @llamaindex/autotool@0.0.1
@@ -1,5 +1,16 @@
# @llamaindex/autotool-02-next-example
## 0.1.5
### Patch Changes
- Updated dependencies [1b1081b]
- Updated dependencies [37525df]
- Updated dependencies [660a2b3]
- Updated dependencies [a1f2475]
- llamaindex@0.3.13
- @llamaindex/autotool@0.0.1
## 0.1.4
### Patch Changes
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/autotool-02-next-example",
"private": true,
"version": "0.1.4",
"version": "0.1.5",
"scripts": {
"dev": "next dev",
"build": "next build",
+1 -1
View File
@@ -51,7 +51,7 @@
"unplugin": "^1.10.1"
},
"peerDependencies": {
"llamaindex": "^0.3.12",
"llamaindex": "^0.3.13",
"openai": "^4",
"typescript": "^4"
},
+9
View File
@@ -1,5 +1,14 @@
# llamaindex
## 0.3.13
### Patch Changes
- 1b1081b: Add vectorStores to storage context to define vector store per modality
- 37525df: Added support for accessing Gemini via Vertex AI
- 660a2b3: Fix text before heading in markdown reader
- a1f2475: Add system prompt to ContextChatEngine
## 0.3.12
### Patch Changes
@@ -1,5 +1,15 @@
# @llamaindex/cloudflare-worker-agent-test
## 0.0.14
### Patch Changes
- Updated dependencies [1b1081b]
- Updated dependencies [37525df]
- Updated dependencies [660a2b3]
- Updated dependencies [a1f2475]
- llamaindex@0.3.13
## 0.0.13
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/cloudflare-worker-agent-test",
"version": "0.0.13",
"version": "0.0.14",
"type": "module",
"private": true,
"scripts": {
@@ -1,5 +1,15 @@
# @llamaindex/next-agent-test
## 0.1.14
### Patch Changes
- Updated dependencies [1b1081b]
- Updated dependencies [37525df]
- Updated dependencies [660a2b3]
- Updated dependencies [a1f2475]
- llamaindex@0.3.13
## 0.1.13
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/next-agent-test",
"version": "0.1.13",
"version": "0.1.14",
"private": true,
"scripts": {
"dev": "next dev",
@@ -1,5 +1,15 @@
# test-edge-runtime
## 0.1.13
### Patch Changes
- Updated dependencies [1b1081b]
- Updated dependencies [37525df]
- Updated dependencies [660a2b3]
- Updated dependencies [a1f2475]
- llamaindex@0.3.13
## 0.1.12
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/nextjs-edge-runtime-test",
"version": "0.1.12",
"version": "0.1.13",
"private": true,
"scripts": {
"dev": "next dev",
@@ -1,5 +1,15 @@
# @llamaindex/waku-query-engine-test
## 0.0.14
### Patch Changes
- Updated dependencies [1b1081b]
- Updated dependencies [37525df]
- Updated dependencies [660a2b3]
- Updated dependencies [a1f2475]
- llamaindex@0.3.13
## 0.0.13
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/waku-query-engine-test",
"version": "0.0.13",
"version": "0.0.14",
"type": "module",
"private": true,
"scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/core",
"version": "0.3.12",
"version": "0.3.13",
"exports": "./src/index.ts",
"imports": {
"@llamaindex/env": "jsr:@llamaindex/env@0.1.3"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "llamaindex",
"version": "0.3.12",
"version": "0.3.13",
"expectedMinorVersion": "3",
"license": "MIT",
"type": "module",
+3 -2
View File
@@ -39,9 +39,10 @@ export class AnthropicAgent extends AgentRunner<Anthropic> {
constructor(params: AnthropicAgentParams) {
super({
llm:
params.llm ?? Settings.llm instanceof Anthropic
params.llm ??
(Settings.llm instanceof Anthropic
? (Settings.llm as Anthropic)
: new Anthropic(),
: new Anthropic()),
chatHistory: params.chatHistory ?? [],
systemPrompt: params.systemPrompt ?? null,
runner: new AnthropicAgentWorker(),
+3 -2
View File
@@ -36,9 +36,10 @@ export class OpenAIAgent extends AgentRunner<OpenAI> {
constructor(params: OpenAIAgentParams) {
super({
llm:
params.llm ?? Settings.llm instanceof OpenAI
params.llm ??
(Settings.llm instanceof OpenAI
? (Settings.llm as OpenAI)
: new OpenAI(),
: new OpenAI()),
chatHistory: params.chatHistory ?? [],
runner: new OpenAIAgentWorker(),
systemPrompt: params.systemPrompt ?? null,
@@ -43,6 +43,8 @@ export class MarkdownReader implements FileReader {
continue;
}
markdownTups.push([currentHeader, currentText]);
} else if (currentText) {
markdownTups.push([null, currentText]);
}
currentHeader = line;
@@ -151,20 +151,13 @@ export class SimpleVectorStore
async persist(
persistPath: string = path.join(DEFAULT_PERSIST_DIR, "vector_store.json"),
): Promise<void> {
await SimpleVectorStore.persistData(persistPath, this.data);
}
protected static async persistData(
persistPath: string,
data: SimpleVectorStoreData,
): Promise<void> {
const dirPath = path.dirname(persistPath);
if (!(await exists(dirPath))) {
await fs.mkdir(dirPath);
}
await fs.writeFile(persistPath, JSON.stringify(data));
await fs.writeFile(persistPath, JSON.stringify(this.data));
}
static async fromPersistPath(
@@ -184,11 +177,6 @@ export class SimpleVectorStore
console.error(
`No valid data found at path: ${persistPath} starting new store.`,
);
// persist empty data, to ignore this error in the future
await SimpleVectorStore.persistData(
persistPath,
new SimpleVectorStoreData(),
);
}
const data = new SimpleVectorStoreData();
+10
View File
@@ -1,5 +1,15 @@
# @llamaindex/experimental
## 0.0.30
### Patch Changes
- Updated dependencies [1b1081b]
- Updated dependencies [37525df]
- Updated dependencies [660a2b3]
- Updated dependencies [a1f2475]
- llamaindex@0.3.13
## 0.0.29
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/experimental",
"description": "Experimental package for LlamaIndexTS",
"version": "0.0.29",
"version": "0.0.30",
"type": "module",
"types": "dist/type/index.d.ts",
"main": "dist/cjs/index.js",