Cormanz / smartgpt

A program that provides LLMs with the ability to complete complex tasks using plugins.
MIT License
1.74k stars 128 forks source link

Windows Issues with finding SmartGPT.exe #6

Closed zenchantlive closed 1 year ago

zenchantlive commented 1 year ago

here are the error messages:

warning: `smartgpt` (bin "smartgpt") generated 17 warnings
    Finished release [optimized] target(s) in 7.44s
     Running `target\release\smartgpt.exe`
Error: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }
error: process didn't exit successfully: `target\release\smartgpt.exe` (exit code: 1)

beforehand there is a string of warnings:

(base) PS C:\Users\Zenchant\Documents\ALL-AGI\smartgpt> cargo run --release
   Compiling smartgpt v0.1.0 (C:\Users\Zenchant\Documents\ALL-AGI\smartgpt)
warning: unnecessary trailing semicolon
  --> src\plugins\wikipedia\mod.rs:86:110
   |
86 |     let name: String = args.get(0).ok_or(CommandNoArgError("wikipedia-browse", "name"))?.clone().try_into()?;;
   |                                                                                                              ^ help: remove this semicolon
   |
   = note: `#[warn(redundant_semicolons)]` on by default

warning: use of deprecated trait `std::ascii::AsciiExt`: use inherent methods instead
 --> src\config.rs:1:68
  |
1 | use std::{collections::HashMap, error::Error, fmt::Display, ascii::AsciiExt, process, sync::{Mutex, Arc}};
  |                                                                    ^^^^^^^^
  |
  = note: `#[warn(deprecated)]` on by default

warning: use of deprecated trait `std::ascii::AsciiExt`: use inherent methods instead
 --> src\agents\minion\continuous.rs:1:32
  |
1 | use std::{error::Error, ascii::AsciiExt};
  |                                ^^^^^^^^

warning: unreachable expression
   --> src\agents\manager.rs:128:5
    |
48  | /     loop {
49  | |         let ProgramInfo { context,   .. } = program;
50  | |         let mut context = context.lock().unwrap();
51  | |
...   |
125 | |         }
126 | |     }
    | |_____- any code following this expression is unreachable
127 |
128 |       Ok(())
    |       ^^^^^^ unreachable expression
    |
    = note: `#[warn(unreachable_code)]` on by default

warning: unused import: `ascii::AsciiExt`
 --> src\config.rs:1:61
  |
1 | use std::{collections::HashMap, error::Error, fmt::Display, ascii::AsciiExt, process, sync::{Mutex, Arc}};
  |                                                             ^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `ascii::AsciiExt`
 --> src\agents\minion\continuous.rs:1:25
  |
1 | use std::{error::Error, ascii::AsciiExt};
  |                         ^^^^^^^^^^^^^^^

warning: variable `first_prompt` is assigned to, but never used
  --> src\agents\manager.rs:44:13
   |
44 |     let mut first_prompt = true;
   |             ^^^^^^^^^^^^
   |
   = note: consider using `_first_prompt` instead
   = note: `#[warn(unused_variables)]` on by default

warning: value assigned to `first_prompt` is never read
  --> src\agents\manager.rs:67:9
   |
67 |         first_prompt = false;
   |         ^^^^^^^^^^^^
   |
   = help: maybe it is overwritten before being read?
   = note: `#[warn(unused_assignments)]` on by default

warning: function `debug_yaml` is never used
  --> src\main.rs:37:4
   |
37 | fn debug_yaml(results: &str) -> Result<(), Box<dyn Error>> {
   |    ^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: function `generate_goals` is never used
  --> src\prompt.rs:84:4
   |
84 | fn generate_goals(goals: &[String]) -> String {
   |    ^^^^^^^^^^^^^^

warning: function `test` is never used
  --> src\agents\mod.rs:56:8
   |
56 | pub fn test() {
   |        ^^^^

warning: function `try_parse_yaml` is never used
  --> src\agents\mod.rs:61:8
   |
61 | pub fn try_parse_yaml<T : DeserializeOwned>(llm: &LLM, tries: usize, max_tokens: Option<u16>) -> Result<(String...
   |        ^^^^^^^^^^^^^^

warning: variants `Manager`, `Boss`, and `Employee` are never constructed
   --> src\agents\mod.rs:99:5
    |
98  | pub enum Agent {
    |          ----- variants in this enum
99  |     Manager,
    |     ^^^^^^^
100 |     Boss,
    |     ^^^^
101 |     Employee
    |     ^^^^^^^^
    |
    = note: `Agent` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis

warning: variant `Feedback` is never constructed
  --> src\agents\boss.rs:11:5
   |
9  | pub enum Task {
   |          ---- variant in this enum
10 |     Task(String),
11 |     Feedback(String, String)
   |     ^^^^^^^^
   |
   = note: `Task` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis

warning: function `run_lua_minion` is never used
  --> src\agents\minion\lua.rs:11:8
   |
11 | pub fn run_lua_minion(
   |        ^^^^^^^^^^^^^^

warning: unused `Result` that must be used
  --> src\runner\mod.rs:26:5
   |
26 | /     run_script(
27 | |         &mut program,
28 | |         r#"wikipedia_browse("Ronald Reagan")"#,
29 | |         &Lua::new()
30 | |     );
   | |_____^
   |
   = note: this `Result` may be an `Err` variant, which should be handled
   = note: `#[warn(unused_must_use)]` on by default

warning: unused `Result` that must be used
   --> src\agents\minion\continuous.rs:166:13
    |
166 |             context.agents.minion.llm.crop_to_tokens_remaining(1800);
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this `Result` may be an `Err` variant, which should be handled

warning: `smartgpt` (bin "smartgpt") generated 17 warnings
sneibarg commented 1 year ago

This result occurs on Linux also after following the README. Clearly there is some file it needs, but it's an executable! Checked the source, and the README, and I think both you and I did not generate a config.yml. That's the first thing it does when it enters main() in main.rs.

Cormanz commented 1 year ago

My guess is that it couldn't find your config.yml. When renamed, I get the same error.

If you git cloned the repository, you'll likely get the same error. Try renaming the example config.yml to config.yml and trying it then.

You might also encounter a Error: NoMemorySystemError. If so, try running it with faiss cargo run --release --features faiss (note: you'll need to install it as described here)

You're right about not generating config.yml yet, that's something I plan to do but I've been focusing on doing rapid prototyping first.

I'm assuming you came here from the recent wave of people who saw the video on "GPT 4 is Smarter than You Think: Introducing SmartGPT" or the adjacent Reddit post - just an FYI that this is an unrelated yet similarly named project. Thanks for checking it out!

orvitpng commented 1 year ago

I suggest closing this as the problem is reproducible and fixed easily with the previous instructions.