Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile #1

Open
madchicken opened this issue Jun 21, 2023 · 0 comments
Open

Can't compile #1

madchicken opened this issue Jun 21, 2023 · 0 comments

Comments

@madchicken
Copy link

I created a new repo starting from this template and when I run cargo build I get this error:

   Compiling llm-chain-openai v0.8.3
error[E0308]: mismatched types
   --> /Users/madchicken/.cargo/registry/src/github.com-1ecc6299db9ec823/llm-chain-openai-0.8.3/src/chatgpt/executor.rs:106:72
    |
106 |         let tokens_used = num_tokens_from_messages(&model.to_string(), &messages)
    |                           ------------------------                     ^^^^^^^^^ expected slice, found struct `Vec`
    |                           |
    |                           arguments to this function are incorrect
    |
    = note: expected reference `&[async_openai::types::types::ChatCompletionRequestMessage]`
               found reference `&Vec<async_openai::types::ChatCompletionRequestMessage>`
note: function defined here
   --> /Users/madchicken/.cargo/registry/src/github.com-1ecc6299db9ec823/tiktoken-rs-0.4.3/src/api.rs:358:12
    |
358 |     pub fn num_tokens_from_messages(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `llm-chain-openai` due to previous error

Cargo version: cargo 1.68.2 (6feb7c9cf 2023-03-26)
Rustc version: rustc 1.68.2 (9eb3afe9e 2023-03-27)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant