sobelio / llm-chain

`llm-chain` is a powerful rust crate for building chains in large language models allowing you to summarise text and complete complex tasks
https://llm-chain.xyz
MIT License
1.27k stars 127 forks source link

feat: make Executor trait object safe #249

Closed kyle-mccarthy closed 6 months ago

kyle-mccarthy commented 7 months ago

I moved the Sized bound from the Executor trait to the two initializer methods. This makes the trait object safe, allowing for the following

struct Context {
    engine: Arc<dyn Executor>
}
chenwanqq commented 2 months ago

I think this change didn't work? I found it's still not object safe. struct SimpleWriteCode { executor: Box, } and this Executor shows a 'cannot be made into an object' error