-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Adithya Krishna <[email protected]>
- Loading branch information
1 parent
eda2c5f
commit fcd2a90
Showing
109 changed files
with
5,483 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Mintlify Starter Kit | ||
|
||
Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including | ||
|
||
- Guide pages | ||
- Navigation | ||
- Customizations | ||
- API Reference pages | ||
- Use of popular components | ||
|
||
### Development | ||
|
||
Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command | ||
|
||
``` | ||
npm i -g mintlify | ||
``` | ||
|
||
Run the following command at the root of your documentation (where mint.json is) | ||
|
||
``` | ||
mintlify dev | ||
``` | ||
|
||
### Publishing Changes | ||
|
||
Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard. | ||
|
||
#### Troubleshooting | ||
|
||
- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies. | ||
- Page loads as a 404 - Make sure you are running in a folder with `mint.json` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import "../styles.css"; | ||
import { GoogleAnalytics } from "nextjs-google-analytics"; | ||
|
||
export default function Nextra({ Component, pageProps }) { | ||
return ( | ||
<> | ||
<GoogleAnalytics trackPageViews /> | ||
<Component {...pageProps} /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react' | ||
import Document, { Html, Head, Main, NextScript } from 'next/document' | ||
import { SkipNavLink } from "nextra-theme-docs"; | ||
|
||
class MyDocument extends Document { | ||
render() { | ||
return ( | ||
<Html lang="en"> | ||
<Head /> | ||
<body> | ||
<SkipNavLink styled /> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
); | ||
} | ||
} | ||
|
||
export default MyDocument |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"index": { | ||
"title": "Introduction", | ||
"type": "page", | ||
"display": "hidden", | ||
"theme": { | ||
"typesetting": "article", | ||
"sidebar": false, | ||
"toc": false | ||
} | ||
}, | ||
"docs": { | ||
"title": "Getting Started", | ||
"type": "page" | ||
}, | ||
"cli_ui": { | ||
"title": "CLI & UI", | ||
"type": "page" | ||
}, | ||
"apis": { | ||
"title": "APIs", | ||
"type": "page" | ||
}, | ||
"extractors": { | ||
"title": "Extractors", | ||
"type": "page" | ||
}, | ||
"usecases": { | ||
"title": "Use Cases", | ||
"type": "page" | ||
}, | ||
"integrations": { | ||
"title": "LLM Frameworks", | ||
"type": "page" | ||
}, | ||
"operations": { | ||
"title": "Deployment & Operations", | ||
"type": "page" | ||
}, | ||
"examples": { | ||
"title": "Examples", | ||
"type": "page" | ||
}, | ||
"contact": { | ||
"title": "Get in touch ↗", | ||
"type": "page", | ||
"href": "https://dub.sh/diptanu-calendly", | ||
"newWindow": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: 'Create Plant' | ||
openapi: 'POST /plants' | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: 'Delete Plant' | ||
openapi: 'DELETE /plants/{id}' | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: 'Get Plants' | ||
openapi: 'GET /plants' | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: 'Introduction' | ||
description: 'Example section for showcasing API endpoints' | ||
--- | ||
|
||
<Note> | ||
If you're not looking to build API reference documentation, you can delete | ||
this section by removing the api-reference folder. | ||
</Note> | ||
|
||
## Welcome | ||
|
||
There are two ways to build API documentation: [OpenAPI](https://mintlify.com/docs/api-playground/openapi/setup) and [MDX components](https://mintlify.com/docs/api-playground/mdx/configuration). For the starter kit, we are using the following OpenAPI specification. | ||
|
||
<Card | ||
title="Plant Store Endpoints" | ||
icon="leaf" | ||
href="https://github.com/mintlify/starter/blob/main/api-reference/openapi.json" | ||
> | ||
View the OpenAPI specification file | ||
</Card> | ||
|
||
## Authentication | ||
|
||
All API endpoints are authenticated using Bearer tokens and picked up from the specification file. | ||
|
||
```json | ||
"security": [ | ||
{ | ||
"bearerAuth": [] | ||
} | ||
] | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"--": { | ||
"type": "separator", | ||
"title": "APIs" | ||
}, | ||
"install_clients": "Install", | ||
"extraction_graphs": "Extraction Graphs", | ||
"content_ingestion": "Content Ingestion", | ||
"retrieval": "Retrieval" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
# Content Ingestion | ||
|
||
We provide APIs to upload raw text and any files from which you might want to extract information and build indexes. | ||
|
||
Import the language specific clients | ||
=== "Python" | ||
|
||
```python | ||
from indexify import IndexifyClient | ||
extraction_graph_spec = """ | ||
name: 'myextractiongraph' | ||
extraction_policies: | ||
- extractor: 'tensorlake/minilm-l6' | ||
name: 'minilml6' | ||
""" | ||
extraction_graph = ExtractionGraph.from_yaml(extraction_graph_spec) | ||
client.create_extraction_graph(extraction_graph) | ||
``` | ||
=== "TypeScript" | ||
|
||
```typescript | ||
import { IndexifyClient, ExtractionGraph } from "getindexify"; | ||
|
||
const client = await IndexifyClient.createClient(); | ||
const graph = ExtractionGraph.fromYaml(` | ||
name: 'myextractiongraph' | ||
extraction_policies: | ||
- extractor: 'minilm-l6' | ||
name: 'minilml6' | ||
`); | ||
await client.createExtractionGraph(graph); | ||
``` | ||
|
||
## Upload File | ||
|
||
=== "Python" | ||
|
||
```python | ||
content = client.upload_file(extraction_graphs="myextractiongraph",path="/path/to/file") | ||
``` | ||
|
||
=== "TypeScript" | ||
|
||
```typescript | ||
await client.uploadFile("myextractiongraph", `files/test.txt`); | ||
``` | ||
|
||
## Upload Raw Text | ||
=== "Python" | ||
|
||
```python | ||
client.add_documents("myextractiongraph", [ | ||
"Indexify is amazing!", | ||
"Indexify is a retrieval service for LLM agents!", | ||
"Kevin Durant is the best basketball player in the world." | ||
]) | ||
``` | ||
=== "TypeScript" | ||
|
||
```typescript | ||
await client.addDocuments("myextractiongraph", [ | ||
"Indexify is amazing!", | ||
"Indexify is a retrieval service for LLM agents!", | ||
"Kevin Durant is the best basketball player in the world." | ||
]); | ||
``` | ||
|
||
## Namespaces | ||
|
||
Namespaces are used to isolate content uploaded by applications or from extractors that chunk or transform content. | ||
|
||
!!! note | ||
|
||
A default namespace, named `default` is created when Indexify is started. | ||
|
||
## Create or Update a Namespace | ||
A namespace can be created by specifying a unique name, and any additional labels or extraction policies. | ||
|
||
=== "python" | ||
|
||
```python | ||
from indexify import IndexifyClient, ExtractionPolicy | ||
|
||
IndexifyClient.create_namespace( | ||
name="research", | ||
extraction_graphs=[], | ||
labels={"sensitive": "true"}, | ||
) | ||
``` | ||
|
||
=== "TypeScript" | ||
|
||
```typescript | ||
import { IndexifyClient, IExtractionPolicy } from "getindexify"; | ||
|
||
IndexifyClient.createNamespace({ | ||
name:"research", | ||
extractionGraphs:[], | ||
labels:{"sensitive":"true"}}); | ||
``` | ||
|
||
=== "curl" | ||
|
||
```shell | ||
curl -X POST http://localhost:8900/namespaces \ | ||
-H 'Content-Type: application/json' \ | ||
-d ' | ||
{ | ||
"name": "research", | ||
"extraction_graphs": [], | ||
"labels": {"sensitive": "true"} | ||
} | ||
' | ||
``` | ||
|
||
## List Namespaces | ||
=== "python" | ||
|
||
```python | ||
namespaces = IndexifyClient.namespaces() | ||
``` | ||
|
||
=== "TypeScript" | ||
|
||
```typescript | ||
const namespaces = await IndexifyClient.namespaces(); | ||
``` | ||
|
||
=== "curl" | ||
|
||
```shell | ||
curl -X GET http://localhost:8900/namespaces | ||
``` | ||
??? abstract "output" | ||
|
||
```json | ||
{ | ||
"namespaces" : [ | ||
{ | ||
"extraction_graphs" : [ | ||
{ | ||
"extraction_policies" : [ | ||
{ | ||
"content_source" : "", | ||
"extractor" : "tensorlake/minilm-l6", | ||
"filters_eq" : {}, | ||
"graph_name" : "sportsknowledgebase", | ||
"id" : "f4ac72a165927ada", | ||
"input_params" : null, | ||
"name" : "minilml6" | ||
} | ||
], | ||
"id" : "default", | ||
"name" : "sportsknowledgebase", | ||
"namespace" : "default" | ||
} | ||
], | ||
"name" : "default" | ||
}, | ||
] | ||
} | ||
``` |
Oops, something went wrong.