-
-
Notifications
You must be signed in to change notification settings - Fork 354
initial take on anthropic docs api #2632
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
base: main
Are you sure you want to change the base?
Conversation
|
Hey George. It's like you read my mind....I was giving this some serious thought earlier today. Normally, I'd try and add a feature like this to all http adapters but given the enormity of that as a task, I'd rather we get something like this into CodeCompanion. Let me know when you're happy with it and I can take a look later down the line. In the same way I restrict the image slash command by looking for |
|
great! I've updated to check for doc_upload capabilities rather than vision. Added some docs. I'm actually not sure what other adapters support pdf / docx and i'm sure there's possibly some differences in implementation. I'm pretty sure that opencode and copilot don't properly proxy these requests to models even with an anthropic model requested, though they appear to read pdfs just fine using their inbuilt tools. |
|
One reflection I had was "as a user, should I be expected to know the difference between |
|
I was thinking about that too. I’ll try and tidy that up. It also looks like acp can ingest embedded files similar to how it does for images so working on that. |
That's good to know. I have a feeling how I'm sharing files with ACP agents may not be correct. I can take a look at that too. |
I guess one issue is that /document allows attaching from remote URLs or using file_api if enabled. I'll def tidy that portion up so you can look. I do like the idea of a unified interface for sure, just not sure how to include URL and file api support to /file |
|
We could always take the logic that I put in the |
|
That’s what I did for document. I’m concerned that for folks used to /file just giving a picker it would now present and additional choice first. Maybe that’s not a big deal |
|
I'm happy to look at merging /file and /document. Couple of options before I do that
|
|
I guess finally there's the option of /image and /document being merged (possibly into /attachment) Lmk, and I can look at getting it done |
I have not yet added tests or README updates.
I had need of this myself.
Just curious on interest here - I had code companion do the bulk of the work with guidance. It looks pretty much in line with how images and files work.
Description
This adds a slash command (/document) to attach doc types like docx, pdf, rtf which allows anthropic users to pass files directly through the adapter.
Related Issue(s)
#2216
Checklist
make allto ensure docs are generated, tests pass and StyLua has formatted my code