-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a GPT Agent based on OpenDAL source #3648
Comments
For example, GPT always trying to use API like |
Hi, @STRRL
I'm using GPTs.
Yes
The knowledge file is the archive of this repo. |
We can run Maybe it's better to generate as a pdf file for GPT to better understand, but we don't have such workflow yet. The online version of opendal docs could be found at https://docs.rs/opendal/0.41.0/opendal/ or https://opendal.apache.org/docs/rust/opendal/ |
Yeah I would take a try~ |
How about take a try at: https://chat.openai.com/g/g-9coOwgijL-opendal-guide-remastered I merged all the HTMLs into one large HTML with this script and use it as the knowledge. import os
from bs4 import BeautifulSoup
def merge_html_files(directory, output_file):
html_content = ''
for subdir, dirs, files in os.walk(directory):
for file in files:
if file.endswith('.html'):
with open(os.path.join(subdir, file), 'r', encoding='utf-8') as f:
soup = BeautifulSoup(f, 'html.parser')
for script in soup.find_all('script'):
if 'location.replace' in script.text:
script.decompose()
body_content = soup.body
if body_content:
html_content += str(body_content)
with open(output_file, 'w', encoding='utf-8') as f:
f.write('<html><body>' + html_content + '</body></html>')
merge_html_files('/Users/strrl/playground/GitHub/incubator-opendal/target/doc/opendal', 'merged.html') |
Wow, just wow! |
Maybe we should perform some pre-process over our input like removing old RFCs? |
I hafe no idea about the maybe we could append more restrictions in the system prompt like, only using API provided by the knowledge base? |
Not yet having done rag over code bases yet, gen docs as data source is the first way to go. ideally indexing real docs(rather than pure api docs) would really help we may also consider adding one page to explain on tree output of the code base, with proper title/desc and explanation per main folders as yet another data source. |
OpenDAL used to have |
They're 2 issues here:
|
I'm attempting to utilize the entire OpenDAL codebase for training GPTs, with the aim of instructing users on how to use OpenDAL. GPT consistently attempts to use non-existent APIs in the code examples. Are there any effective prompts I could utilize?
Current status
Prompt
Knowldege Files:
https://github.com/apache/incubator-opendal/archive/refs/tags/v0.42.0.zip
Agent Preview:
https://chat.openai.com/g/g-DwE59Zfe1-opendal-guide
The text was updated successfully, but these errors were encountered: