prediction: rewrite the prompting stack to create the ship computer as a second character, and let characters/agents operate autonomously with their own tasks and event queues
This commit is contained in:
+15
-19
@@ -1,7 +1,9 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use chrono::{DateTime, Duration, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{artifacts::{Track, archive::Archive}, prediction::{GeneratedResponses, PossibleResponse}};
|
||||
use crate::artifacts::{Track, archive::Archive};
|
||||
|
||||
pub mod conversation;
|
||||
|
||||
@@ -34,27 +36,25 @@ impl Default for StageDirection {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
|
||||
pub struct Scenery {
|
||||
pub artifacts: Archive,
|
||||
pub current_playlist: Vec<Track>
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
|
||||
pub struct Scene {
|
||||
reply_options: GeneratedResponses,
|
||||
direction: StageDirection,
|
||||
pub tokens_consumed: usize,
|
||||
scenery: Scenery
|
||||
pub current_playlist: Vec<Track>,
|
||||
pub artifact_count: usize,
|
||||
pub artifact_stats: (usize, usize, usize),
|
||||
pub computer_task_list: HashMap<String, bool>
|
||||
}
|
||||
|
||||
impl Scene {
|
||||
pub fn new(reply_options: GeneratedResponses, scenery: Scenery, tokens_consumed: usize, direction: StageDirection) -> Self {
|
||||
pub fn new(tokens_consumed: usize, direction: StageDirection, archive: &Archive, current_playlist: Vec<Track>, computer_task_list: HashMap<String, bool>) -> Self {
|
||||
Self {
|
||||
reply_options,
|
||||
scenery,
|
||||
tokens_consumed,
|
||||
direction
|
||||
direction,
|
||||
current_playlist,
|
||||
artifact_count: archive.len(),
|
||||
artifact_stats: archive.stats(),
|
||||
computer_task_list
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,11 +62,7 @@ impl Scene {
|
||||
&self.direction
|
||||
}
|
||||
|
||||
pub fn scenery(&self) -> &Scenery {
|
||||
&self.scenery
|
||||
}
|
||||
|
||||
pub fn reply_options(&self) -> &Vec<PossibleResponse> {
|
||||
&self.reply_options.responses
|
||||
pub fn playlist(&self) -> &Vec<Track> {
|
||||
&self.current_playlist
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user