Skip to content

Commit

Permalink
Removing Deprecated model to fix Integration Tests (#5)
Browse files Browse the repository at this point in the history
* Removing Deprecated model

* Moving readme changes to root

---------

Co-authored-by: “Mark <“[email protected]”>
  • Loading branch information
TechnoFinch and “Mark authored Aug 30, 2024
1 parent e1e3fb7 commit c609001
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,25 @@
This repository contains 1 package with Together integrations with LangChain:

- [langchain-together](https://pypi.org/project/langchain-together/)

## 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
```
2 changes: 1 addition & 1 deletion libs/together/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ 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.
Use `togethercomputer/m2-bert-80M-8k-retrieval` as the default model for embeddings.
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 c609001

Please sign in to comment.