mirror of
https://github.com/katanemo/plano.git
synced 2026-04-26 01:06:25 +02:00
30 lines
1.4 KiB
Rust
30 lines
1.4 KiB
Rust
|
|
/*
|
||
|
|
* OMF Embeddings
|
||
|
|
*
|
||
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||
|
|
*
|
||
|
|
* The version of the OpenAPI document: 1.0.0
|
||
|
|
*
|
||
|
|
* Generated by: https://openapi-generator.tech
|
||
|
|
*/
|
||
|
|
|
||
|
|
use crate::embeddings;
|
||
|
|
use serde::{Deserialize, Serialize};
|
||
|
|
|
||
|
|
/// CreateEmbeddingRequestInput : Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. for counting tokens.
|
||
|
|
/// Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. for counting tokens.
|
||
|
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||
|
|
#[serde(untagged)]
|
||
|
|
pub enum CreateEmbeddingRequestInput {
|
||
|
|
/// The string that will be turned into an embedding.
|
||
|
|
String(String),
|
||
|
|
/// The array of integers that will be turned into an embedding.
|
||
|
|
Array(Vec<i32>),
|
||
|
|
}
|
||
|
|
|
||
|
|
impl Default for CreateEmbeddingRequestInput {
|
||
|
|
fn default() -> Self {
|
||
|
|
Self::String(Default::default())
|
||
|
|
}
|
||
|
|
}
|