You can store pairs of input variables and output datasets in Baserun Datasets, which can be utilized for fine-tuning and evaluation in the future.

completion.variable(key: str, value: str, metadata: Optional[Dict] = None) -> Tag:

Arguments

key
string
required
value
string
required
metadata
object

Instructions

from baserun import OpenAI

def example():
    client = OpenAI()
    city = input()
    completion = client.chat.completions.create(
        model="gpt-4o",
        temperature=0.7,
        messages=[
            {
                "role": "user",
                "content": f"What are three activities to do in {city}?"
            }
        ],
    )
    completion.variable("city", city)