mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
The projection these were generated from was a month old and predated the compute migration, so every one of them described /v1/visor — which the API serves at zero paths now. That is why a hand-written console client and a generated one had drifted the same way at the same time. No /v1/visor path survives here. The word still appears as a source-plane value and inside gvisor and supervisor, which are not this rename.
218 lines
7.7 KiB
C++
218 lines
7.7 KiB
C++
/**
|
|
* Hanzo Cloud API
|
|
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
*
|
|
* The version of the OpenAPI document: v1
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI-Generator 7.14.0.
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
/*
|
|
* AgentRunView.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_AgentRunView_H_
|
|
#define HANZO_MODEL_AgentRunView_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class AgentRunView
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
AgentRunView();
|
|
virtual ~AgentRunView();
|
|
|
|
/////////////////////////////////////////////
|
|
/// ModelBase overrides
|
|
|
|
void validate() override;
|
|
|
|
web::json::value toJson() const override;
|
|
bool fromJson(const web::json::value& json) override;
|
|
|
|
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
|
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// AgentRunView members
|
|
|
|
|
|
/// <summary>
|
|
/// Actor is the \"org/sub\" identity the run was executed and billed AS. Empty means there was no PERSON — a schedule or a service token — which is a different fact from \"we do not know\", and the difference is what an audit asks about.
|
|
/// </summary>
|
|
utility::string_t getActor() const;
|
|
bool actorIsSet() const;
|
|
void unsetActor();
|
|
void setActor(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// What an operator needs to answer \"what ran, for whom, and what did it do\" — and, through traceId, to leave this record for the waterfall of the very same run rather than a search that hopefully lands near it. Agent is on the row because the org-wide feed lists runs across agents, and a run that cannot name its agent is an orphan in exactly the view built to make sense of many of them. Every field is omitempty: a run recorded before these columns existed reports absence rather than a zero it never measured.
|
|
/// </summary>
|
|
utility::string_t getAgent() const;
|
|
bool agentIsSet() const;
|
|
void unsetAgent();
|
|
void setAgent(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// CompletionTokens is the same measurement for what the model produced, on the same final completion. It is a count of TOKENS, not of turns and not of money.
|
|
/// </summary>
|
|
int64_t getCompletionTokens() const;
|
|
bool completionTokensIsSet() const;
|
|
void unsetCompletionTokens();
|
|
void setCompletionTokens(int64_t value);
|
|
|
|
/// <summary>
|
|
/// CreatedAt is when the run finished, RFC 3339 in UTC to the second — the duration above already says how long it had been going.
|
|
/// </summary>
|
|
utility::string_t getCreatedAt() const;
|
|
bool createdAtIsSet() const;
|
|
void unsetCreatedAt();
|
|
void setCreatedAt(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// DurationMs is wall-clock milliseconds around the completion, including a failover's retries. It is time SPENT, not time billed.
|
|
/// </summary>
|
|
int64_t getDurationMs() const;
|
|
bool durationMsIsSet() const;
|
|
void unsetDurationMs();
|
|
void setDurationMs(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Error is why an \"ok\"-less run failed, as the failing call reported it. Empty on every successful run.
|
|
/// </summary>
|
|
utility::string_t getError() const;
|
|
bool errorIsSet() const;
|
|
void unsetError();
|
|
void setError(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ID is the run's handle, minted as \"run_\" + 32 hex characters. It is the key the metering ledger records this run's per-round token spend under, so it is how a bill and a run are joined.
|
|
/// </summary>
|
|
utility::string_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Input is the text the run was given, verbatim.
|
|
/// </summary>
|
|
utility::string_t getInput() const;
|
|
bool inputIsSet() const;
|
|
void unsetInput();
|
|
void setInput(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Model is the model that actually SERVED this run, which is not always the one the agent is defined on — a failover records what answered. Normalized to our name on the way out; the stored row is left exactly as it happened, because a run is a record and rewriting it would be worse than the name it carries.
|
|
/// </summary>
|
|
utility::string_t getModel() const;
|
|
bool modelIsSet() const;
|
|
void unsetModel();
|
|
void setModel(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Output is what the model produced. Empty on an error run, and empty is also a legitimate answer from a run that succeeded with nothing to say — Status is what separates those.
|
|
/// </summary>
|
|
utility::string_t getOutput() const;
|
|
bool outputIsSet() const;
|
|
void unsetOutput();
|
|
void setOutput(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// PromptTokens is what the gateway reported for the run's FINAL completion, and only that one — a tool loop's earlier rounds are the metering ledger's account, joined by this run's id. Reading it as the run's total spend undercounts a loop.
|
|
/// </summary>
|
|
int64_t getPromptTokens() const;
|
|
bool promptTokensIsSet() const;
|
|
void unsetPromptTokens();
|
|
void setPromptTokens(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Status is the run's outcome, and there are exactly two: \"ok\" when the model answered, \"error\" when it did not. It is written when the run ends, so no row here is in flight.
|
|
/// </summary>
|
|
utility::string_t getStatus() const;
|
|
bool statusIsSet() const;
|
|
void unsetStatus();
|
|
void setStatus(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// ToolCalls is how many tool dispatches the run made — a count of ACTIONS, which is a different measurement from the token counts above and from the turns a build reports. Zero is a run that answered straight from the model.
|
|
/// </summary>
|
|
int64_t getToolCalls() const;
|
|
bool toolCallsIsSet() const;
|
|
void unsetToolCalls();
|
|
void setToolCalls(int64_t value);
|
|
|
|
/// <summary>
|
|
/// TraceID is the trace this run IS, so the record and its spans are one thing to move between: it opens the waterfall for THIS run rather than a search that lands near it. Empty when the process had no tracer, never a fabricated id.
|
|
/// </summary>
|
|
utility::string_t getTraceId() const;
|
|
bool traceIdIsSet() const;
|
|
void unsetTraceId();
|
|
void setTraceId(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
utility::string_t m_Actor;
|
|
bool m_ActorIsSet;
|
|
|
|
utility::string_t m_Agent;
|
|
bool m_AgentIsSet;
|
|
|
|
int64_t m_CompletionTokens;
|
|
bool m_CompletionTokensIsSet;
|
|
|
|
utility::string_t m_CreatedAt;
|
|
bool m_CreatedAtIsSet;
|
|
|
|
int64_t m_DurationMs;
|
|
bool m_DurationMsIsSet;
|
|
|
|
utility::string_t m_Error;
|
|
bool m_ErrorIsSet;
|
|
|
|
utility::string_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
utility::string_t m_Input;
|
|
bool m_InputIsSet;
|
|
|
|
utility::string_t m_Model;
|
|
bool m_ModelIsSet;
|
|
|
|
utility::string_t m_Output;
|
|
bool m_OutputIsSet;
|
|
|
|
int64_t m_PromptTokens;
|
|
bool m_PromptTokensIsSet;
|
|
|
|
utility::string_t m_Status;
|
|
bool m_StatusIsSet;
|
|
|
|
int64_t m_ToolCalls;
|
|
bool m_ToolCallsIsSet;
|
|
|
|
utility::string_t m_TraceId;
|
|
bool m_TraceIdIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_AgentRunView_H_ */
|