dotnet-openai 0.2.2

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global dotnet-openai --version 0.2.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local dotnet-openai --version 0.2.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-openai&version=0.2.2
                    
nuke :add-package dotnet-openai --version 0.2.2
                    

Usage

> oai --help
USAGE:
    oai [OPTIONS] <COMMAND>

EXAMPLES:
    oai file list --jq '.[].id'
    oai file list --jq ".[] | { id: .id, name: .filename, purpose: .purpose }"
    oai file list --jq ".[] | select(.sizeInBytes > 100000) | .id"
    oai vector create --name my-store --meta 'key1=value1' --meta 'key2=value'
    oai vector create --name with-files --file asdf123 --file qwer456

OPTIONS:
    -h, --help    Prints help information

COMMANDS:
    auth       
    file       
    vector     
> oai auth --help
USAGE:
    oai auth [OPTIONS] <COMMAND>

OPTIONS:
    -h, --help    Prints help information

COMMANDS:
    login <project>    Authenticate to OpenAI.                                  
                                                                                
                       Supports API key autentication using the Git Credential  
                       Manager for storage.                                     
                                                                                
                       Switch easily between keys by just specifying the project
                       name after initial login with `--with-token`.            
                                                                                
                       Alternatively, oai will use the authentication token     
                       found in environment variables with the name             
                       `OPENAI_API_KEY`.                                        
                       This method is most suitable for "headless" use such as  
                       in automation.                                           
                                                                                
                       For example, to use oai in GitHub Actions, add           
                       `OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}` to "env" 
    logout             Log out of api.openai.com                                
    status                                                                      
    token              Print the auth token oai is configured to use            
> oai auth login --help
DESCRIPTION:
Authenticate to OpenAI. 

Supports API key autentication using the Git Credential Manager for storage.

Switch easily between keys by just specifying the project name after initial 
login with `--with-token`.

Alternatively, oai will use the authentication token found in environment 
variables with the name `OPENAI_API_KEY`.
This method is most suitable for "headless" use such as in automation.

For example, to use oai in GitHub Actions, add `OPENAI_API_KEY: ${{ 
secrets.OPENAI_API_KEY }}` to "env".

USAGE:
    oai auth login <project> [OPTIONS]

ARGUMENTS:
    <project>    OpenAI project the API key belongs to

OPTIONS:
    -h, --help          Prints help information       
        --with-token    Read token from standard input
> oai auth logout --help
DESCRIPTION:
Log out of api.openai.com

USAGE:
    oai auth logout [OPTIONS]

OPTIONS:
    -h, --help    Prints help information
> oai auth status --help
USAGE:
    oai auth status [OPTIONS]

OPTIONS:
    -h, --help          Prints help information
        --show-token    Display the auth token 
> oai file --help
USAGE:
    oai file [OPTIONS] <COMMAND>

EXAMPLES:
    oai file list --jq '.[].id'
    oai file list --jq ".[] | { id: .id, name: .filename, purpose: .purpose }"
    oai file list --jq ".[] | select(.sizeInBytes > 100000) | .id"

OPTIONS:
    -h, --help    Prints help information

COMMANDS:
    upload <FILE>    Upload a local file, specifying its purpose
    delete <ID>      Delete a file by its ID                    
    list             List files                                 
    view <ID>        View a file by its ID                      
> oai vector --help
USAGE:
    oai vector [OPTIONS] <COMMAND>

EXAMPLES:
    oai vector create --name my-store --meta 'key1=value1' --meta 'key2=value'
    oai vector create --name with-files --file asdf123 --file qwer456

OPTIONS:
    -h, --help    Prints help information

COMMANDS:
    create         Creates a vector store       
    modify <ID>    Modify a vector store        
    delete <ID>    Delete a vector store by ID  
    list           List vector stores           
    view <ID>      View a store by its ID       
    file           Vector store files operations
> oai vector file --help
DESCRIPTION:
Vector store files operations

USAGE:
    oai vector file [OPTIONS] <COMMAND>

OPTIONS:
    -h, --help    Prints help information

COMMANDS:
    add <STORE_ID> <FILE_ID>       Add file to vector store               
    delete <STORE_ID> <FILE_ID>    Remove file from vector store          
    list <STORE_ID>                List files associated with vector store
    view <STORE_ID> <FILE_ID>      View file association to a vector store

Sponsors

Clarius Org MFB Technologies, Inc. Torutek DRIVE.NET, Inc. Keith Pickford Thomas Bolon Kori Francis Toni Wenzel Uno Platform Dan Siegel Reuben Swartz Jacob Foshee alternate text is missing from this package README image Eric Johnson Ix Technologies B.V. David JENNI Jonathan Charley Wu Jakob Tikjøb Andersen Tino Hager Ken Bonny Simon Cropp agileworks-eu sorahex Zheyu Shen Vezel ChilliCream 4OTC Vincent Limo Jordan S. Jones domischell Joseph Kingry

Sponsor this project  

Learn more about GitHub Sponsors

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.
Version Downloads Last Updated
0.9.8 105 5/24/2025
0.9.7 141 5/5/2025
0.9.6 137 5/5/2025
0.9.5 146 5/4/2025
0.9.4 99 5/2/2025
0.9.3 142 5/1/2025
0.9.2 149 4/30/2025
0.9.1 124 4/29/2025
0.9.0 171 4/29/2025
0.8.1 199 4/24/2025
0.7.1 153 4/18/2025
0.7.0 146 4/18/2025
0.6.0 186 4/18/2025
0.5.1 226 4/16/2025
0.5.0 216 4/16/2025
0.4.1 218 4/15/2025
0.4.0 130 4/11/2025
0.3.0 77 3/15/2025
0.2.2 79 3/15/2025
0.2.1 82 3/14/2025
0.1.0 130 3/14/2025