Skip to content

Commit

Permalink
Reorganize AI docs
Browse files Browse the repository at this point in the history
Move them into the appropriate sections in the new docs structure.
  • Loading branch information
scotttrinh committed Feb 21, 2025
1 parent 220830b commit 7ce610a
Show file tree
Hide file tree
Showing 15 changed files with 79 additions and 48 deletions.
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

0 comments on commit 7ce610a

Please sign in to comment.