Rename AiClient to AiGenerator
This commit is contained in:
parent
336a4231a0
commit
bdf5b4da08
|
@ -11,7 +11,7 @@ use crate::models::{
|
|||
Content, ContentContainer, ContentRelation,
|
||||
};
|
||||
|
||||
use super::generator::AiClient;
|
||||
use super::generator::AiGenerator;
|
||||
|
||||
const DIRECTIONS: [&str; 15] = [
|
||||
"north",
|
||||
|
@ -80,11 +80,11 @@ fn is_duplicate_recorded(failures: &[CoherenceFailure], exit: &Exit) -> bool {
|
|||
}
|
||||
|
||||
pub(super) struct AiCoherence {
|
||||
generator: Rc<AiClient>,
|
||||
generator: Rc<AiGenerator>,
|
||||
}
|
||||
|
||||
impl AiCoherence {
|
||||
pub fn new(generator: Rc<AiClient>) -> AiCoherence {
|
||||
pub fn new(generator: Rc<AiGenerator>) -> AiCoherence {
|
||||
AiCoherence { generator }
|
||||
}
|
||||
|
||||
|
|
|
@ -26,16 +26,16 @@ fn find_exit_position(exits: &[Exit], exit_to_find: &Exit) -> Result<usize> {
|
|||
/// information via the LLM and doing basic coherence on it. Things
|
||||
/// like ID creation, data management, and advanced coherence are done
|
||||
/// at a higher level.
|
||||
pub struct AiClient {
|
||||
pub struct AiGenerator {
|
||||
parsing_convo: AiConversation,
|
||||
world_creation_convo: AiConversation,
|
||||
person_creation_convo: AiConversation,
|
||||
execution_convo: AiConversation,
|
||||
}
|
||||
|
||||
impl AiClient {
|
||||
pub fn new(client: Rc<KoboldClient>) -> AiClient {
|
||||
AiClient {
|
||||
impl AiGenerator {
|
||||
pub fn new(client: Rc<KoboldClient>) -> AiGenerator {
|
||||
AiGenerator {
|
||||
parsing_convo: AiConversation::new(client.clone()),
|
||||
world_creation_convo: AiConversation::new(client.clone()),
|
||||
person_creation_convo: AiConversation::new(client.clone()),
|
||||
|
|
|
@ -12,8 +12,7 @@ use anyhow::{bail, Result};
|
|||
use itertools::Itertools;
|
||||
use std::rc::Rc;
|
||||
|
||||
use super::generator::AiClient;
|
||||
|
||||
use super::generator::AiGenerator;
|
||||
use super::coherence::AiCoherence;
|
||||
|
||||
/// Highest-level AI/LLM construct, which returns fully converted game
|
||||
|
@ -22,14 +21,14 @@ use super::coherence::AiCoherence;
|
|||
/// entities from their seeds. Then, stick a DB ID on them and put
|
||||
/// them in the database(?).
|
||||
pub struct AiLogic {
|
||||
generator: Rc<AiClient>,
|
||||
generator: Rc<AiGenerator>,
|
||||
coherence: AiCoherence,
|
||||
db: Rc<Database>,
|
||||
}
|
||||
|
||||
impl AiLogic {
|
||||
pub fn new(api_client: Rc<KoboldClient>, db: &Rc<Database>) -> AiLogic {
|
||||
let generator = Rc::new(AiClient::new(api_client));
|
||||
let generator = Rc::new(AiGenerator::new(api_client));
|
||||
let coherence = AiCoherence::new(generator.clone());
|
||||
|
||||
AiLogic {
|
||||
|
|
Loading…
Reference in New Issue