openai-assistant.mdx 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ---
  2. title: 'OpenAI Assistant'
  3. ---
  4. ### Arguments
  5. <ParamField path="name" type="string">
  6. Name for your AI assistant
  7. </ParamField>
  8. <ParamField path="instructions" type="string">
  9. how the Assistant and model should behave or respond
  10. </ParamField>
  11. <ParamField path="assistant_id" type="string">
  12. Load existing OpenAI Assistant. If you pass this, you don't have to pass other arguments.
  13. </ParamField>
  14. <ParamField path="thread_id" type="string">
  15. Existing OpenAI thread id if exists
  16. </ParamField>
  17. <ParamField path="model" type="str" default="gpt-4-1106-preview">
  18. OpenAI model to use
  19. </ParamField>
  20. <ParamField path="tools" type="list">
  21. OpenAI tools to use. Default set to `[{"type": "retrieval"}]`
  22. </ParamField>
  23. <ParamField path="data_sources" type="list" default="[]">
  24. Add data sources to your assistant. You can add in the following format: `[{"source": "https://example.com", "data_type": "web_page"}]`
  25. </ParamField>
  26. <ParamField path="telemetry" type="boolean" default="True">
  27. Anonymous telemetry (doesn't collect any user information or user's files). Used to improve the Embedchain package utilization. Default is `True`.
  28. </ParamField>
  29. ## Usage
  30. For detailed guidance on creating your own OpenAI Assistant, click the link below. It provides step-by-step instructions to help you through the process:
  31. <Card title="Guide to Creating Your OpenAI Assistant" icon="link" href="/examples/openai-assistant">
  32. Learn how to build an OpenAI Assistant using the `OpenAIAssistant` class.
  33. </Card>