Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix config tests #343

Merged
merged 3 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .github/workflows/sarah-test.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Install poetry
run: pipx install poetry

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "poetry"

- name: Install poetry
run: pip install poetry

- name: Set Poetry config
run: |
Expand Down
11 changes: 2 additions & 9 deletions memgpt/cli/cli_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,11 @@ def configure():
endpoint_options += ["openai"]

assert len(endpoint_options) > 0, "No endpoints found. Please enable OpenAI, Azure, or set OPENAI_API_BASE."
if len(endpoint_options) == 1:
default_endpoint = endpoint_options[0]
else:
default_endpoint = questionary.select("Select default inference endpoint:", endpoint_options).ask()
default_endpoint = questionary.select("Select default inference endpoint:", endpoint_options).ask()

# configure embedding provider
endpoint_options.append("local") # can compute embeddings locally
if len(endpoint_options) == 1:
default_embedding_endpoint = endpoint_options[0]
print(f"Using embedding endpoint {default_embedding_endpoint}")
else:
default_embedding_endpoint = questionary.select("Select default embedding endpoint:", endpoint_options).ask()
default_embedding_endpoint = questionary.select("Select default embedding endpoint:", endpoint_options).ask()

# configure embedding dimentions
default_embedding_dim = 1536
Expand Down
1 change: 0 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def test_save_load():
child.expect("Empty input received. Try again!", timeout=TIMEOUT)
child.sendline("/save")

child.expect("Saved local", timeout=TIMEOUT)
child.expect("Enter your message:", timeout=TIMEOUT)
child.sendline("/exit")

Expand Down
6 changes: 6 additions & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ def configure_memgpt(enable_openai=True, enable_azure=False):
else:
child.sendline("n")

child.expect("Select default inference endpoint:", timeout=TIMEOUT)
child.sendline()

child.expect("Select default embedding endpoint:", timeout=TIMEOUT)
child.sendline()

child.expect("Select default preset:", timeout=TIMEOUT)
child.sendline()

Expand Down
Loading