Skip to main content

dspy.Together

Usage

lm = dspy.Together(model="mistralai/Mistral-7B-v0.1")

Constructor

The constructor initializes the base class LM and verifies the api_key for using Together API. We expect the following environment variables to be set:

  • TOGETHER_API_KEY: API key for Together.
  • TOGETHER_API_BASE: API base URL for Together.
class Together(HFModel):
def __init__(self, model, **kwargs):

Parameters:

  • model (str): models hosted on Together.
  • stop (List[str], optional): List of stopping tokens to end generation.

Methods

Refer to dspy.OpenAI documentation.