import os from dotenv import load_dotenv from projectdavid import Entity load_dotenv(".tests.env") client = Entity( base_url=os.getenv("PROJECT_DAVID_PLATFORM_BASE_URL"), api_key=os.getenv("DEV_PROJECT_DAVID_CORE_TEST_USER_KEY"), ) # ------------------------------------------ # create_assistant # -------------------------------------------- assistant = client.assistants.create_assistant( name="Test Assistant", model="gpt-oss-120b", instructions="You are a helpful AI assistant, your name is David", tools=[ {"type": "code_interpreter"}, {"type": "computer"}, {"type": "file_search"}, {"type": "web_search"}, { "type": "function", "function": { "name": "get_flight_times", "description": "Get flight times", "parameters": { "type": "object", "properties": { "departure": {"type": "string"}, "arrival": {"type": "string"}, }, "required": ["departure", "arrival"], }, }, }, ], ) print(assistant.id) print(assistant.instructions)