Skip to content

Running Example 07 fails for me. #84

Open

Description

@GanbaruTobi

Hi,

the only change i did is using a local model:

configure(
        LM::builder()
            .base_url("http://localhost:11434/v1".to_string())
            .model("llama3.2".to_string())
            .temperature(0.0)
            .build()
            .await?,
        ChatAdapter,
    );

The prediction is also correct, but trying to read the history fails with:

prediction: "Paris"

thread 'main' panicked at /home/gbaru/DSRs/crates/dspy-rs/src/core/lm/mod.rs:657:14:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/std/src/panicking.rs:697:5
   1: core::panicking::panic_fmt
             at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:75:14
   2: core::panicking::panic
             at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/panicking.rs:145:5
   3: core::option::unwrap_failed
             at /rustc/1159e78c4747b02ef996e55082b704c09b970588/library/core/src/option.rs:2130:5
   4: core::option::Option<T>::unwrap
             at /home/gbaru/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:1009:21
   5: dspy_rs::core::lm::LM::inspect_history::{{closure}}::{{closure}}
             at ./src/core/lm/mod.rs:657:14
   6: dspy_rs::core::lm::LM::inspect_history::{{closure}}
             at ./src/core/lm/mod.rs:648:5
   7: _07_inspect_history::main::{{closure}}
             at ./examples/07-inspect-history.rs:45:47
   8: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /home/gbaru/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:133:9
   9: tokio::runtime::park::CachedParkThread::block_on::{{closure}}
             at /home/gbaru/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/park.rs:284:71
  10: tokio::task::coop::with_budget
             at /home/gbaru/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/task/coop/mod.rs:167:5
  11: tokio::task::coop::budget
             at /home/gbaru/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/task/coop/mod.rs:133:5
  12: tokio::runtime::park::CachedParkThread::block_on
             at /home/gbaru/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/park.rs:284:31
  13: tokio::runtime::context::blocking::BlockingRegionGuard::block_on
             at /home/gbaru/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/context/blocking.rs:66:14
  14: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}
             at /home/gbaru/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/scheduler/multi_thread/mod.rs:89:22
  15: tokio::runtime::context::runtime::enter_runtime
             at /home/gbaru/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/context/runtime.rs:65:16
  16: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
             at /home/gbaru/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/scheduler/multi_thread/mod.rs:88:9
  17: tokio::runtime::runtime::Runtime::block_on_inner
             at /home/gbaru/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/runtime.rs:370:50
  18: tokio::runtime::runtime::Runtime::block_on
             at /home/gbaru/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.49.0/src/runtime/runtime.rs:340:18
  19: _07_inspect_history::main
             at ./examples/07-inspect-history.rs:48:7
  20: core::ops::function::FnOnce::call_once
             at /home/gbaru/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:253:5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions