Wikipedia

Search for a page on Wikipedia

Neuron documentation

Video

Synapse

            
- name: "wikipedia-search"
  neurons:
    - wikipedia_searcher:
        language: "fr"
        sentences: "1"
        query: "{{ query }}"
        file_template: "templates/wikipedia_returned_value.j2"
  signals:
    - order: "cherche sur wikipédia {{ query }}"
    - order: "recherche sur wikipédia {{ query }}"

        

Template

            
{% if returncode == "DisambiguationError" %}
    La recherche retourne les pages suivantes:
    {% if may_refer is not none %}
        {% for page in may_refer %}
            {{ page }}
        {% endfor %}
    {% endif %}
{% elif returncode == "PageError" %}
    La recherche n'a rien donnée
{% else %}
    {{ summary }}
{% endif %}