Is there a way to easily use the following javadocs as the documents for /answers?
https://javadoc.io/doc/org.firstinspires.ftc/RobotCore/latest/index.html
Is there a way to easily use the following javadocs as the documents for /answers?
https://javadoc.io/doc/org.firstinspires.ftc/RobotCore/latest/index.html
It is doable but you will need to get creative and implement your own /code-answers
API by combining search and completion APIs.
The main challenges I see are -
/search
API returns minimum amount of context from the file you provided. You will need to have very meaningful segregations of the document dataset and add enough metadata so you can retrieve it separately for the completion.Hope this helps. I am also experimenting /answers
lately and about to build a /super-answers
endpoint myself
@simonl What I’ve been doing is using the /answers endpoint with cushman-codex and davinci codex as the search and completion engines.
One thing that has been helping me understand how /answers
works is to turn on the return_prompt
flag. You will find whether or not your javadoc is fetched properly by the search request. What I noticed during the experiment is that the search request actually only scans and retrieves the relevant line from the document as context. So if your document has a lot of line breaks, it is likely going to have issues. Considering the nature of source code, you will definitely want to look into how to build your own /code-answers
endpoint. I don’t see any test results on your end so that’s all I can give for suggestion.