#How to make Assistants
1 messages · Page 1 of 1 (latest)
Hi @frosty glen. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Sure, here's a step-by-step guide on how to create an Assistant using OpenAI's Assistants API:
- Create an Assistant: You can create an Assistant by defining its custom instructions and picking a model. If helpful, enable tools like Code Interpreter, Retrieval, and Function calling. Here's an example of creating an Assistant that is a personal math tutor, with the Code Interpreter tool enabled:
assistant = client.beta.assistants.create(
name="Math Tutor",
instructions="You are a personal math tutor. Write and run code to answer math questions.",
tools=[{"type": "code_interpreter"}],
model="gpt-4-1106-preview"
)
(Source: OpenAI Platform (https://platform.openai.com/docs/assistants/overview))
-
Create a Thread: When a user starts a conversation, create a Thread. This is not covered in the extracts provided, but you can refer to the OpenAI API documentation (https://platform.openai.com/docs/api-reference/threads) for more details.
-
Add Messages to the Thread: As the user asks questions, add Messages to the Thread. This is also not covered in the extracts provided, but you can refer to the OpenAI API documentation (https://platform.openai.com/docs/api-reference/messages) for more details.
-
Run the Assistant on the Thread: Trigger responses by running the Assistant on the Thread. This automatically calls the relevant tools. This is not covered in the extracts provided, but you can refer to the OpenAI API documentation (https://platform.openai.com/docs/api-reference/runs) for more details.
Please note that the Assistants API is in beta and OpenAI is actively working on adding more functionality. You can share your feedback in the OpenAI Developer Forum (https://community.openai.com/).
(Source: OpenAI Platform (https://platform.openai.com/docs/assistants/overview))
You can also explore the capabilities of the Assistants API using the Assistants playground (https://platform.openai.com/playground?mode=assistant) provided by OpenAI.
(Source: OpenAI Platform (https://platform.openai.com/docs/assistants/overview))
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@frosty glen kapa.ai is still learning and improving, please let us know how it did by reacting below

@fervent torrent write in Polish please.
Let me check the knowledge base for you. One moment! :books:
Pewnie, oto krok po kroku, jak stworzyć Asystenta za pomocą API Asystentów OpenAI:
- Utwórz Asystenta: Możesz utworzyć Asystenta, definiując jego niestandardowe instrukcje i wybierając model. Jeśli to pomocne, włącz narzędzia takie jak Interpreter Kodu, Odzyskiwanie i Wywoływanie funkcji. Oto przykład tworzenia Asystenta, który jest osobistym nauczycielem matematyki, z włączonym narzędziem Interpreter Kodu:
assistant = client.beta.assistants.create(
name="Nauczyciel Matematyki",
instructions="Jesteś osobistym nauczycielem matematyki. Napisz i uruchom kod, aby odpowiedzieć na pytania z matematyki.",
tools=[{{"type": "code_interpreter"}}],
model="gpt-4-1106-preview"
)
(Źródło: Platforma OpenAI (https://platform.openai.com/docs/assistants/overview))
-
Utwórz Wątek: Gdy użytkownik rozpoczyna rozmowę, utwórz Wątek. To nie jest omówione w dostarczonych fragmentach, ale możesz odwołać się do dokumentacji API OpenAI (https://platform.openai.com/docs/api-reference/threads) po więcej szczegółów.
-
Dodaj Wiadomości do Wątku: Gdy użytkownik zadaje pytania, dodaj Wiadomości do Wątku. To również nie jest omówione w dostarczonych fragmentach, ale możesz odwołać się do dokumentacji API OpenAI (https://platform.openai.com/docs/api-reference/messages) po więcej szczegółów.
-
Uruchom Asystenta na Wątku: Wywołaj odpowiedzi, uruchamiając Asystenta na Wątku. Automatycznie wywołuje to odpowiednie narzędzia. To nie jest omówione w dostarczonych fragmentach, ale możesz odwołać się do dokumentacji API OpenAI (https://platform.openai.com/docs/api-reference/runs) po więcej szczegółów.
Zwróć uwagę, że API Asystentów jest w wersji beta i OpenAI aktywnie pracuje nad dodaniem więcej funkcji. Możesz podzielić się swoją opinią na Forum Deweloperów OpenAI (https://community.openai.com/).
(Źródło: Platforma OpenAI (https://platform.openai.com/docs/assistants/overview))
Możesz również zbadać możliwości API Asystentów za pomocą placu zabaw Asystentów (https://platform.openai.com/playground?mode=assistant) dostarczanego przez OpenAI.