You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+22-10
Original file line number
Diff line number
Diff line change
@@ -22,27 +22,36 @@
22
22
## 🔎 The Project
23
23
RepoQuery is an early-beta project, that uses recursive [OpenAI function calling](https://platform.openai.com/docs/api-reference/chat/create#chat/create-functions) paired with semantic search using [multi-qa-MiniLM-L6-cos-v1](https://huggingface.co/rawsh/multi-qa-MiniLM-distill-onnx-L6-cos-v1/blob/main/onnx/model_quantized.onnx) to index and answer user queries about public GitHub repositories.
24
24
25
-
## 📬 Service Endpoints
25
+
## 📬 Service Endpoints
26
26
27
27
> **Note:**
28
-
Since the service returns responses as SSEs, a REST client like Postman is recommended. Download it [here](https://www.postman.com/downloads/). The Postman web client doesn't support requests to `localhost`.
28
+
> Since the service returns responses as SSEs, a REST client like Postman is recommended. Download it [here](https://www.postman.com/downloads/). The Postman web client doesn't support requests to `localhost`.
29
29
30
30
[](https://app.getpostman.com/run-collection/18073744-276b793e-f5ec-418f-ba0a-9dff94af543e?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D18073744-276b793e-f5ec-418f-ba0a-9dff94af543e%26entityType%3Dcollection%26workspaceId%3D8d8a1363-ad0a-45ad-b036-ef6a37e44ef8)
31
31
32
-
### 1. `POST /embed`
33
-
To generate and store embeddings for a GitHub repository.
|`/`| GET | Redirects to the configured [redirect URL](https://github.com/open-sauced/repo-query/blob/afc4d19068e7c84a2566dae9598f1500f1191705/src/constants.rs#L12). |
35
+
|`/embed`| POST | Generate and store embeddings for a GitHub repository. |
36
+
|`/query`| POST | Perform a query on the API with a specific question related to a repository. |
37
+
|`/collection`| GET | Check if a repository has been indexed. |
38
+
39
+
### 1. `/embed`
34
40
35
41
#### Parameters
42
+
36
43
The parameters are passed as a JSON object in the request body:
37
44
38
45
-`owner` (string, required): The owner of the repository.
39
46
-`name` (string, required): The name of the repository.
40
47
-`branch` (string, required): The name of the branch.
41
48
42
49
#### Response
43
-
The request is processed by the server and responses are sent as [Server-sent events(SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events). The event stream will contain the following events with optional data. https://github.com/open-sauced/repo-query/blob/f2f415a4fa9c02d4530624fd7bac2105eea1a77c/src/routes/events.rs#L14-L20
50
+
51
+
The request is processed by the server and responses are sent as [Server-sent events(SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events). The event stream will contain [events](https://github.com/open-sauced/repo-query/blob/afc4d19068e7c84a2566dae9598f1500f1191705/src/routes/events.rs#L14-L21) with optional data.
To perform a query on the API with a specific question related to a repository.
65
+
### 2. `/query`
58
66
59
67
#### Parameters
68
+
60
69
The parameters are passed as a JSON object in the request body:
61
70
62
71
-`query` (string, required): The question or query you want to ask.
@@ -66,10 +75,11 @@ The parameters are passed as a JSON object in the request body:
66
75
-`branch` (string, required): The name of the branch.
67
76
68
77
#### Response
69
-
The request is processed by the server and responses are sent as [Server-sent events(SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events). The event stream will contain the following events with optional data. https://github.com/open-sauced/repo-query/blob/f2f415a4fa9c02d4530624fd7bac2105eea1a77c/src/routes/events.rs#L22-L29
70
78
79
+
The request is processed by the server and responses are sent as [Server-sent events(SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events). The event stream will contain [events](https://github.com/open-sauced/repo-query/blob/afc4d19068e7c84a2566dae9598f1500f1191705/src/routes/events.rs#L23-L32) with optional data.
0 commit comments