Update examples to work with the separate controller and lm modules
This commit is contained in:
parent
14e05abbe1
commit
80957be75e
@ -14,7 +14,7 @@ import json
|
|||||||
import csv
|
import csv
|
||||||
from statistics import fmean
|
from statistics import fmean
|
||||||
from typing import Dict, List, Callable, Set, Union
|
from typing import Dict, List, Callable, Set, Union
|
||||||
from graph_of_thoughts import controller, operations, prompter, parser
|
from graph_of_thoughts import controller, language_models, operations, prompter, parser
|
||||||
|
|
||||||
|
|
||||||
class DocMergePrompter(prompter.Prompter):
|
class DocMergePrompter(prompter.Prompter):
|
||||||
@ -714,8 +714,8 @@ def run(
|
|||||||
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
lm = controller.ChatGPT(
|
lm = language_models.ChatGPT(
|
||||||
"../../graph_of_thoughts/controller/config.json",
|
"../../graph_of_thoughts/language_models/config.json",
|
||||||
model_name=lm_name,
|
model_name=lm_name,
|
||||||
cache=True,
|
cache=True,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import csv
|
|||||||
from collections import Counter
|
from collections import Counter
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from typing import Dict, List, Callable, Union
|
from typing import Dict, List, Callable, Union
|
||||||
from graph_of_thoughts import controller, operations, prompter, parser
|
from graph_of_thoughts import controller, language_models, operations, prompter, parser
|
||||||
|
|
||||||
|
|
||||||
def string_to_list(string: str) -> List[str]:
|
def string_to_list(string: str) -> List[str]:
|
||||||
@ -1403,8 +1403,8 @@ def run(
|
|||||||
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
lm = controller.ChatGPT(
|
lm = language_models.ChatGPT(
|
||||||
"../../graph_of_thoughts/controller/config.json",
|
"../../graph_of_thoughts/language_models/config.json",
|
||||||
model_name=lm_name,
|
model_name=lm_name,
|
||||||
cache=True,
|
cache=True,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import datetime
|
|||||||
import json
|
import json
|
||||||
import csv
|
import csv
|
||||||
from typing import Dict, List, Callable, Union
|
from typing import Dict, List, Callable, Union
|
||||||
from graph_of_thoughts import controller, operations, prompter, parser
|
from graph_of_thoughts import controller, language_models, operations, prompter, parser
|
||||||
|
|
||||||
from . import utils
|
from . import utils
|
||||||
|
|
||||||
@ -672,8 +672,8 @@ def run(
|
|||||||
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
lm = controller.ChatGPT(
|
lm = language_models.ChatGPT(
|
||||||
"../../graph_of_thoughts/controller/config.json",
|
"../../graph_of_thoughts/language_models/config.json",
|
||||||
model_name=lm_name,
|
model_name=lm_name,
|
||||||
cache=True,
|
cache=True,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import datetime
|
|||||||
import json
|
import json
|
||||||
import csv
|
import csv
|
||||||
from typing import Dict, List, Callable, Union
|
from typing import Dict, List, Callable, Union
|
||||||
from graph_of_thoughts import controller, operations, prompter, parser
|
from graph_of_thoughts import controller, language_models, operations, prompter, parser
|
||||||
|
|
||||||
from . import utils
|
from . import utils
|
||||||
|
|
||||||
@ -702,8 +702,8 @@ def run(
|
|||||||
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
lm = controller.ChatGPT(
|
lm = language_models.ChatGPT(
|
||||||
"../../graph_of_thoughts/controller/config.json",
|
"../../graph_of_thoughts/language_models/config.json",
|
||||||
model_name=lm_name,
|
model_name=lm_name,
|
||||||
cache=True,
|
cache=True,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import datetime
|
|||||||
import json
|
import json
|
||||||
import csv
|
import csv
|
||||||
from typing import Dict, List, Callable, Union
|
from typing import Dict, List, Callable, Union
|
||||||
from graph_of_thoughts import controller, operations, prompter, parser
|
from graph_of_thoughts import controller, language_models, operations, prompter, parser
|
||||||
|
|
||||||
from . import utils
|
from . import utils
|
||||||
|
|
||||||
@ -754,8 +754,8 @@ def run(
|
|||||||
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
lm = controller.ChatGPT(
|
lm = language_models.ChatGPT(
|
||||||
"../../graph_of_thoughts/controller/config.json",
|
"../../graph_of_thoughts/language_models/config.json",
|
||||||
model_name=lm_name,
|
model_name=lm_name,
|
||||||
cache=True,
|
cache=True,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import datetime
|
|||||||
import json
|
import json
|
||||||
import csv
|
import csv
|
||||||
from typing import Dict, List, Callable, Union
|
from typing import Dict, List, Callable, Union
|
||||||
from graph_of_thoughts import controller, operations, prompter, parser
|
from graph_of_thoughts import controller, language_models, operations, prompter, parser
|
||||||
from . import utils
|
from . import utils
|
||||||
|
|
||||||
|
|
||||||
@ -673,8 +673,8 @@ def run(
|
|||||||
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
lm = controller.ChatGPT(
|
lm = language_models.ChatGPT(
|
||||||
"../../graph_of_thoughts/controller/config.json",
|
"../../graph_of_thoughts/language_models/config.json",
|
||||||
model_name=lm_name,
|
model_name=lm_name,
|
||||||
cache=True,
|
cache=True,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import datetime
|
|||||||
import json
|
import json
|
||||||
import csv
|
import csv
|
||||||
from typing import Dict, List, Callable, Union
|
from typing import Dict, List, Callable, Union
|
||||||
from graph_of_thoughts import controller, operations, prompter, parser
|
from graph_of_thoughts import controller, language_models, operations, prompter, parser
|
||||||
|
|
||||||
from . import utils
|
from . import utils
|
||||||
|
|
||||||
@ -732,8 +732,8 @@ def run(
|
|||||||
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
lm = controller.ChatGPT(
|
lm = language_models.ChatGPT(
|
||||||
"../../graph_of_thoughts/controller/config.json",
|
"../../graph_of_thoughts/language_models/config.json",
|
||||||
model_name=lm_name,
|
model_name=lm_name,
|
||||||
cache=True,
|
cache=True,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import datetime
|
|||||||
import json
|
import json
|
||||||
import csv
|
import csv
|
||||||
from typing import Dict, List, Callable, Union
|
from typing import Dict, List, Callable, Union
|
||||||
from graph_of_thoughts import controller, operations, prompter, parser
|
from graph_of_thoughts import controller, language_models, operations, prompter, parser
|
||||||
|
|
||||||
from . import utils
|
from . import utils
|
||||||
|
|
||||||
@ -830,8 +830,8 @@ def run(
|
|||||||
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
lm = controller.ChatGPT(
|
lm = language_models.ChatGPT(
|
||||||
"../../graph_of_thoughts/controller/config.json",
|
"../../graph_of_thoughts/language_models/config.json",
|
||||||
model_name=lm_name,
|
model_name=lm_name,
|
||||||
cache=True,
|
cache=True,
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user