From 80957be75ed1b21e326b0305cb7628192ccfbfa1 Mon Sep 17 00:00:00 2001 From: Nils Blach Date: Wed, 18 Oct 2023 10:52:56 +0900 Subject: [PATCH] Update examples to work with the separate controller and lm modules --- examples/doc_merge/doc_merge.py | 6 +++--- examples/keyword_counting/keyword_counting.py | 6 +++--- examples/set_intersection/set_intersection_032.py | 6 +++--- examples/set_intersection/set_intersection_064.py | 6 +++--- examples/set_intersection/set_intersection_128.py | 6 +++--- examples/sorting/sorting_032.py | 6 +++--- examples/sorting/sorting_064.py | 6 +++--- examples/sorting/sorting_128.py | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/examples/doc_merge/doc_merge.py b/examples/doc_merge/doc_merge.py index a0c73b9..71a8674 100644 --- a/examples/doc_merge/doc_merge.py +++ b/examples/doc_merge/doc_merge.py @@ -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, ) diff --git a/examples/keyword_counting/keyword_counting.py b/examples/keyword_counting/keyword_counting.py index 810233d..fe63761 100644 --- a/examples/keyword_counting/keyword_counting.py +++ b/examples/keyword_counting/keyword_counting.py @@ -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, ) diff --git a/examples/set_intersection/set_intersection_032.py b/examples/set_intersection/set_intersection_032.py index 19b3f5a..00c604a 100644 --- a/examples/set_intersection/set_intersection_032.py +++ b/examples/set_intersection/set_intersection_032.py @@ -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, ) diff --git a/examples/set_intersection/set_intersection_064.py b/examples/set_intersection/set_intersection_064.py index 3bce8cd..5613faf 100644 --- a/examples/set_intersection/set_intersection_064.py +++ b/examples/set_intersection/set_intersection_064.py @@ -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, ) diff --git a/examples/set_intersection/set_intersection_128.py b/examples/set_intersection/set_intersection_128.py index d1f3802..f956381 100644 --- a/examples/set_intersection/set_intersection_128.py +++ b/examples/set_intersection/set_intersection_128.py @@ -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, ) diff --git a/examples/sorting/sorting_032.py b/examples/sorting/sorting_032.py index fe960e7..10ac484 100644 --- a/examples/sorting/sorting_032.py +++ b/examples/sorting/sorting_032.py @@ -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, ) diff --git a/examples/sorting/sorting_064.py b/examples/sorting/sorting_064.py index c09cf0f..1620e12 100644 --- a/examples/sorting/sorting_064.py +++ b/examples/sorting/sorting_064.py @@ -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, ) diff --git a/examples/sorting/sorting_128.py b/examples/sorting/sorting_128.py index 1a45ac4..207796b 100644 --- a/examples/sorting/sorting_128.py +++ b/examples/sorting/sorting_128.py @@ -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, )