Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Latest commit

 

History

History
95 lines (66 loc) · 1.55 KB

DEMO.md

File metadata and controls

95 lines (66 loc) · 1.55 KB

Knowledge

Standalone Knowledge Tool to be used with GPTScript and GPTStudio.

Background

  • Embedded SQLite as File Index
  • Embedded VectorDB as Embeddings Storage

Build

Requires Go 1.22+

make build

Run

The knowledge tool can run in two modes: server and client, where client can be standalone or referring to a remote server.

Client - Standalone

Default Dataset

knowledge list-datasets
knowledge get-dataset default
knowledge ingest README.md
knowledge get-dataset default
knowledge retrieve "Which filetypes are supported?"

Custom Dataset

knowledge create-dataset foobar
knowledge ingest -d foobar README.md
knowledge retrieve -d foobar "Which filetypes are supported?"
knowledge delete-dataset foobar

Server & Client - Server Mode

knowledge server
export KNOW_SERVER_URL=http://localhost:8000/v1
knowledge create-dataset foobar
knowledge ingest -d foobar README.md
knowledge retrieve -d foobar "Which filetypes are supported?"
knowledge delete-dataset foobar

Supported File Types

  • .pdf
  • .html
  • .md
  • .txt
  • .docx
  • .odt
  • .rtf
  • .csv
  • .ipynb
  • .json

OpenAPI / Swagger

The API is documented using OpenAPI 2.0 (Swagger), automatically generated using swaggo/swag (make openapi).

GPTScript Examples

Note: The examples in the examples/ directory expect the knowledge binary to be in your $PATH.

Run

gptscript examples/client.gpt