diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 6eb0072..dd93962 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} USER vscode -RUN curl -sSf https://rye-up.com/get | RYE_VERSION="0.15.2" RYE_INSTALL_OPTION="--yes" bash +RUN curl -sSf https://rye-up.com/get | RYE_VERSION="0.24.0" RYE_INSTALL_OPTION="--yes" bash ENV PATH=/home/vscode/.rye/shims:$PATH RUN echo "[[ -d .venv ]] && source .venv/bin/activate" >> /home/vscode/.bashrc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aea1868..fca066e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,10 +2,10 @@ name: CI on: push: branches: - - stainless + - main pull_request: branches: - - stainless + - main jobs: lint: @@ -21,7 +21,7 @@ jobs: curl -sSf https://rye-up.com/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: 0.15.2 + RYE_VERSION: 0.24.0 RYE_INSTALL_OPTION: "--yes" - name: Install dependencies diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 14ddce2..962b8c4 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -21,7 +21,7 @@ jobs: curl -sSf https://rye-up.com/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: 0.15.2 + RYE_VERSION: 0.24.0 RYE_INSTALL_OPTION: "--yes" - name: Publish to PyPI diff --git a/README.md b/README.md index 5c0abdd..449ef18 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Groq Python API library -[![PyPI version](https://img.shields.io/pypi/v/groq.svg)](https://pypi.org/project/groq/) +[![PyPI version](https://img.shields.io/pypi/v/groq-sdk.svg)](https://pypi.org/project/groq-sdk/) The Groq Python library provides convenient access to the Groq REST API from any Python 3.7+ application. The library includes type definitions for all request params and response fields, @@ -13,7 +13,7 @@ The REST API documentation can be found [on console.groq.com](https://console.gr ## Installation ```sh -pip install groq +pip install groq-sdk ``` ## Usage @@ -261,9 +261,9 @@ completion = response.parse() # get the object that `chat.completions.create()` print(completion.id) ``` -These methods return an [`APIResponse`](https://github.com/groq/groq-python/tree/stainless/src/groq/_response.py) object. +These methods return an [`APIResponse`](https://github.com/groq/groq-python/tree/main/src/groq/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/groq/groq-python/tree/stainless/src/groq/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. +The async client returns an [`AsyncAPIResponse`](https://github.com/groq/groq-python/tree/main/src/groq/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` diff --git a/pyproject.toml b/pyproject.toml index f3c156b..9a9918f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "groq" +name = "groq-sdk" version = "0.1.0" description = "The official Python library for the groq API" readme = "README.md" diff --git a/requirements-dev.lock b/requirements-dev.lock index a0134d6..36fa001 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -5,48 +5,92 @@ # pre: false # features: [] # all-features: true +# with-sources: false -e file:. annotated-types==0.6.0 + # via pydantic anyio==4.1.0 + # via groq-sdk + # via httpx argcomplete==3.1.2 + # via nox attrs==23.1.0 + # via pytest certifi==2023.7.22 + # via httpcore + # via httpx colorlog==6.7.0 + # via nox dirty-equals==0.6.0 distlib==0.3.7 + # via virtualenv distro==1.8.0 + # via groq-sdk exceptiongroup==1.1.3 + # via anyio filelock==3.12.4 + # via virtualenv h11==0.14.0 + # via httpcore httpcore==1.0.2 + # via httpx httpx==0.25.2 + # via groq-sdk + # via respx idna==3.4 + # via anyio + # via httpx importlib-metadata==7.0.0 iniconfig==2.0.0 + # via pytest mypy==1.7.1 mypy-extensions==1.0.0 + # via mypy nodeenv==1.8.0 + # via pyright nox==2023.4.22 packaging==23.2 + # via nox + # via pytest platformdirs==3.11.0 + # via virtualenv pluggy==1.3.0 + # via pytest py==1.11.0 + # via pytest pydantic==2.4.2 + # via groq-sdk pydantic-core==2.10.1 + # via pydantic pyright==1.1.332 pytest==7.1.1 + # via pytest-asyncio pytest-asyncio==0.21.1 python-dateutil==2.8.2 + # via time-machine pytz==2023.3.post1 + # via dirty-equals respx==0.20.2 ruff==0.1.9 +setuptools==68.2.2 + # via nodeenv six==1.16.0 + # via python-dateutil sniffio==1.3.0 + # via anyio + # via groq-sdk + # via httpx time-machine==2.9.0 tomli==2.0.1 + # via mypy + # via pytest typing-extensions==4.8.0 + # via groq-sdk + # via mypy + # via pydantic + # via pydantic-core virtualenv==20.24.5 + # via nox zipp==3.17.0 -# The following packages are considered to be unsafe in a requirements file: -setuptools==68.2.2 + # via importlib-metadata diff --git a/requirements.lock b/requirements.lock index 2022a5c..579ab69 100644 --- a/requirements.lock +++ b/requirements.lock @@ -5,18 +5,39 @@ # pre: false # features: [] # all-features: true +# with-sources: false -e file:. annotated-types==0.6.0 + # via pydantic anyio==4.1.0 + # via groq-sdk + # via httpx certifi==2023.7.22 + # via httpcore + # via httpx distro==1.8.0 + # via groq-sdk exceptiongroup==1.1.3 + # via anyio h11==0.14.0 + # via httpcore httpcore==1.0.2 + # via httpx httpx==0.25.2 + # via groq-sdk idna==3.4 + # via anyio + # via httpx pydantic==2.4.2 + # via groq-sdk pydantic-core==2.10.1 + # via pydantic sniffio==1.3.0 + # via anyio + # via groq-sdk + # via httpx typing-extensions==4.8.0 + # via groq-sdk + # via pydantic + # via pydantic-core