All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lzhpo.chatgpt.entity.embeddings.EmbeddingRequest Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
/*
 * Copyright 2023 lzhpo
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.lzhpo.chatgpt.entity.embeddings;

import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author lzhpo
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class EmbeddingRequest {

    /**
     * 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. * Model endpoint compatibility */ @NotBlank private String model; /** * 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. */ @NotEmpty private List input; /** * A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. * Learn more. */ private String user; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy