Skip to content

Commit

Permalink
update llm
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnl committed Mar 29, 2024
1 parent de8746c commit d4a3fdb
Show file tree
Hide file tree
Showing 23 changed files with 15 additions and 13 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,23 @@ jobs:
uses: snok/install-poetry@v1.3.1

- name: Install dependencies
run: poetry install --with dev anthropic
run: poetry install --with dev,anthropic

- name: Run tests
run: poetry run pytest tests/ -k "not openai"
run: poetry run pytest tests/ -k "not llm"
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

- name: Generate coverage report
if: matrix.python-version == '3.11'
run: |
poetry run coverage run -m pytest tests/ -k "not openai"
poetry run coverage run -m pytest tests/ -k "not llm"
poetry run coverage report
poetry run coverage html
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}

- name: Coveralls GitHub Action
if: matrix.python-version == '3.11'
Expand Down
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pydantic import BaseModel

from instructor.function_calls import Mode
from tests.openai.util import models, modes
from ..util import models, modes


class Labels(str, enum.Enum):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pydantic import BaseModel

from instructor.function_calls import Mode
from tests.openai.util import models, modes
from ..util import models, modes


class SinglePrediction(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import instructor

from instructor.function_calls import Mode
from tests.openai.util import models, modes
from ..util import models, modes


class Property(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pydantic import BaseModel
import instructor
from instructor.function_calls import Mode
from tests.openai.util import models, modes
from ..util import models, modes


class UserDetails(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest

import instructor
from tests.openai.util import models, modes
from .util import models, modes


class Item(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest

import instructor
from tests.openai.util import models, modes
from .util import models, modes


class User(BaseModel):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pytest
import instructor

from tests.openai.util import models, modes
from .util import models, modes


class UserExtract(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
import instructor
from itertools import product
from tests.openai.util import models, modes
from .util import models, modes


def uppercase_validator(v):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import instructor
from instructor.dsl.partial import Partial

from tests.openai.util import models, modes
from .util import models, modes


class UserExtract(BaseModel):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pydantic import BaseModel, AfterValidator, BeforeValidator, ValidationError

from instructor.dsl.validators import llm_validator
from tests.openai.util import models, modes
from .util import models, modes


def test_patch_completes_successfully(client):
Expand Down
File renamed without changes.

0 comments on commit d4a3fdb

Please sign in to comment.