NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
schema_provider.h
1#pragma once
2#include <neograph/provider.h>
3#include <descriptor/descriptor.h>
4#include <core/request_controls.h>
5
6namespace neograph::llm {
7
10class NEOGRAPH_API SchemaProvider final : public Provider {
11public:
12 struct Defaults {
13 std::optional<sp::OpenRouterRouting> provider;
14 std::optional<bool> responses_store;
15 };
18 explicit SchemaProvider(sp::descriptor::ValidatedDescriptor descriptor,
19 sp::runtime::Options options = {}, Defaults defaults = {});
25 SchemaProvider(sp::descriptor::ValidatedDescriptor descriptor, sp::runtime::Options options,
26 std::shared_ptr<sp::runtime::Executor> executor,
27 std::shared_ptr<sp::runtime::HostTransport> transport, Defaults defaults = {});
28 ~SchemaProvider() override;
29 static std::unique_ptr<SchemaProvider> create(
30 sp::descriptor::ValidatedDescriptor descriptor, sp::runtime::Options options = {},
31 Defaults defaults = {});
32 static std::unique_ptr<SchemaProvider> create(
33 sp::descriptor::ValidatedDescriptor descriptor, sp::runtime::Options options,
34 std::shared_ptr<sp::runtime::Executor> executor,
35 std::shared_ptr<sp::runtime::HostTransport> transport, Defaults defaults = {});
36 PreparedProviderRequest prepare(ProviderRequest request) override;
37 std::string_view family() const noexcept override;
38 std::string get_name() const override;
39 bool host_pumped() const noexcept override { return host_pumped_; }
40protected:
41 std::shared_ptr<sp::runtime::Client> endpoint_runtime() const override { return client_; }
42private:
43 std::string family_;
44 std::string name_;
45 const Defaults defaults_;
46 bool host_pumped_ = false;
47 std::shared_ptr<sp::runtime::Client> client_;
48};
49} // namespace neograph::llm
Capability identity plus a single prepared, owned operation contract.
Definition provider.h:387
Provider backed by a pinned, closed/versioned descriptor and immutable SDK policy.
std::shared_ptr< sp::runtime::Client > endpoint_runtime() const override
The SchemaProvider client whose endpoints this provider forwards, the same one for the provider's lif...
SchemaProvider(sp::descriptor::ValidatedDescriptor descriptor, sp::runtime::Options options, std::shared_ptr< sp::runtime::Executor > executor, std::shared_ptr< sp::runtime::HostTransport > transport, Defaults defaults={})
Runs on a host's event loop (#535): the SDK's work is posted to executor and every HTTP attempt goes ...
SchemaProvider(sp::descriptor::ValidatedDescriptor descriptor, sp::runtime::Options options={}, Defaults defaults={})
Runs on the SDK's worker pool and its libcurl transport.