ragpack-js 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -5
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@ TypeScript SDK for [RagPack](https://github.com/eozsahin1993/ragpack) — a self
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install ragpack
|
|
8
|
+
npm install ragpack-js
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Quick start
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
|
-
import { RagPack } from "ragpack";
|
|
14
|
+
import { RagPack } from "ragpack-js";
|
|
15
15
|
|
|
16
16
|
const client = new RagPack({
|
|
17
17
|
baseUrl: "http://localhost:9000",
|
|
@@ -24,7 +24,10 @@ const collection = await client.collections.create("my-docs");
|
|
|
24
24
|
// Ingest a file
|
|
25
25
|
await collection.ingest(file);
|
|
26
26
|
|
|
27
|
-
// Or ingest from a
|
|
27
|
+
// Or ingest from a URL
|
|
28
|
+
await collection.ingest({ uri: "https://example.com/docs/guide" });
|
|
29
|
+
|
|
30
|
+
// Or from S3
|
|
28
31
|
await collection.ingest({ uri: "s3://my-bucket/report.pdf" });
|
|
29
32
|
|
|
30
33
|
// Wait for ingestion to finish
|
|
@@ -67,7 +70,7 @@ Returns a `CollectionClient` scoped to that collection.
|
|
|
67
70
|
| Method | Description |
|
|
68
71
|
|-------------------------------------|------------------------------------------|
|
|
69
72
|
| `ingest(file, filename?)` | Upload a file directly |
|
|
70
|
-
| `ingest({ uri, mimeType? })` | Ingest from a
|
|
73
|
+
| `ingest({ uri, mimeType? })` | Ingest from a URL or S3 URI, MIME type auto-detected if omitted |
|
|
71
74
|
| `rag(options)` | Full RAG pipeline — retrieves chunks and returns an LLM answer |
|
|
72
75
|
| `findSimilar({ query, topK? })` | Semantic search without LLM, returns ranked chunks |
|
|
73
76
|
| `jobs.list()` | List ingestion jobs for this collection |
|
|
@@ -111,7 +114,7 @@ const prompts = await client.prompts.list();
|
|
|
111
114
|
All methods throw `RagPackError` on non-2xx responses:
|
|
112
115
|
|
|
113
116
|
```ts
|
|
114
|
-
import { RagPack, RagPackError } from "ragpack";
|
|
117
|
+
import { RagPack, RagPackError } from "ragpack-js";
|
|
115
118
|
|
|
116
119
|
try {
|
|
117
120
|
await collection.findSimilar({ query: "..." });
|
|
@@ -126,3 +129,7 @@ try {
|
|
|
126
129
|
|
|
127
130
|
- Node.js 18+
|
|
128
131
|
- A running RagPack backend ([setup guide](https://github.com/eozsahin1993/ragpack))
|
|
132
|
+
|
|
133
|
+
## License
|
|
134
|
+
|
|
135
|
+
MIT
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ragpack-js",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "TypeScript client for the Ragpack self-hosted RAG engine",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"node": ">=18"
|
|
33
33
|
},
|
|
34
34
|
"type": "module",
|
|
35
|
-
"license": "
|
|
35
|
+
"license": "Apache-2.0",
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
38
38
|
"url": "https://github.com/eozsahin1993/ragpack.git",
|