Fixed instruct argument issue.
This commit is contained in:
@@ -60,17 +60,8 @@ impl Chat {
|
|||||||
|
|
||||||
client.identify()?;
|
client.identify()?;
|
||||||
|
|
||||||
let outgoing = client
|
|
||||||
.outgoing()
|
|
||||||
.ok_or_eyre("Couldn't get outgoing irc sink.")?;
|
|
||||||
let mut stream = client.stream()?;
|
let mut stream = client.stream()?;
|
||||||
|
|
||||||
tokio::spawn(async move {
|
|
||||||
if let Err(e) = outgoing.await {
|
|
||||||
event!(Level::ERROR, "Failed to drive output: {}", e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
while let Some(message) = stream.next().await.transpose()? {
|
while let Some(message) = stream.next().await.transpose()? {
|
||||||
if let Command::PRIVMSG(channel, message) = message.command
|
if let Command::PRIVMSG(channel, message) = message.command
|
||||||
&& message.starts_with("!gem")
|
&& message.starts_with("!gem")
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ mod setup;
|
|||||||
|
|
||||||
const DEFAULT_INSTRUCT: &str =
|
const DEFAULT_INSTRUCT: &str =
|
||||||
"You are a shady, yet helpful IRC bot. You try to give responses that can
|
"You are a shady, yet helpful IRC bot. You try to give responses that can
|
||||||
be sent in a single IRC response according to the specification.";
|
be sent in a single IRC response according to the specification. Keep answers to
|
||||||
|
500 characters or less.";
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<()> {
|
async fn main() -> Result<()> {
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ pub async fn init() -> Result<Setup> {
|
|||||||
.set_override_option("chroot-dir", args.chroot_dir.clone())?
|
.set_override_option("chroot-dir", args.chroot_dir.clone())?
|
||||||
.set_override_option("command-path", args.command_dir.clone())?
|
.set_override_option("command-path", args.command_dir.clone())?
|
||||||
.set_override_option("model", args.model.clone())?
|
.set_override_option("model", args.model.clone())?
|
||||||
.set_override_option("instruct", args.model.clone())?
|
.set_override_option("instruct", args.instruct.clone())?
|
||||||
.set_override_option("channels", args.channels.clone())?
|
.set_override_option("channels", args.channels.clone())?
|
||||||
.set_override_option("server", args.server.clone())?
|
.set_override_option("server", args.server.clone())?
|
||||||
.set_override_option("port", args.port.clone())? // FIXME: Make this a default here not in clap.
|
.set_override_option("port", args.port.clone())? // FIXME: Make this a default here not in clap.
|
||||||
|
|||||||
Reference in New Issue
Block a user