mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
The lock sat at 574d1f1d while the product moved on. The team surface stopped at rooms — no messages path, no way to open one — so anything built on this client had to reach past it with its own HTTP calls, which is the duplication a generated client exists to prevent.
141 lines
4.3 KiB
C++
141 lines
4.3 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.
|
|
*/
|
|
|
|
/*
|
|
* Hit.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_Hit_H_
|
|
#define HANZO_MODEL_Hit_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class Hit
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
Hit();
|
|
virtual ~Hit();
|
|
|
|
/////////////////////////////////////////////
|
|
/// 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;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// Hit members
|
|
|
|
|
|
/// <summary>
|
|
/// DocType is which kind of knowledge matched, by address: kb.page (a wiki page), kb.memory (a unit of agent memory) or kb.source (a document a connector ingested). Those three are the whole indexed set, and searchIn.DocTypes filters on them.
|
|
/// </summary>
|
|
utility::string_t getDoctype() const;
|
|
bool doctypeIsSet() const;
|
|
void unsetDoctype();
|
|
void setDoctype(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Name is the document's name in the framework store — the id to read or open it with. Unique per (org, doctype), so it identifies the document with DocType and not alone.
|
|
/// </summary>
|
|
utility::string_t getName() const;
|
|
bool nameIsSet() const;
|
|
void unsetName();
|
|
void setName(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Project is the project scope the document was saved under. Absent for a document saved with none, which is also why a project-scoped query cannot reach it.
|
|
/// </summary>
|
|
utility::string_t getProject() const;
|
|
bool projectIsSet() const;
|
|
void unsetProject();
|
|
void setProject(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Provider is the connector that ingested the document — github, slack, google or notion. Absent for a page or memory written in the product, which came from no connector.
|
|
/// </summary>
|
|
utility::string_t getProvider() const;
|
|
bool providerIsSet() const;
|
|
void unsetProvider();
|
|
void setProvider(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Score is the cosine similarity between the query's embedding and the document's, from -1 to 1, higher being closer — the collection is created with Cosine distance. Hits arrive ordered by it, descending. There is no absolute cutoff: what counts as a good score moves with the query and the embedding model, so compare scores within one response and not across queries.
|
|
/// </summary>
|
|
double getScore() const;
|
|
bool scoreIsSet() const;
|
|
void unsetScore();
|
|
void setScore(double value);
|
|
|
|
/// <summary>
|
|
/// Title is the document's title as it was indexed. Empty for a document saved without one; it is a label to show, never the id (that is Name).
|
|
/// </summary>
|
|
utility::string_t getTitle() const;
|
|
bool titleIsSet() const;
|
|
void unsetTitle();
|
|
void setTitle(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// URL is the document's link back into the app it was ingested from. Absent when the indexed payload carries none, which is the normal case for pages and memories.
|
|
/// </summary>
|
|
utility::string_t getUrl() const;
|
|
bool urlIsSet() const;
|
|
void unsetUrl();
|
|
void setUrl(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
utility::string_t m_Doctype;
|
|
bool m_DoctypeIsSet;
|
|
|
|
utility::string_t m_Name;
|
|
bool m_NameIsSet;
|
|
|
|
utility::string_t m_Project;
|
|
bool m_ProjectIsSet;
|
|
|
|
utility::string_t m_Provider;
|
|
bool m_ProviderIsSet;
|
|
|
|
double m_Score;
|
|
bool m_ScoreIsSet;
|
|
|
|
utility::string_t m_Title;
|
|
bool m_TitleIsSet;
|
|
|
|
utility::string_t m_Url;
|
|
bool m_UrlIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_Hit_H_ */
|