-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ai refactor #61
Merged
Merged
Ai refactor #61
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds rules to ignore certain directories of all demos
Only look at files in `/src` for demos
- Adds support for using HuggingFace models - Moves as much configuration as possible to ENV variables - Moves code related to AI to its own namespace - Replaces `tectalic/openai` with `guzzlehttp/guzzle`
# Conflicts: # .gitignore # composer.lock
# Conflicts: # docs/tech/classes/MissingDocBlocksGenerator.md # docs/tech/classes/ReadmeTemplateFiller.md # docs/tech/classes/TemplatesStructureGenerator.md # src/DocGenerator.php
These will be re-added in another branch
Refactors the AI provider interface to make adding additional AI providers easier
Updated prompt for template generation Option for template generation to be non-interactive
- Adds new configuration - Moves demo for template content
- Template generation no longer creates a structure that mirrors the namespaces - Changes template content generation to only generate content for structures that have been automatically generated - Renames commands/generators and prompts to better match - Moves commands over to AI namespace & adds shared parameters/configuration - Updates generators to allow easy overriding of system prompts - Adds back support for choosing OpenAI model if one not provided - Adds non-interactive mode for most commands
# Conflicts: # docs/classes/DocGenerator.md # docs/shared_c.cache # docs/tech/classes/DocGenerator.md
Removing for the moment, will be re-added in a later branch
- Switches to using custom config options - Has console command build the AI provider for use in functions - Switches to asking for provider/model/api key if not provided - Tests API key is valid
# Conflicts: # docs/classes/DocGenerator.md # docs/shared_c.cache # docs/tech/1.configuration/classes/PageLinkerPlugin.md # docs/tech/1.configuration/readme.md # docs/tech/4.pluginSystem/classes/PageLinkerPlugin.md # docs/tech/classes/DocBlocksGenerator.md # docs/tech/classes/DocGenerator.md # docs/tech/classes/PageLinkerPlugin.md # docs/tech/classes/ReadmeTemplateGenerator.md # docs/tech/classes/TemplateStructureGenerator.md
shcherbanich
approved these changes
Nov 1, 2023
protected function getCustomConfigOptionsMap(): array | ||
{ | ||
return [ | ||
'project_root' => 'Path to the directory of the documented project', | ||
'templates_dir' => 'Path to directory with documentation templates', | ||
'cache_dir' => 'Configuration parameter: Path to the directory where the documentation generator cache will be saved', | ||
'ai_provider' => 'The AI service to use, options: openai', | ||
'ai_api_key' => 'The API key to use when interacting with the AI', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the key is not required in the provider but other parameters are required? I think that then it’s worth getting the remaining parameters except the provider in the provider factory method
# Conflicts: # docs/shared_c.cache
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Description
Main Changes
tectalic/openai
withguzzlehttp/guzzle
ai_provider
,ai_api_key
&ai_model
from either configuration or parameters.Misc Changes
roave/security-advisorie
tocomposer.json
require-devIssue ticket number and link
Checklist before requesting a review