- Issue created by @marcus_johansson
- ๐จ๐ฆCanada RobLoach Earth
Looks good, thanks. Do we need to update the docs for this? Seems intuitive enough to not really need mentioning ๐คท
The other thing I'd like to have when entering
drush ai
is an interactive shell that continuously chats with you back and forth. - ๐ฎ๐ณIndia abhinesh
Thanks @ marcus_johansson โ and @ robloach โ ! The current implementation is intuitive and doesnโt require additional documentation. As noted, it would be great to explore the possibility of having an interactive shell mode for drush ai in future iterations โ where it maintains a continuous back-and-forth chat experience.
- ๐ฉ๐ชGermany marcus_johansson
I made a slight change in the order, so the interactive prompt doesn't show up if no default or set provider is set. Please rereview.
- ๐ฎ๐ณIndia annmarysruthy
Reviewed the changes. Looks good to me. Tested scenarios:
- Without any provider: got error "No default AI provider or model set" but 2 warnings:
[warning] Trying to access array offset on null AiCommands.php:84
[warning] Trying to access array offset on null AiCommands.php:85 - Using invalid free tier key with openai provider. Input was accepted. Error: Unable to fetch response: Too Many Requests
- Using valid key with Openai. Interactive prompt appeared, accepted input and output was displayed successfully.
- Deleted the key from last step. Provider settings was kept the same as last step: Intercative prompt is displayed, accepted input from user, displayed "fetching Response.." and error: "Unable to fetch response: Error invoking model response: Could not load the OpenAI API key, please check your environment settings or your setup key."
- Without any provider: got error "No default AI provider or model set" but 2 warnings:
- ๐ฎ๐ณIndia prashant.c Dharamshala
I tried the following:
1.
drush ai "what is Drupal?"
It is showing "Fetching response..." as a loader.
2.drush ai
showing interactive input and shows "Fetching response..." as a loader.
3.drush ai
by default works for chat only, is it supposed to work forai:translate-entity
ai:translate-text
also? - ๐จ๐ฆCanada RobLoach Earth
Hmm, perhaps something changed in the API. Thanks for the testing.