BoxcarsAI / boxcars

Building applications with composability using Boxcars with LLM's. Inspired by LangChain.
MIT License
430 stars 39 forks source link

Add Boxcar similar to LLMChain #85

Closed oluvvafemi closed 1 year ago

oluvvafemi commented 1 year ago

I would like to know if it's a good idea and I could work on this as my first contribution.

In Langchain, you can do something like this: create a prompt template and use with different models/engine.

llm_chain = LLMChain(
    prompt=prompt,
    llm=hub_llm #or openai
)
llm_chain.run(question)

We could even add Example Selectors.

francis commented 1 year ago

Hi @oluvvafemi - if I understand correctly, I think this is pretty much what an EngineBoxcar is trying to do. Your hub_llm would need to be implemented as an Engine or you could use the existing OpenAi model. I haven't tried to run the EngineBoxcar class by itself, so this might be worth trying.

oluvvafemi commented 1 year ago

Thank you, EngineBoxCar does exactly that.