A new WebSearch gramplet is ready

Will the AI GrampsChat by @dsblank and WebSearch by @Urchello share a common configuration for the AI service provider?

This is a good question because I believe later we will have more and more addons which work with AI, and its not only about Gramps. Everything and everywhere. My current saving method is ini-file.

And Mistral is already working for me

2 Likes

Now Mistral supporting and several more fixes are available in Github

List of changes:

  • Add provider selector for AI services with per-provider API key support
  • Implement Mistral AI support
  • Add support for cross-links.csv to store cross-regional and language-oriented links
  • Replace outdated geneanet.org link in SV locale
  • Fix broken link to CDHF site in FR locale
  • Move “Australia Family Notices” link to dedicated CSV
  • Prioritize common_links, static_links, and uid_links in Settings UI
  • Rename “variables” to “keys” throughout the project
  • Move UID icon to second column in TreeView
  • Hide variable counts when not applicable
  • Update fr-links.csv
  • Update OpenLibrary links
1 Like

I may test the “experiment” plan, which sounds like Mistral AI free access (or API queries) for experimentations.


I still have problems for properly installing mistralai python3 library.

Maybe I need to look at old versions (0.0.12)…

You no need any additional libraries to be installed. Mistral already works in WebSearch. Did you try it to use?

I need to install gramps 6.0.0 too… or to make a local backport for supporting all primary objects for a full support (and test) of the WebSearch gramplet.

Anyway, I will quickly make a test for Mistral AI support via gramps5.2 branch and python 3.6…

1 Like
  1. Download https://github.com/jurchello/WebSearch/archive/refs/heads/main.zip
  2. Make a local copy, and change the ‘gramps_target_version’ to 5.2 (WebSearch.gpr.py) file
  3. Load it (only on individuals) into a new gramps session
  4. Set/enable Mistral AI into Preferences (sorry, settings)
  5. Quit and Load a new Gramps session (or refesh/reload gramplet ?)
⚠ QR codes are disabled. Install it using: `pip install qrcode[pil]`.
⚠ OpenAI module is missing. Install it using: `pip install openai`.
❌ ERROR: No AI API Key found.

I have to start the “experiment plan” to get a valid Mistral API key…

So, testing is unfinished, it looks good (warnings are on console), no error or additional libraries.

For now, I need to find an old cell phone with a SMS support (tel number)! :thinking: It is the Experiment Plan…

yes, but on step 3. you need also add Mistral token and model in Settings and click Save button.

oh, should I try with this Mistral token?
I am not sure this is allowed!

do you have any mistral token? free or not free. If yes, you can use it in WebSearch or in AI Chat of another gramplet or anywhere else.

But your token it only for you as ‘client’…
❌ Error while calling Mistral API: 401 Client Error: Unauthorized for url: https://api.mistral.ai/v1/chat/completions

I looked at:

but it is not clear for me.

sure. Thats why you should use your own token, not my

This is why, I wrote…

you can not use token from the screenshot. This is only settings demonstration. And token on the screenshot is not full. Thats why you need own token

I need to be home for finding an old cell phone with an active SIM card (SMS to get the API KEY)…

I just looked at less than 3 Mistral AI accounts (either via supported email or via gmail). I was a little bit surprised because on a recent account creation, there was something like an “organisation/entreprise” setting. So, why not a common shared API key for training on a local configuration and experimentation?

Anyway, need to wait some hours (or the week-end) before I get my SMS and API key.

Sorry, I can not help with shared API key. But if you have such ability, you can generate the API key and share it for training.

It seems to be possible according to Mistral AI services (at least on the french page). The small model does not look at internet (so, pseudo-LAN only). It seens recent, because I did not see this some weeks ago.

Sure, to use a “local” key for a search on internet does not make sense.

1 Like

There is maybe something else around models?
❌ Error while calling Mistral API: 400 Client Error: Bad Request for url: https://api.mistral.ai/v1/chat/completions

Failure, with Mistral-Large (maybe related to my rights). Medium model is passing. Just need to avoid the lateral bar (spacing issue).

Also, links are in english and my locale is french. So, it could be improved (need to translate the sentence for the query?).

Note, the ‘mistral-small’ model is “passing and answering to the prompt” too.

this is not free model

could you explain pls where is the issue?

Links can not be translated because there are links and they are dynamic. You can disable common-links.csv and use only fr-links.csv. In this case you will receive only AI suggestions for FR.

1 Like