You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/partners/groq
Bagatur 8461934c2b
core[patch], integrations[patch]: convert TypedDict to tool schema support (#24641)
supports following UX

```python
    class SubTool(TypedDict):
        """Subtool docstring"""

        args: Annotated[Dict[str, Any], {}, "this does bar"]

    class Tool(TypedDict):
        """Docstring
        Args:
            arg1: foo
        """

        arg1: str
        arg2: Union[int, str]
        arg3: Optional[List[SubTool]]
        arg4: Annotated[Literal["bar", "baz"], ..., "this does foo"]
        arg5: Annotated[Optional[float], None]
```

- can parse google style docstring
- can use Annotated to specify default value (second arg)
- can use Annotated to specify arg description (third arg)
- can have nested complex types
2 months ago
..
langchain_groq core[patch], integrations[patch]: convert TypedDict to tool schema support (#24641) 2 months ago
scripts partner: Add groq partner integration and chat model (#17856) 7 months ago
tests standard-tests[patch]: update groq and structured output test (#24781) 2 months ago
.gitignore partner: Add groq partner integration and chat model (#17856) 7 months ago
LICENSE partner: Add groq partner integration and chat model (#17856) 7 months ago
Makefile infra: update mypy 1.10, ruff 0.5 (#23721) 3 months ago
README.md partner: Add groq partner integration and chat model (#17856) 7 months ago
poetry.lock integration releases (#24725) 2 months ago
pyproject.toml integration releases (#24725) 2 months ago

README.md

langchain-groq

Welcome to Groq! 🚀

At Groq, we've developed the world's first Language Processing Unit™, or LPU. The Groq LPU has a deterministic, single core streaming architecture that sets the standard for GenAI inference speed with predictable and repeatable performance for any given workload.

Beyond the architecture, our software is designed to empower developers like you with the tools you need to create innovative, powerful AI applications. With Groq as your engine, you can:

  • Achieve uncompromised low latency and performance for real-time AI and HPC inferences 🔥
  • Know the exact performance and compute time for any given workload 🔮
  • Take advantage of our cutting-edge technology to stay ahead of the competition 💪

Want more Groq? Check out our website for more resources and join our Discord community to connect with our developers!

Installation and Setup

Install the integration package:

pip install langchain-groq

Request an API key and set it as an environment variable

export GROQ_API_KEY=gsk_...

Chat Model

See a usage example.

Development

To develop the langchain-groq package, you'll need to follow these instructions:

Install dev dependencies

poetry install --with test,test_integration,lint,codespell

Build the package

poetry build

Run unit tests

Unit tests live in tests/unit_tests and SHOULD NOT require an internet connection or a valid API KEY. Run unit tests with

make tests

Run integration tests

Integration tests live in tests/integration_tests and require a connection to the Groq API and a valid API KEY.

make integration_tests

Lint & Format

Run additional tests and linters to ensure your code is up to standard.

make lint spell_check check_imports