faq.mdx 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. ---
  2. title: ❓ FAQs
  3. description: 'Collections of all the frequently asked questions'
  4. ---
  5. #### How to use `gpt-4-turbo` model released on OpenAI DevDay?
  6. <CodeGroup>
  7. ```python main.py
  8. import os
  9. from embedchain import Pipeline as App
  10. os.environ['OPENAI_API_KEY'] = 'xxx'
  11. # load llm configuration from gpt4_turbo.yaml file
  12. app = App.from_config(yaml_path="gpt4_turbo.yaml")
  13. ```
  14. ```yaml gpt4_turbo.yaml
  15. llm:
  16. provider: openai
  17. config:
  18. model: 'gpt-4-turbo'
  19. temperature: 0.5
  20. max_tokens: 1000
  21. top_p: 1
  22. stream: false
  23. ```
  24. </CodeGroup>
  25. #### How to use GPT-4 as the LLM model?
  26. <CodeGroup>
  27. ```python main.py
  28. import os
  29. from embedchain import Pipeline as App
  30. os.environ['OPENAI_API_KEY'] = 'xxx'
  31. # load llm configuration from gpt4.yaml file
  32. app = App.from_config(yaml_path="gpt4.yaml")
  33. ```
  34. ```yaml gpt4.yaml
  35. llm:
  36. provider: openai
  37. config:
  38. model: 'gpt-4'
  39. temperature: 0.5
  40. max_tokens: 1000
  41. top_p: 1
  42. stream: false
  43. ```
  44. </CodeGroup>
  45. #### I don't have OpenAI credits. How can I use some open source model?
  46. <CodeGroup>
  47. ```python main.py
  48. import os
  49. from embedchain import Pipeline as App
  50. os.environ['OPENAI_API_KEY'] = 'xxx'
  51. # load llm configuration from opensource.yaml file
  52. app = App.from_config(yaml_path="opensource.yaml")
  53. ```
  54. ```yaml opensource.yaml
  55. llm:
  56. provider: gpt4all
  57. config:
  58. model: 'orca-mini-3b.ggmlv3.q4_0.bin'
  59. temperature: 0.5
  60. max_tokens: 1000
  61. top_p: 1
  62. stream: false
  63. embedder:
  64. provider: gpt4all
  65. config:
  66. model: 'all-MiniLM-L6-v2'
  67. ```
  68. </CodeGroup>
  69. #### How to contact support?
  70. If docs aren't sufficient, please feel free to reach out to us using one of the following methods:
  71. <Snippet file="get-help.mdx" />