samadarshini/dual-agent-simulation
0
1import streamlit as st2import os3import pandas as pd4from together import Together5 6 7client = Together(api_key=os.environ["TOGETHER_API_KEY"])8 9 10def call_llama(prompt: str) -> str:11 """12 Send a prompt to the Llama model and return the response.13 Args:14 prompt (str): The input prompt to send to the Llama model.15 Returns:16 str: The response from the Llama model.17 """18 19 # Create a completion request with the prompt20 response = client.chat.completions.create(21 22 # Use the Llama-3-8b-chat-hf model23 model="meta-llama/Llama-3-8b-chat-hf",24 25 # Define the prompt as a user message26 messages=[27 {28 "role": "user",29 "content": prompt # Use the input prompt30 }31 ],32 temperature=0.7,33 )34 35 # Return the content of the first response message36 return response.choices[0].message.content37 