File size: 1,146 Bytes
f913bc4
c56ab56
f913bc4
 
 
cd3709a
 
f913bc4
 
 
 
 
 
23687d1
240fe8a
 
b6dd5cc
240fe8a
 
 
 
23687d1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
title: Document Search
emoji: 🐠
colorFrom: green
colorTo: purple
sdk: streamlit
sdk_version: 1.25.0
app_file: app.py
pinned: false
license: mit
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

# Required Environment variables

- `INDEX_NAMES`: comma separated index names
- `QDRANT_URL`: Qdrant API endpoint
- `QDRANT_API_KEY`: Qdrant API Key
- `OPENAI_API_KEY`: OpenAI API Key

# import GitHub issues

## export from github
first, generate token on: https://github.com/settings/tokens

```
$ git clone https://github.com/kazamori/github-api-tools 
$ pip install -e ./github-api-tools 
$ export GITHUB_API_TOKEN="********"
$ gh-cli-issues --repository <org/repo>
$ ls <repo>-issues.json
```

## import from json

```
$ python store.py -l github_issue <index> ../<repo>-issues.json 
```

# import Wiki Pages

## export from somewhere

create `pages.json` like:
```json
{"id": <page_id>, "title": <page title>, "content": <page body>, "ctime": ..., "user": <name>, "url": "https:..."}
{"title": ...}
```

## import from json

```
$ python store.py -l wikipage <index> ../pages.json 
```