Skip to content

Commit c7d9932

Browse files
committed
Added detailed documentation and examples
1 parent 40b4ea0 commit c7d9932

18 files changed

+373
-107
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ repos:
66
- id: end-of-file-fixer
77
- id: check-yaml
88
- id: check-added-large-files
9+
args: ['--maxkb=600']
910
- repo: https://github.com/psf/black-pre-commit-mirror
1011
rev: 24.4.2
1112
hooks:

doc/source/image/classes.png

590 KB
Loading

doc/source/index.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ Getting Started
2222
user_guide/installation.rst
2323
user_guide/connection.rst
2424

25+
Select AI classes
26+
=================
27+
28+
.. toctree::
29+
:numbered:
30+
:maxdepth: 3
31+
32+
user_guide/class_object_model.rst
33+
2534
Actions
2635
=======
2736

@@ -41,17 +50,17 @@ Provider
4150
user_guide/provider.rst
4251

4352

44-
Provider Attributes
45-
===================
53+
Profile Attributes
54+
==================
4655

4756
.. toctree::
4857
:numbered:
4958
:maxdepth: 3
5059

51-
user_guide/provider_attributes.rst
60+
user_guide/profile_attributes.rst
5261

5362
Profile
54-
=======
63+
==================
5564

5665
.. toctree::
5766
:numbered:

doc/source/user_guide/actions.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,11 @@
44
Supported AI Actions
55
********************
66

7-
TODO
7+
Following list of actions can be performed using ``select_ai``
8+
9+
- ``select_ai.Action.RUNSQL``
10+
- ``select_ai.Action.SHOWSQL``
11+
- ``select_ai.Action.EXPLAINSQL``
12+
- ``select_ai.Action.NARRATE``
13+
- ``select_ai.Action.CHAT``
14+
- ``select_ai.Action.SHOWPROMPT``

doc/source/user_guide/async_profile.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
.. _async_profile:
22

3+
An AsyncProfile object can be created with ``select_ai.AsyncProfile()``
4+
``AsyncProfile`` support use of concurrent programming with `asyncio <https://docs.python.org/3/library/asyncio.html>`__.
5+
Unless explicitly noted as synchronous, the ``AsyncProfile`` methods should be
6+
used with ``await``.
7+
38
********************
49
``AsyncProfile`` API
510
********************
@@ -27,3 +32,10 @@ Async pipeline
2732

2833
.. literalinclude:: ../../../examples/async_examples/3_pipeline.py
2934
:language: python
35+
36+
****************************
37+
List profiles asynchronously
38+
****************************
39+
40+
.. literalinclude:: ../../../examples/async_examples/5_list_profiles.py
41+
:language: python
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. _object_model:
2+
3+
********************
4+
select_ai classes
5+
********************
6+
7+
.. _classesfig:
8+
.. figure:: /image/classes.png
9+
:alt: Select AI classes

doc/source/user_guide/profile.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
.. _profile:
22

3-
********************
4-
``Profile`` API
5-
********************
3+
An AI profile is a specification that includes the AI provider to use and other
4+
details regarding metadata and database objects required for generating
5+
responses to natural language prompts.
6+
7+
An AI profile object can be created using ``select_ai.Profile()``
8+
9+
*******************************
10+
Base ``Profile`` methods
11+
*******************************
12+
.. autoclass:: select_ai.BaseProfile
13+
:members:
14+
15+
*******************************
16+
Synchronous ``Profile`` methods
17+
*******************************
618

719
.. autoclass:: select_ai.Profile
820
:members:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _profile_attributes:
2+
3+
*************************
4+
``ProfileAttributes``
5+
*************************
6+
7+
This class helps defining attributes to manage and configure the behavior of
8+
the AI profile. The ``ProfileAttributes`` objects are created
9+
by ``select_ai.ProfileAttributes()``
10+
11+
.. autoclass:: select_ai.ProfileAttributes
12+
:members:

doc/source/user_guide/provider.rst

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,66 @@
11
.. _provider:
22

3+
An AI Provider in Select AI refers to the service provider that supplies the
4+
LLM or transformer or both for processing and generating responses to natural
5+
language prompts. These providers offer models that can interpret and convert
6+
natural language for the use cases highlighted under the LLM concept
7+
8+
See `Select your AI Provider <https://docs.oracle.com/en-us/iaas/autonomous-database-serverless/doc/select-ai-about.html#GUID-FDAEF22A-5DDF-4BAE-A465-C1D568C75812>`__
9+
for the supported providers
10+
311
**********************
4-
Supported AI Providers
12+
``Provider``
513
**********************
614

7-
TODO
15+
.. autoclass:: select_ai.Provider
16+
:members:
17+
18+
*********************************
19+
``AnthropicAIProviderAttributes``
20+
*********************************
21+
.. autoclass:: select_ai.AnthropicAIProvider
22+
:members:
23+
24+
*****************************
25+
``AzureAIProviderAttributes``
26+
*****************************
27+
.. autoclass:: select_ai.AzureAIProvider
28+
:members:
29+
30+
*****************************
31+
``AWSAIProviderAttributes``
32+
*****************************
33+
.. autoclass:: select_ai.AWSAIProvider
34+
:members:
35+
36+
******************************
37+
``CohereAIProviderAttributes``
38+
******************************
39+
.. autoclass:: select_ai.CohereAIProvider
40+
:members:
41+
42+
*****************************
43+
``OpenAIProviderAttributes``
44+
*****************************
45+
.. autoclass:: select_ai.OpenAIProvider
46+
:members:
47+
48+
49+
******************************
50+
``OCIGenAIProviderAttributes``
51+
******************************
52+
.. autoclass:: select_ai.OCIGenAIProvider
53+
:members:
54+
55+
56+
******************************
57+
``GoogleAIProviderAttributes``
58+
******************************
59+
.. autoclass:: select_ai.GoogleAIProvider
60+
:members:
61+
62+
***********************************
63+
``HuggingFaceAIProviderAttributes``
64+
***********************************
65+
.. autoclass:: select_ai.HuggingFaceAIProvider
66+
:members:

doc/source/user_guide/provider_attributes.rst

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)