Update examples to work with the separate controller and lm modules

This commit is contained in:
Nils Blach 2023-10-18 10:52:56 +09:00 committed by Nils Blach
parent 14e05abbe1
commit 80957be75e
8 changed files with 24 additions and 24 deletions

View File

@ -14,7 +14,7 @@ import json
import csv
from statistics import fmean
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):
@ -714,8 +714,8 @@ def run(
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
)
break
lm = controller.ChatGPT(
"../../graph_of_thoughts/controller/config.json",
lm = language_models.ChatGPT(
"../../graph_of_thoughts/language_models/config.json",
model_name=lm_name,
cache=True,
)

View File

@ -18,7 +18,7 @@ import csv
from collections import Counter
from functools import partial
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]:
@ -1403,8 +1403,8 @@ def run(
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
)
break
lm = controller.ChatGPT(
"../../graph_of_thoughts/controller/config.json",
lm = language_models.ChatGPT(
"../../graph_of_thoughts/language_models/config.json",
model_name=lm_name,
cache=True,
)

View File

@ -15,7 +15,7 @@ import datetime
import json
import csv
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
@ -672,8 +672,8 @@ def run(
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
)
break
lm = controller.ChatGPT(
"../../graph_of_thoughts/controller/config.json",
lm = language_models.ChatGPT(
"../../graph_of_thoughts/language_models/config.json",
model_name=lm_name,
cache=True,
)

View File

@ -15,7 +15,7 @@ import datetime
import json
import csv
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
@ -702,8 +702,8 @@ def run(
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
)
break
lm = controller.ChatGPT(
"../../graph_of_thoughts/controller/config.json",
lm = language_models.ChatGPT(
"../../graph_of_thoughts/language_models/config.json",
model_name=lm_name,
cache=True,
)

View File

@ -15,7 +15,7 @@ import datetime
import json
import csv
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
@ -754,8 +754,8 @@ def run(
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
)
break
lm = controller.ChatGPT(
"../../graph_of_thoughts/controller/config.json",
lm = language_models.ChatGPT(
"../../graph_of_thoughts/language_models/config.json",
model_name=lm_name,
cache=True,
)

View File

@ -12,7 +12,7 @@ import datetime
import json
import csv
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
@ -673,8 +673,8 @@ def run(
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
)
break
lm = controller.ChatGPT(
"../../graph_of_thoughts/controller/config.json",
lm = language_models.ChatGPT(
"../../graph_of_thoughts/language_models/config.json",
model_name=lm_name,
cache=True,
)

View File

@ -12,7 +12,7 @@ import datetime
import json
import csv
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
@ -732,8 +732,8 @@ def run(
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
)
break
lm = controller.ChatGPT(
"../../graph_of_thoughts/controller/config.json",
lm = language_models.ChatGPT(
"../../graph_of_thoughts/language_models/config.json",
model_name=lm_name,
cache=True,
)

View File

@ -12,7 +12,7 @@ import datetime
import json
import csv
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
@ -830,8 +830,8 @@ def run(
f"Budget has been depleted, stopping. Method {method.__name__} has not been run."
)
break
lm = controller.ChatGPT(
"../../graph_of_thoughts/controller/config.json",
lm = language_models.ChatGPT(
"../../graph_of_thoughts/language_models/config.json",
model_name=lm_name,
cache=True,
)