From b126baad945f83948389fbd03ca76c9616102042 Mon Sep 17 00:00:00 2001 From: Lily Delalande Date: Tue, 27 Aug 2024 16:16:52 -0400 Subject: [PATCH] change to ai_exchange --- src/goose/build.py | 6 +++--- src/goose/cli/main.py | 2 +- src/goose/cli/session.py | 2 +- src/goose/toolkit/base.py | 2 +- src/goose/toolkit/developer.py | 2 +- src/goose/toolkit/github.py | 2 +- src/goose/toolkit/repo_context/repo_context.py | 2 +- src/goose/toolkit/repo_context/utils.py | 2 +- src/goose/toolkit/summarization/utils.py | 4 ++-- src/goose/utils/ask.py | 2 +- src/goose/utils/session_file.py | 2 +- src/goose/view.py | 2 +- tests/cli/test_main.py | 2 +- tests/cli/test_session.py | 2 +- tests/conftest.py | 2 +- tests/utils/test_ask.py | 2 +- tests/utils/test_session_file.py | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/goose/build.py b/src/goose/build.py index dd539a9a..19d2c9a0 100644 --- a/src/goose/build.py +++ b/src/goose/build.py @@ -1,8 +1,8 @@ from itertools import chain -from exchange import Exchange, Message -from exchange.moderators import get_moderator -from exchange.providers import get_provider +from ai_exchange import Exchange, Message +from ai_exchange.moderators import get_moderator +from ai_exchange.providers import get_provider from goose.notifier import Notifier from goose.profile import Profile diff --git a/src/goose/cli/main.py b/src/goose/cli/main.py index 30bf3d9b..d09545ea 100644 --- a/src/goose/cli/main.py +++ b/src/goose/cli/main.py @@ -23,7 +23,7 @@ def version() -> None: """Lists the version of goose and any plugins""" from importlib.metadata import entry_points, version - print(f"[green]Goose[/green]: [bold][cyan]{version('goose')}[/cyan][/bold]") + print(f"[green]Goose[/green]: [bold][cyan]{version('goose-ai')}[/cyan][/bold]") print("[green]Plugins[/green]:") filtered_groups = {} modules = set() diff --git a/src/goose/cli/session.py b/src/goose/cli/session.py index 3da620d3..af1be775 100644 --- a/src/goose/cli/session.py +++ b/src/goose/cli/session.py @@ -2,7 +2,7 @@ from pathlib import Path from typing import Any, Dict, List, Optional -from exchange import Message, ToolResult, ToolUse +from ai_exchange import Message, ToolResult, ToolUse from prompt_toolkit.shortcuts import confirm from rich import print from rich.console import RenderableType diff --git a/src/goose/toolkit/base.py b/src/goose/toolkit/base.py index d26630ca..8abecbd4 100644 --- a/src/goose/toolkit/base.py +++ b/src/goose/toolkit/base.py @@ -3,7 +3,7 @@ from typing import Callable, Mapping, Optional, Tuple, TypeVar from attrs import define, field -from exchange import Tool +from ai_exchange import Tool from goose.notifier import Notifier diff --git a/src/goose/toolkit/developer.py b/src/goose/toolkit/developer.py index 6f53ca4d..ff4f961f 100644 --- a/src/goose/toolkit/developer.py +++ b/src/goose/toolkit/developer.py @@ -2,7 +2,7 @@ from subprocess import CompletedProcess, run from typing import List -from exchange import Message +from ai_exchange import Message from rich import box from rich.markdown import Markdown from rich.panel import Panel diff --git a/src/goose/toolkit/github.py b/src/goose/toolkit/github.py index 4a702592..74f0820b 100644 --- a/src/goose/toolkit/github.py +++ b/src/goose/toolkit/github.py @@ -1,4 +1,4 @@ -from exchange import Message +from ai_exchange import Message from goose.toolkit.base import Toolkit diff --git a/src/goose/toolkit/repo_context/repo_context.py b/src/goose/toolkit/repo_context/repo_context.py index 89a01a76..88fc7cc2 100644 --- a/src/goose/toolkit/repo_context/repo_context.py +++ b/src/goose/toolkit/repo_context/repo_context.py @@ -3,7 +3,7 @@ from subprocess import CompletedProcess, run from typing import Dict, Tuple -from exchange import Message +from ai_exchange import Message from goose.notifier import Notifier from goose.toolkit import Toolkit diff --git a/src/goose/toolkit/repo_context/utils.py b/src/goose/toolkit/repo_context/utils.py index dca7f04b..3dc4493e 100644 --- a/src/goose/toolkit/repo_context/utils.py +++ b/src/goose/toolkit/repo_context/utils.py @@ -4,7 +4,7 @@ from collections import deque from typing import Dict, List, Tuple -from exchange import Exchange +from ai_exchange import Exchange from goose.utils.ask import ask_an_ai diff --git a/src/goose/toolkit/summarization/utils.py b/src/goose/toolkit/summarization/utils.py index d398713c..fd44a9ae 100644 --- a/src/goose/toolkit/summarization/utils.py +++ b/src/goose/toolkit/summarization/utils.py @@ -4,8 +4,8 @@ from pathlib import Path from typing import Dict, List, Optional, Tuple -from exchange import Exchange -from exchange.providers.utils import InitialMessageTooLargeError +from ai_exchange import Exchange +from ai_exchange.providers.utils import InitialMessageTooLargeError from goose.utils.ask import ask_an_ai from goose.utils.file_utils import create_file_list diff --git a/src/goose/utils/ask.py b/src/goose/utils/ask.py index e3c057a2..7ec4bcab 100644 --- a/src/goose/utils/ask.py +++ b/src/goose/utils/ask.py @@ -1,4 +1,4 @@ -from exchange import Exchange, Message +from ai_exchange import Exchange, Message def ask_an_ai(input: str, exchange: Exchange, prompt: str = "", no_history: bool = True) -> Message: diff --git a/src/goose/utils/session_file.py b/src/goose/utils/session_file.py index a47efcb1..c3d83f19 100644 --- a/src/goose/utils/session_file.py +++ b/src/goose/utils/session_file.py @@ -2,7 +2,7 @@ from pathlib import Path from typing import Dict, Iterator, List -from exchange import Message +from ai_exchange import Message from goose.cli.config import SESSION_FILE_SUFFIX diff --git a/src/goose/view.py b/src/goose/view.py index 705cde9b..ddd7b699 100644 --- a/src/goose/view.py +++ b/src/goose/view.py @@ -1,5 +1,5 @@ from attrs import define -from exchange import Exchange +from ai_exchange import Exchange @define diff --git a/tests/cli/test_main.py b/tests/cli/test_main.py index 38d4c6c7..c98d311d 100644 --- a/tests/cli/test_main.py +++ b/tests/cli/test_main.py @@ -4,7 +4,7 @@ import pytest from click.testing import CliRunner -from exchange import Message +from ai_exchange import Message from goose.cli.main import goose_cli diff --git a/tests/cli/test_session.py b/tests/cli/test_session.py index 83dd6eba..e3f949a6 100644 --- a/tests/cli/test_session.py +++ b/tests/cli/test_session.py @@ -1,7 +1,7 @@ from unittest.mock import MagicMock, patch import pytest -from exchange import Message +from ai_exchange import Message from goose.cli.prompt.goose_prompt_session import GoosePromptSession from goose.cli.prompt.user_input import PromptAction, UserInput from goose.cli.session import Session diff --git a/tests/conftest.py b/tests/conftest.py index 97506657..1255240f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -4,7 +4,7 @@ from unittest.mock import Mock, patch import pytest -from exchange import Exchange +from ai_exchange import Exchange from goose.profile import Profile diff --git a/tests/utils/test_ask.py b/tests/utils/test_ask.py index 419f3a5b..3b10423e 100644 --- a/tests/utils/test_ask.py +++ b/tests/utils/test_ask.py @@ -1,7 +1,7 @@ from unittest.mock import MagicMock, patch import pytest -from exchange import Exchange +from ai_exchange import Exchange from goose.utils.ask import ask_an_ai, clear_exchange, replace_prompt diff --git a/tests/utils/test_session_file.py b/tests/utils/test_session_file.py index d922bd81..7fe0b87e 100644 --- a/tests/utils/test_session_file.py +++ b/tests/utils/test_session_file.py @@ -1,7 +1,7 @@ from pathlib import Path import pytest -from exchange import Message +from ai_exchange import Message from goose.utils.session_file import list_sorted_session_files, read_from_file, session_file_exists, write_to_file