Skip to content

Commit

Permalink
Removing Deprecated model
Browse files Browse the repository at this point in the history
  • Loading branch information
“Mark authored and “Mark committed Aug 30, 2024
1 parent e1e3fb7 commit 966b669
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
22 changes: 22 additions & 0 deletions libs/together/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,25 @@ NEED to add image endpoint + completions endpoint as well
See a [usage example](https://python.langchain.com/docs/integrations/text_embedding/together/)

Use `togethercomputer/m2-bert-80M-8k-retrieval` as the default model for embeddings.

## Setup for testing

```bash
cd libs/together
poetry install --with lint,typing,test,test_integration,
```

## Running the Unit Tests

```bash
cd libs/together
make tests
```

## Running the Integration Tests

```bash
cd libs/together
export TOGETHER_API_KEY=<your-api-key>
make integration_tests
```
4 changes: 2 additions & 2 deletions libs/together/tests/integration_tests/test_llms.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
def test_together_call() -> None:
"""Test simple call to together."""
llm = Together( # type: ignore[call-arg]
model="togethercomputer/RedPajama-INCITE-7B-Base",
model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
temperature=0.2,
max_tokens=250,
)
Expand All @@ -27,7 +27,7 @@ def test_together_call() -> None:
async def test_together_acall() -> None:
"""Test simple call to together."""
llm = Together( # type: ignore[call-arg]
model="togethercomputer/RedPajama-INCITE-7B-Base",
model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
temperature=0.2,
max_tokens=250,
)
Expand Down
10 changes: 5 additions & 5 deletions libs/together/tests/unit_tests/test_llms.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_together_api_key_is_secret_string() -> None:
"""Test that the API key is stored as a SecretStr."""
llm = Together(
together_api_key="secret-api-key", # type: ignore[call-arg]
model="togethercomputer/RedPajama-INCITE-7B-Base",
model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
temperature=0.2,
max_tokens=250,
)
Expand All @@ -23,7 +23,7 @@ def test_together_api_key_masked_when_passed_from_env(
"""Test that the API key is masked when passed from an environment variable."""
monkeypatch.setenv("TOGETHER_API_KEY", "secret-api-key")
llm = Together( # type: ignore[call-arg]
model="togethercomputer/RedPajama-INCITE-7B-Base",
model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
temperature=0.2,
max_tokens=250,
)
Expand All @@ -39,7 +39,7 @@ def test_together_api_key_masked_when_passed_via_constructor(
"""Test that the API key is masked when passed via the constructor."""
llm = Together(
together_api_key="secret-api-key", # type: ignore[call-arg]
model="togethercomputer/RedPajama-INCITE-7B-Base",
model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
temperature=0.2,
max_tokens=250,
)
Expand All @@ -53,7 +53,7 @@ def test_together_uses_actual_secret_value_from_secretstr() -> None:
"""Test that the actual secret value is correctly retrieved."""
llm = Together(
together_api_key="secret-api-key", # type: ignore[call-arg]
model="togethercomputer/RedPajama-INCITE-7B-Base",
model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
temperature=0.2,
max_tokens=250,
)
Expand All @@ -64,7 +64,7 @@ def test_together_uses_actual_secret_value_from_secretstr_api_key() -> None:
"""Test that the actual secret value is correctly retrieved."""
llm = Together(
api_key="secret-api-key", # type: ignore[arg-type]
model="togethercomputer/RedPajama-INCITE-7B-Base",
model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
temperature=0.2,
max_tokens=250,
)
Expand Down

0 comments on commit 966b669

Please sign in to comment.