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

com.microsoft.azure.functions.openai.annotation.embeddings.EmbeddingsContext Maven / Gradle / Ivy

Go to download

This package contains all Java interfaces and annotations to interact with Microsoft Azure functions java runtime.

The newest version!
/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 */

package com.microsoft.azure.functions.openai.annotation.embeddings;

import com.azure.ai.openai.models.Embeddings;
import com.azure.ai.openai.models.EmbeddingsOptions;

public class EmbeddingsContext {

    private EmbeddingsOptions request;
    private Embeddings response;
    private int count = 0;

    public EmbeddingsOptions getRequest() {
        return request;
    }

    public void setRequest(EmbeddingsOptions request) {
        this.request = request;
    }

    public Embeddings getResponse() {
        return response;
    }

    public void setResponse(Embeddings response) {
        this.response = response;
    }

    /**
     * Gets the number of embeddings that were returned in the response.
     *
     * @return The number of embeddings that were returned in the response.
     */
    public int getCount() {
        return this.response != null && this.response.getData() != null
                ? this.count : 0;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy