Skip to content

Generate and Understand the Given Code Context. #149

Closed Answered by dluc
1openwindow asked this question in Q&A
Discussion options

You must be logged in to vote

hi @1openwindow yes that's possible, you can start from the sample code and make a few changes. The sample app currently indexes only markdown files. The first change would be to index also source code files, but here it gets tricky. Unless you're indexing only small files, when dealing with a large code you'll have to split it in "chunks", to fit into the maximum size accepted by the embeddings generator. Chunking code can be hard, depending on the language. But if you get past that, the rest should work fine, you'll use semantic memory and semantic search to retrieve relevant code snippets, fit them into a prompt, and use a semantic function (aka an LLM prompt) to generate the code you …

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by 1openwindow
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants