TogetherAI just announced JSON mode and function calling for their models. It currently supports these models: Mixtral, Mistra, and CodeLlama. How do we implement this? Using either Langchain or CrewAI.
This is how I use their model in my agent.
self.MistralLLM = openai.ChatOpenAI(
base_url="https://api.together.xyz/v1",
api_key=os.getenv('TOGETHER_APIKEY'),
temperature=0.75,
model="mistralai/Mistral-7B-Instruct-v0.2")
Its hard for these models to follow simple instructions like return JSON and be consistent with it even when you scream at them in the system prompts. Does anyone know how to enforce this or found a hacky way?
TogetherAI just announced JSON mode and function calling for their models. It currently supports these models: Mixtral, Mistra, and CodeLlama. How do we implement this? Using either Langchain or CrewAI.
This is how I use their model in my agent.
Its hard for these models to follow simple instructions like
return JSONand be consistent with it even when you scream at them in the system prompts. Does anyone know how to enforce this or found a hacky way?