kyegomez / tree-of-thoughts

Plug in and Play Implementation of Tree of Thoughts: Deliberate Problem Solving with Large Language Models that Elevates Model Reasoning by atleast 70%

Home Page:https://discord.gg/qUtxnK2NMf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gpt4all integration

ProxyAyush opened this issue · comments

so I use gpt4all which gets imported as
from langchain.llms import GPT4All

I want to know if I can import from TOT as
from tree_of_thoughts import GPT4ALL

as i use models from GPT4ALL pipeline

You could rename the package: “from … import ABC as ABC_1”

Hey @ProxyAyush can you explain deeper?

If you want you can use GPT4ALL by defining an custom abstract language class that adheres to the following guidelines:

class CustomLanguageModel(AbstractLanguageModel):
    def __init__(self, model):
        self.model = model

    def generate_thoughts(self, state, k):
        #implement the thought generation logic using self.model
        pass

    def evaluate_states(self, states):
        #implement state evaluation logic using self.model
        pass