Account created on 4 May 2006, over 18 years ago
  • Senior Technical Project Manager at LullabotΒ 
#

Merge Requests

Recent comments

πŸ‡ΊπŸ‡ΈUnited States sirkitree

There's some great docs Marcus started here which cover the following:

  • Getting Started
  • Why base on the AI module?
  • Making AI Calls
  • Develop an AI Provider
  • Develop a third-party module
  • Contribute to the AI module
  • Events

I'm going to use this issue as a means of reviewing those and making some grammar updates I've noticed, but I also want to ask: is there anything missing specifically that I can write up?

πŸ“Œ | AI | Add Readme
πŸ‡ΊπŸ‡ΈUnited States sirkitree

Do we have enough to close this issue now? If not, what parts are missing?

1. What the module is.

AI (artificial intelligence) integration for Drupal - a unified framework for integrating various AI models and services into your Drupal site.

2. How to install it.

## Getting Started

1. Enable the AI module.
2. Choose and enable an AI provider submodule (e.g., OpenAI, Huggingface, Mistral).
3. Configure your API key in the Key module.
4. Configure the AI module at `/admin/config/ai/settings`.
5. Enable desired submodules for specific functionality.

3. Example setup (install module, openai provider and goto explorer and test a chat message).
Nothing specifically about this ...

4. External links to provider lists.
Some good info in https://project.pages.drupalcode.org/ai/modules/providers/provider_ollama/

5. Internal links to submodules README.
Submodules that have readmes are listed under modules: https://project.pages.drupalcode.org/ai/

πŸ“Œ | AI | Add Readme
πŸ‡ΊπŸ‡ΈUnited States sirkitree

Thanks! Here's a Draft MR: https://git.drupalcode.org/project/ai/-/merge_requests/78

update to .gitlab-ci.yml

- add in the pages section for building mkdocs (untested as i've never used this feature before)

adding build-docs.py

- a basic script that will
- copy the main readme into docs as index.md
- search through submodule dirs for README files
- copy those into the appropriate destination in docs

adding mkdocs.yml

- defines the basic structure of the documentation site for us with mkdocs
- note this will need to be manually updated for any new README created in submodules

Adding basic README and beginning of structure for docs

- Basic README and corresponding index in /docs
- copied documentation from docs.drupal.org in md format inot /docs
- copied the README's found in submodules into /docs with mirrored structure as index.md files

πŸ‡ΊπŸ‡ΈUnited States sirkitree

I am encountering this problem. I did not have a default set for chat and so when creating the assistant I received the error. After finding this issue, I switched to this branch, and saved a default provider, yet when adding a new assistant am receiving the following error:


TypeError: Cannot assign null to property Drupal\ai_assistant_api\Entity\AiAssistant::$rag_enabled of type bool in Drupal\Core\Entity\EntityBase->__construct() (line 63 of core/lib/Drupal/Core/Entity/EntityBase.php).
Drupal\Core\Config\Entity\ConfigEntityBase->__construct(Array, 'ai_assistant') (Line: 418)
Drupal\Core\Entity\EntityStorageBase->mapFromStorageRecords(Array) (Line: 186)

Happy to create a new issue if you see fit, but this seems relevant.

πŸ“Œ | AI | Add Readme
πŸ‡ΊπŸ‡ΈUnited States sirkitree

Hi there!

After pouring through the various links and getting up to speed with the Slack chat and the 3 videos released for alpha 6, I'm looking to contribute time to this module and thought I'd start with docs. I was surprised there wasn't already a README and found this issue. Perhaps I can help?

---
Proposed action plan:

1. Create a Minimal Viable README
- Focus on essential information only
- Include:
- Brief module description
- Basic installation instructions
- Simple usage example
- Link to full documentation (to be developed)

2. Set Up Documentation Infrastructure
- Create a build-docs script that reads the docs from [Drupal documentation]( https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... β†’ )
- creates the sub-files in the docs folder in the main repository
- can utilize the REST API to get doc body but would need to list the node IDs because relationship information doesn't exist >:|
- ex: AI β†’ , How to set up a provider β†’ , AI: How to use it or integrate it in contrib modules β†’

3. Develop Documentation Incrementally
- Start with core module functionality
- Add sections for each major feature/API
- Include code examples for developers
- Run the build-docs script anytime docs change
---

This would address @marcus_johansson's comment above:

I'm wondering if there is someway to make subpages in markdown from the Drupal documentation, so we don't have to rewrite the same documentation twice.

See https://git.drupalcode.org/issue/ai-3455852/-/compare/1.0.x...3455852-bu... where I have a branch with a working POC.

πŸ“Œ | AI | Add Readme
πŸ‡ΊπŸ‡ΈUnited States sirkitree

sirkitree β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡ΈUnited States sirkitree

Can confirm that pulling the dev version worked. I used ddev composer require 'drupal/ai_interpolator_openai:^1.0@dev' rather than modify the composer.json.

πŸ‡ΊπŸ‡ΈUnited States sirkitree

I was unable to replicate this with a fresh drupal10 install using OSX, colima, ddev
```
ddev composer require 'drupal/ai_interpolator:^1.0@alpha'
ddev composer require 'drupal/openai:^1.0@beta'
ddev composer require 'drupal/ai_interpolator_openai:^1.0@alpha'
```
- modified Story content type
- added new field labeled 'Automated Summary'
- saved, saved settings on config page

No errors presented.

Note that I had not configured the module yet...

As soon as I put in my OpenAI API key and went to configure the field, I got the following error:
```
Fatal error: Declaration of Drupal\ai_interpolator_openai\OpenAiBase::generate(string $prompt, Drupal\Core\Entity\ContentEntityInterface $entity, Drupal\Core\Field\FieldDefinitionInterface $fieldDefinition, array $interpolatorConfig) must be compatible with Drupal\ai_interpolator\Annotation\AiInterpolatorFieldRule::generate(Drupal\Core\Entity\ContentEntityInterface $entity, Drupal\Core\Field\FieldDefinitionInterface $fieldDefinition, array $interpolatorConfig) in /var/www/html/web/modules/contrib/ai_interpolator_openai/src/OpenAiBase.php on line 102
```

Production build 0.71.5 2024