JacobLinCool / JacobLinCool/kvec
ChatGPT Integration
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Since KVec has the access to OpenAI API, we can add integration for ChatGPT that uses the document in the database.
Proposing `/api/ask` API endpoint.
with `POST` payload:
```js
{
"question": "required, the question to ask",
"restrict": true, // optional, don't reply if there is no related document
"option": {}, // options pass to OpenAI API
}
```
and respond with:
```json
{
"answer": "the answer of the question. use syntax like [1]something related to doc 1[/1].",
"refs": [
"reference doc 1",
"reference doc 2",
"reference doc 3"
]
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
The proposed entry point is `/api/ask`; first read KVec’s existing API routing, document retrieval flow, and OpenAI API usage. Done means the endpoint accepts the documented payload, returns an answer with document references, and honors the restriction and option fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, api, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100