API / Calling Function - Same output as input

Hi, I haven’t used the json option yet sothat might be where your issue is arising but not sure. I got it to work in my Colab notebook without json. Here is the code:

job_titles = [
    "(Senior) HR Partner / (Senior) Personalreferent (m/w/d)",
    "Business Development Manager, OEM (San Francisco Bay Area, Pacific Northwest)",
    "3) Field Service Specialist (Maryland)",
    "Director, Head of R&D Gdansk (Enzymes)",
    "Praktikum Finance - Corporate Controlling (m/w/d)",
    "Senior Medical Director, TB & Infectious Diseases"
]

for job in job_titles:
    response = client.chat.completions.create(
        model="gpt-3.5-turbo",
        messages=[
            {
                "role": "system",
                "content": "You are an expert at analyzing job titles. Your job is to filter out the pure job title. Make sure that no information such as location, gender, type of employment, seniority level or other additional information is included when returning the job title."
            },
            {
                "role": "user",
                "content": job
            }
        ],
        temperature=1,
        max_tokens=256,
        top_p=1,
        frequency_penalty=0,
        presence_penalty=0
    )
    print(response.choices[0].message.content)

I hope this helps :slight_smile:
Mim