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

fi.evolver.ai.spring.assistant.AssistantResponse Maven / Gradle / Ivy

package fi.evolver.ai.spring.assistant;

import java.util.Optional;

import fi.evolver.ai.spring.AssistantContentSubscriber;
import fi.evolver.ai.spring.chat.prompt.Message;

public interface AssistantResponse {

	/**
	 * Returns the response message, if any. May block until the full response has been fully received.
	 *
	 * @return The result message, if any.
	 */
	public Optional getMessage();


	/**
	 * Add a subscriber for streaming content updates.
	 *
	 * @param subscriber The subscriber to add.
	 */
	public void addSubscriber(AssistantContentSubscriber subscriber);


	/**
	 * The result state of the response. How to interpret the value is API specific.
	 *
	 * @return The result state of the response.
	 */
	public String getResultState();


	/**
	 * Returns whether the response completed without issues.
	 *
	 * @return Was the response completed successfully?
	 */
	public boolean isSuccess();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy