Skip to content

Rust example gives an error #10

@egorsmkv

Description

@egorsmkv

This example https://github.com/openai/harmony?tab=readme-ov-file#example-1 gives an error:

   Compiling harmony-test v0.1.0 (/Users/yehorsmoliakov/Downloads/RustedBytes/harmony-test)
error[E0061]: this method takes 3 arguments but 2 arguments were supplied
   --> src/main.rs:9:22
    |
9   |     let tokens = enc.render_conversation_for_completion(&convo, Role::Assistant)?;
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------------- argument #3 of type `Option<&openai_harmony::encoding::RenderConversationConfig>` is missing
    |
note: method defined here
   --> /Users/yehorsmoliakov/.cargo/git/checkouts/harmony-d181548887579b3d/111f0e6/src/encoding.rs:248:12
    |
248 |     pub fn render_conversation_for_completion<'a, I>(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: provide the argument
    |
9   |     let tokens = enc.render_conversation_for_completion(&convo, Role::Assistant, /* Option<&openai_harmony::encoding::RenderConversationConfig> */)?;
    |                                                                                +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

For more information about this error, try `rustc --explain E0061`.
error: could not compile `harmony-test` (bin "harmony-test") due to 1 previous error

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