Hi all !
I apologize right away for what may be a stupid question.
Please tell me how I can make a GenerationRequest with my context, which (let's assume) is stored in my database.
let some_raw_data: Vec<i32> = Chat::get_last_context();
let last_context: GenerationContext = GenerationContext(some_raw_data);
But this example will generate an error at the compilation stage
error[E0423]: cannot initialize a tuple struct which contains private fields
--> src\some\module\name.rs:1:1
|
1 | let last_context: GenerationContext = GenerationContext(some_raw_data);
| ^^^^^^^^^^^^^^^^^
|
note: constructor is not visible here due to private fields
--> Long\Path\To\ollama-rs-0.1.8\src\generation\completion\mod.rs:91:30
|
91 | pub struct GenerationContext(Vec<i32>);
| ^^^^^^^^ private field
Hi all ! I apologize right away for what may be a stupid question. Please tell me how I can make a GenerationRequest with my context, which (let's assume) is stored in my database.
But this example will generate an error at the compilation stage
Is it possible to make this field public ? 😢