mirror of
https://github.com/openai/codex.git
synced 2026-11-12 22:42:36 +00:00
Split DeveloperInstructions into individual fragments. (#18813)
Split DeveloperInstructions into individual fragments.
This commit is contained in:
1 parent
5fe767e8e1
commit
2a226096f6
55 files changed
+1410
-1058
No files matched your search
@@ -0,0 +1,22 @@
|
||||
use super::ContextualUserFragment;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub(crate) struct PluginInstructions {
|
||||
text: String,
|
||||
}
|
||||
|
||||
impl PluginInstructions {
|
||||
pub(crate) fn new(text: impl Into<String>) -> Self {
|
||||
Self { text: text.into() }
|
||||
}
|
||||
}
|
||||
|
||||
impl ContextualUserFragment for PluginInstructions {
|
||||
const ROLE: &'static str = "developer";
|
||||
const START_MARKER: &'static str = "";
|
||||
const END_MARKER: &'static str = "";
|
||||
|
||||
fn body(&self) -> String {
|
||||
self.text.clone()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user