LLM

class pipecat.services.together.llm.TogetherLLMService(*, api_key, base_url='https://api.together.xyz/v1', model='meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo', **kwargs)[source]

Bases: OpenAILLMService

A service for interacting with Together.ai’s API using the OpenAI-compatible interface.

This service extends OpenAILLMService to connect to Together.ai’s API endpoint while maintaining full compatibility with OpenAI’s interface and functionality.

Parameters:
  • api_key (str) – The API key for accessing Together.ai’s API

  • base_url (str, optional) – The base URL for Together.ai API. Defaults to “https://api.together.xyz/v1

  • model (str, optional) – The model identifier to use. Defaults to “meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo”

  • **kwargs – Additional keyword arguments passed to OpenAILLMService

create_client(api_key=None, base_url=None, **kwargs)[source]

Create OpenAI-compatible client for Together.ai API endpoint.