Skip to content
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

Reorganize AI docs #8365

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
24 changes: 11 additions & 13 deletions docs/ai/reference_http.rst → docs/ai/http.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
.. _ref_ai_http_reference:

=====================
AI HTTP API Reference
=====================

:edb-alt-title: AI Extension HTTP API
========
HTTP API
========

.. note::

Expand Down Expand Up @@ -48,9 +46,9 @@ Example request

.. code-block:: bash
curl --user <username>:<password> --json '{
"input": "What color is the sky on Mars?",
"model": "text-embedding-3-small"
$ curl --user <username>:<password> --json '{\
"input": "What color is the sky on Mars?",\
"model": "text-embedding-3-small"\
}' http://localhost:10931/branch/main/ai/embeddings
Expand Down Expand Up @@ -162,12 +160,12 @@ Request body
Example request
---------------

.. code-block::
.. code-block:: bash
curl --user <username>:<password> --json '{
"query": "What color is the sky on Mars?",
"model": "gpt-4-turbo-preview",
"context": {"query":"Knowledge"}
$ curl --user <username>:<password> --json '{\
"query": "What color is the sky on Mars?",\
"model": "gpt-4-turbo-preview",\
"context": {"query":"Knowledge"}\
}' http://<gel-host>:<port>/branch/main/ai/rag
Expand Down
10 changes: 3 additions & 7 deletions docs/ai/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ Gel AI
:hidden:
:maxdepth: 3

quickstart_fastapi_ai
reference_extai
reference_http
reference_python
extai
http
python
javascript
guide_edgeql
guide_python
fastapi_gelai_searchbot

:edb-alt-title: Using Gel AI

Expand Down
29 changes: 19 additions & 10 deletions docs/ai/javascript.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
.. _ref_ai_javascript:

==========
JavaScript
==========

:edb-alt-title: Gel AI's JavaScript package
==============
JavaScript API
==============

``@gel/ai`` offers a convenient wrapper around ``ext::ai``. Install it with
npm or via your package manager of choice:

.. code-block:: bash
.. tabs::

.. code-tab:: bash

$ npm install @gel/ai

.. code-tab:: bash

$ yarn add @gel/ai

.. code-tab:: bash

$ pnpm add @gel/ai

.. code-tab:: bash

$ npm install @gel/ai # or
$ yarn add @gel/ai # or
$ pnpm add @gel/ai # or
$ bun add @gel/ai
$ bun add @gel/ai


Usage
Expand Down
8 changes: 3 additions & 5 deletions docs/ai/reference_python.rst → docs/ai/python.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
.. _ref_ai_python_reference:

=============
AI Python API
=============

:edb-alt-title: AI Extension Python API
==========
Python API
==========

The ``gel.ai`` package is an optional binding of the AI extension in |Gel|.

Expand Down
6 changes: 3 additions & 3 deletions docs/ai/guide_edgeql.rst → docs/intro/guides/ai_edgeql.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _ref_ai_guide_edgeql:

=========================
Guide to Gel AI in EdgeQL
=========================
================
Gel AI in EdgeQL
================

:edb-alt-title: How to set up Gel AI in EdgeQL

Expand Down
6 changes: 3 additions & 3 deletions docs/ai/guide_python.rst → docs/intro/guides/ai_python.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _ref_ai_guide_python:

=========================
Guide to Gel AI in Python
=========================
================
Gel AI in Python
================

:edb-alt-title: How to set up Gel AI in Python

Expand Down
9 changes: 9 additions & 0 deletions docs/intro/guides/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
======
Guides
======

.. toctree::
:maxdepth: 1

ai_edgeql
ai_python
2 changes: 2 additions & 0 deletions docs/intro/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Get Started
:hidden:

quickstart/index
tutorials/index
guides/index
cli
instances
projects
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions docs/intro/quickstart/ai/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. edb:env-switcher::

=========
Adding AI
=========

.. toctree::
:maxdepth: 1

fastapi
3 changes: 2 additions & 1 deletion docs/intro/quickstart/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ Quickstart
modeling/index
connecting/index
working/index
inheritance/index
inheritance/index
ai/index
6 changes: 3 additions & 3 deletions docs/intro/quickstart/overview/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. edb:env-switcher::
==========
Quickstart
==========
========
Overview
========

.. toctree::
:maxdepth: 3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _ref_guide_fastapi_gelai_searchbot:

===================
FastAPI (Searchbot)
===================
===============================
Build a Search Bot with FastAPI
===============================

:edb-alt-title: Building a search bot with memory using FastAPI and Gel AI

Expand Down
8 changes: 8 additions & 0 deletions docs/intro/tutorials/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
=========
Tutorials
=========

.. toctree::
:maxdepth: 2

ai_fastapi_searchbot