simonw / simonw/llm

Access the file upload features of openAI API

Open
#341 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12.5k
Forks
998
Avg merge
3d 13h
Merged PRs (30d)
10

Description

I'm not sure this is in scope for this library, but do you plan to make it possible to upload files to the api as part of a chat completion call?

see https://platform.openai.com/docs/api-reference/files/create

Would be cool if you could upload images and pdfs for use in chat call using llm rather than swapping back and forth to the openai package. I can imagine this will be a feature of many APIs and local models in the future, so perhaps worth wrapping the concept of submitting a file as input?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the OpenAI Files API documentation linked in the issue and the library's existing chat-completion entry points. Determine whether file uploads belong in this library and how images and PDFs could be submitted as chat inputs; done means an agreed scope and a defined interface for supported file inputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.