Uploading a folder with its different subfolders

Hello,
I would like to use a assistant from the API to help me in compiling a small github repo which the indications are not clear, but when I want to upload files to the assistant I can only upload files and not entire folders. how can I do to upload this type of structure of files?
thanks

Hey there and welcome to the community!

Let’s go over some things so we can make sure you’re on the same page about the limitations of what you’re asking for.

To start, you cannot upload more than 20 files in a given assistant, so that may or may not play nicely with your github repo. Second, uploading a whole folder of info would be like stuffing the entire context in a single context window each time you have a question. That’s generally a no-no unless you already know how to manage large context lengths efficiently. Uploading it per file embeds a chunk of that data, so that way, instead of needing to see the whole repo at once, you can just look at one file for, say, knowing how to call a function in it.

What you would need to do is upload the import files individually for this. You cannot dump the contents of a folder here.

I’d also inform you that tools like Github Copilot and Cursor are specifically built and designed for this purpose out-of-the-box. I would consider looking at these tools if you plan to do this often.

Cursor in particular allows you to use your own API key instead of their tiered subscription, so in a way it already handles this for you without the actual hassle of building it from scratch.

3 Likes

Thanks a lot,
i will have a look at cursor, and copilot then; adding AI assistants like this is new to me so, I am a little bit lost (credits for chatGPT he brought me up to successfully compiling up to 46% of the make command without errors lol…) thanks again!

3 Likes

Of course! Happy to help!

One final note: ChatGPT and OpenAI’s API are two different services. ChatGPT doesn’t have credits; the API does. It just has the plus/team/etc subscriptions.

(this helps people from getting confused)

2 Likes