Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 2.16 KB

AI.md

File metadata and controls

46 lines (33 loc) · 2.16 KB

AI module

Usage

Please create a new json file called .hayde.json in your project root. This file will be used to configure the Hayde.

And then add AI to the plugins array.

{
  "plugins": [
    "general",
    "AI",
  ]
}

For now, you can just use general and AI plugins together. There is no need to use other plugins.

Information

Currently it only supports OpenAI and Ollama as AI tools. But we are planning to add more AI tools in the future.

On OpenAI, it works properly with all gpt engines. On Ollama, we tested hayde with llama2 engines.

Requirements

If you want to use OpenAI, you need to set OPENAI_API_KEY environment variable. You can get your api key from here.

If you want to use Ollama, you need to set OLLAMA_URL environment variable. For example; http://localhost:11434 Don't forget to run Ollama server.

Options

Option Description Default Type
aiTool "openAI", "ollama" "openAI" string
compDescription Component Description - string
styleLibrary "chakraUI", "materialUI", "none" - string
isTS Do you want to get typescript component? true boolean
modelName Model name depends on AI Tool - string
aiCreateStorybook Do you want story file of component? false boolean
aiCreateTest Do you want test file of component? false boolean
openAIVisionType "url", "fileUpload" "url" string
openAIVisionUrl Image URL that will be used by Gpt Vision - string
openAIVisionFile Image file path that will be used by Gpt Vision - string
openAIType "vision", "text" "text" string