1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! # Origin GameDB
//!
//! Rust SDK for the Origin GameDB service, a knowledge graph API built on top
//! of Cognee for ingesting game design data and querying it semantically.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use origin_gamedb::{CognifyOptions, GameDbClient, SearchOptions, SearchType};
//!
//! #[tokio::main]
//! async fn main() -> origin_gamedb::Result<()> {
//! let gamedb = GameDbClient::new("ca_xxx_token");
//!
//! gamedb.create_dataset("combat-design").await?;
//! gamedb
//! .add_text("combat-design", "Poise breaks after repeated heavy attacks.")
//! .await?;
//!
//! gamedb
//! .cognify(&CognifyOptions {
//! datasets: Some(vec!["combat-design".into()]),
//! run_in_background: Some(true),
//! ..Default::default()
//! })
//! .await?;
//!
//! let results = gamedb
//! .search(
//! "What systems interact with poise?",
//! Some(SearchOptions {
//! search_type: Some(SearchType::Summaries),
//! top_k: Some(5),
//! ..Default::default()
//! }),
//! )
//! .await?;
//!
//! println!("{results}");
//! Ok(())
//! }
//! ```
pub use GameDbClient;
pub use ;
pub use *;
/// Default GameDB API endpoint.
pub const DEFAULT_BASE_URL: &str = "https://cogneeapi.origingame.dev";