pulsatrix 1.1.0
Loading...
Searching...
No Matches
pulsatrix::orch::Provider Class Referenceabstract

A model behind an API. More...

#include <provider.hpp>

Public Member Functions

virtual ~Provider ()=default
 
virtual ChatResponse chat (const ChatRequest &request, const StreamCallbacks &stream={})=0
 Sends request and returns the model's answer, streaming it to stream as it arrives.
 
virtual std::string name () const =0
 For example anthropic (https://api.anthropic.com).
 

Detailed Description

A model behind an API.

Constructor & Destructor Documentation

◆ ~Provider()

virtual pulsatrix::orch::Provider::~Provider ( )
virtualdefault

Member Function Documentation

◆ chat()

virtual ChatResponse pulsatrix::orch::Provider::chat ( const ChatRequest &  request,
const StreamCallbacks &  stream = {} 
)
pure virtual

Sends request and returns the model's answer, streaming it to stream as it arrives.

Exceptions
ProviderErrorif the provider answered with an error or the retries ran out.
HttpErrorfor a request that can't be sent at all (a bad URL, no TLS).

◆ name()

virtual std::string pulsatrix::orch::Provider::name ( ) const
pure virtual

For example anthropic (https://api.anthropic.com).


The documentation for this class was generated from the following file: