Skip to content

Adding files / folders to a context/query #69

Description

@shafr

Hey there,

Is it possible to use not image, but a file (like a code file) or a code project dir which you would be running prompt against ?
Idea would be to summarize contents of repository for example

Thank you.

Activity

  1. ncoghlan commented on Apr 8, 2025

    @ncoghlan
    Contributor

    The SDK APIs for uploading individual files will be:

    • prepare_file instead of prepare_image
    • files=[...] parameter instead of images=[...]

    There isn't an API design for adding URL references or entire folders at this stage.

    Edit: while the file preparation APIs in the SDK have been implemented, they currently only support the same file types as the image-specific APIs. My original comment incorrectly indicated that other file types were already expected to work.

  2. added
    enhancementNew feature or request
    documentationImprovements or additions to documentation
    and removed
    documentationImprovements or additions to documentation
    on Apr 10, 2025
  3. YouJianxiong commented on Dec 25, 2025

    @YouJianxiong

    Hello,

    I used lmstudio packages for python, I faced a question, that I want to send a .txt or .docx file to LM Studio local server. But system shows no such function. Is the function of upload these files was not implemented? But LM Studio have file upload function for .txt or .docx.

  4. realfogman commented on Mar 13, 2026

    @realfogman

    Hello,

    is there any progress of attaching a file (txt, pdf, and others)?
    The LM Studio shows this ability, but the lmstudio python-api does not?

    Looked into the source and saw "# Not yet implemented (server API only supports the same file types as prepare_image)".

    Thank you.

  5. daybyter commented on Mar 24, 2026

    @daybyter

    I don't use python but csharp to connect to lm-studio at the moment (because I have to integrate with visual studio). But my problem is related to this issue. So I use lm-studio to help with coding and want to add files to my prompts. Like 'here is class x . Please add method y to this class' . Does not work for me yet. When I add input_file to my prompts, the model cannot process the json request. Pure text works, though. It seems this version is not implemented yet?

    https://community.openai.com/t/responses-api-now-has-expanded-file-input-types-docx-pptx-csv-xlsx/1375013/4

    I have found an example, where somebody added a citation with file content to the prompt? Is there a better way? Maybe the model has to pull the file via MCP, or so?

    Thanks in advance for any response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions