Closed MrOrz closed 1 year ago
Design doc: https://g0v.hackmd.io/@cofacts/rd/%2F%40cofacts%2FrknFrmdk3
AIResponse
AIReply
CreateAIReply
status
LOADING
SUCCESS
FAIL
aiReplies
Article
delayForMs
src/util/
Coverage: 88.029% (+0.03%) from 88.003% when pulling f2f9aa94f8c70a6d9a9cb141e19032461932173b on ai-response into 7886f6df541b12bf73e6875e95d8cd37d7b820b9 on master.
Deploy steps
npm run schema -- airesponses
OPENAI_API_KEY
Design doc: https://g0v.hackmd.io/@cofacts/rd/%2F%40cofacts%2FrknFrmdk3
AIResponse
type has been extended to an interface, withAIReply
being one of the implementationCreateAIReply
mutation that returnsAIReply
AIResponse
with its type beingAIReply
, andstatus
beingLOADING
initially, turnsSUCCESS
(orFAIL
) after ChatGPT API returns.AIReply
,CreateAIReply
will start polling Elasticsearch until one of the following happens:AIReply
for the article turns "SUCCESS"aiReplies
field inArticle
delayForMs
to undersrc/util/
Article's
aiReplies