import openai
import dspy
import json


with open("creds.json", "r") as creds:
    api_key = json.loads(creds.read())["openai_key"]


lm = dspy.OpenAI(model='gpt-4', api_key=api_key, model_type='chat', max_tokens = 500)

dspy.settings.configure(lm=lm)