Code Monkey home page Code Monkey logo

openai-api's People

Contributors

craigmayhew avatar razzwan avatar szabgab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

openai-api's Issues

Support for Vision

Thanks for the project. It's delightfully simple and a pleasure to use. Currently, Messages take a role and a string for the content. When it comes to vision though I believe we need to pass more than a string in.

Is there any plans to support this or if its possible already?

WASM Support

can you add support for wasm (wasm32-unknown-unknown)? thanks

Add support for new embeddings options/parameters

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

There is now an option for controlling the encoding format, and for the new v3 models, the dimensions of the vector. But the EmbeddingsBody doesn't have it

#[derive(Debug, Serialize, Deserialize)]
pub struct EmbeddingsBody {
	/// ID of the model to use. You can use the List models API to see all of your available models,
	/// or see our Model overview for descriptions of them.
	pub model: String,
	/// Input text to get embeddings for, encoded as a string or array of tokens. To get embeddings for multiple inputs in a single request,
	/// pass an array of strings or array of token arrays. Each input must not exceed 8192 tokens in length.
	pub input: Vec<String>,
	/// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
	#[serde(skip_serializing_if = "Option::is_none")]
	pub user: Option<String>,
}

logit_bias is of type Option<HashMap<String, String>> in ChatBody

When a map of type HashMap<String, String> is passed for logit_bias, the following error results:

Error: API error: {"error":{"code":null,"message":"All values in 'logit_bias' must be reals, but found a <class 'str'>","param":"logit_bias","type":"invalid_request_error"}}. Trying again...

And obviously it won't compile if I try to pass any other type.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.