Has anyone uploaded their codebase as files for Assistant?

So I am building a web framework for python designed be composed iteratively via chat.

This framework is designed to consist of many assistants in charge of their own “iterative app”. I have had pretty good success so far, but now I want the style of the code to change with the app over time so I want to upload the entire codebase of an “iterative” app (super small app), especially as I start moving in to frontend React Code generation.

I am thinking about just making the AI perform a sequence of actions to just get the context using function calling, but if it helps upload the code base, I am game.

anyone have experience with that?

I am sitting here researching the exact same thing. It is insane how powerful the assistant gets if you just give it the ability to read files and search your codebase, but if it would have the context of your entire codebase it should be much better at inferring your intention and probably answer much more quickly as it does not depend on interpreting the raw text from a file read.

So it seems you can use the assistant files API to upload the codebase. There is a limit on 100GB per organisation which makes it difficult to create any kind of service out of this though. Also code has this complexity of branching. So if you give the assistant the context of your default branch code, it would be worse handling other branches etc.

It would be amazing if it was possible to create an assistant through the API with embeddings of the codebase. That way you could create a new assistant on a branch, keep that assistant in sync with embeddings and then just delete the assistant when you delete the branch.

But yeah… I am pretty new to this, so I might be thinking about it wrong :slight_smile:

So I learned a bit more today. What you can do is rather use the embedding API. So you use the embedding API to generate embeddings from all the files in the repository and store that in your own database. When you prompt the assistant you pass the prompt through the embedding first to give more context to the assistant prompt. It is quite complicated and way less intuitive than just uploading files to the assistant, but it is more efficient and secure