Update TogetherLLMService docstrings
This commit is contained in:
@@ -4,6 +4,8 @@
|
|||||||
# SPDX-License-Identifier: BSD 2-Clause License
|
# SPDX-License-Identifier: BSD 2-Clause License
|
||||||
#
|
#
|
||||||
|
|
||||||
|
"""Together.ai LLM service implementation using OpenAI-compatible interface."""
|
||||||
|
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
from pipecat.services.openai.llm import OpenAILLMService
|
from pipecat.services.openai.llm import OpenAILLMService
|
||||||
@@ -16,10 +18,10 @@ class TogetherLLMService(OpenAILLMService):
|
|||||||
maintaining full compatibility with OpenAI's interface and functionality.
|
maintaining full compatibility with OpenAI's interface and functionality.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
api_key (str): The API key for accessing Together.ai's API
|
api_key: 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"
|
base_url: 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"
|
model: The model identifier to use. Defaults to "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo".
|
||||||
**kwargs: Additional keyword arguments passed to OpenAILLMService
|
**kwargs: Additional keyword arguments passed to OpenAILLMService.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@@ -33,6 +35,15 @@ class TogetherLLMService(OpenAILLMService):
|
|||||||
super().__init__(api_key=api_key, base_url=base_url, model=model, **kwargs)
|
super().__init__(api_key=api_key, base_url=base_url, model=model, **kwargs)
|
||||||
|
|
||||||
def create_client(self, api_key=None, base_url=None, **kwargs):
|
def create_client(self, api_key=None, base_url=None, **kwargs):
|
||||||
"""Create OpenAI-compatible client for Together.ai API endpoint."""
|
"""Create OpenAI-compatible client for Together.ai API endpoint.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
api_key: The API key to use for the client. If None, uses instance api_key.
|
||||||
|
base_url: The base URL for the API. If None, uses instance base_url.
|
||||||
|
**kwargs: Additional keyword arguments passed to the parent create_client method.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
An OpenAI-compatible client configured for Together.ai's API.
|
||||||
|
"""
|
||||||
logger.debug(f"Creating Together.ai client with api {base_url}")
|
logger.debug(f"Creating Together.ai client with api {base_url}")
|
||||||
return super().create_client(api_key, base_url, **kwargs)
|
return super().create_client(api_key, base_url, **kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user