Skip to content

Commit e210728

Browse files
committed
Fixed bug for enum, docs update and added set_attributes
1 parent 62e7514 commit e210728

20 files changed

+278
-71
lines changed

doc/source/index.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,30 @@ Async Profile
6868
:maxdepth: 3
6969

7070
user_guide/async_profile.rst
71+
72+
Vector Index
73+
============
74+
75+
.. toctree::
76+
:numbered:
77+
:maxdepth: 3
78+
79+
user_guide/vector_index.rst
80+
81+
Synthetic Data
82+
==============
83+
84+
.. toctree::
85+
:numbered:
86+
:maxdepth: 3
87+
88+
user_guide/synthetic_data.rst
89+
90+
Conversation
91+
============
92+
93+
.. toctree::
94+
:numbered:
95+
:maxdepth: 3
96+
97+
user_guide/conversation.rst

doc/source/user_guide/actions.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
Supported AI Actions
55
********************
66

7-
.. literalinclude:: ../../../src/select_ai/action.py
8-
:language: python
7+
TODO

doc/source/user_guide/async_profile.rst

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,15 @@ Async SQL generation
1515
:language: python
1616

1717
**********
18-
Async Chat
18+
Async chat
1919
**********
2020

2121
.. literalinclude:: ../../../examples/async_examples/2_chat.py
2222
:language: python
2323

2424
*********************
25-
Async Prompt Pipeline
25+
Async pipeline
2626
*********************
2727

2828
.. literalinclude:: ../../../examples/async_examples/3_pipeline.py
2929
:language: python
30-
31-
*********************
32-
Async Conversation
33-
*********************
34-
35-
.. literalinclude:: ../../../examples/async_examples/4_conversation.py
36-
:language: python
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.. _conversation:
2+
3+
********************
4+
``Conversation``
5+
********************
6+
7+
.. autoclass:: select_ai.Conversation
8+
:members:
9+
10+
*************************
11+
``VectorIndexAttributes``
12+
*************************
13+
14+
.. autoclass:: select_ai.ConversationAttributes
15+
:members:
16+
17+
************
18+
Conversation
19+
************
20+
21+
.. literalinclude:: ../../../examples/9_conversation.py
22+
:language: python
23+
24+
*********************
25+
Async conversation
26+
*********************
27+
28+
.. literalinclude:: ../../../examples/async_examples/4_conversation.py
29+
:language: python

doc/source/user_guide/profile.rst

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:members:
99

1010
**************************
11-
Enable AI Service provider
11+
Enable AI service provider
1212
**************************
1313

1414
.. literalinclude:: ../../../examples/1_enable_ai_provider.py
@@ -45,32 +45,12 @@ Chat
4545
:language: python
4646

4747
**************************
48-
List Profiles
48+
List profiles
4949
**************************
5050

5151
.. literalinclude:: ../../../examples/6_list_ai_profiles.py
5252
:language: python
5353

54-
**************************
55-
Create Vector Index
56-
**************************
57-
58-
.. literalinclude:: ../../../examples/7_vector_index.py
59-
:language: python
60-
61-
**************************
62-
Generate Synthetic Data
63-
**************************
64-
65-
.. literalinclude:: ../../../examples/8_generate_synthetic_data.py
66-
:language: python
67-
68-
**************************
69-
Conversation
70-
**************************
71-
72-
.. literalinclude:: ../../../examples/9_conversation.py
73-
:language: python
7454

7555
***************************
7656
Disable AI service provider

doc/source/user_guide/provider_attributes.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
.. autoclass:: select_ai.AWSAIProviderAttributes
2626
:members:
2727

28-
*****************************
28+
******************************
2929
``CohereAIProviderAttributes``
30-
*****************************
30+
******************************
3131
.. autoclass:: select_ai.CohereAIProviderAttributes
3232
:members:
3333

@@ -38,16 +38,16 @@
3838
:members:
3939

4040

41-
*****************************
41+
******************************
4242
``OCIGenAIProviderAttributes``
43-
*****************************
43+
******************************
4444
.. autoclass:: select_ai.OCIGenAIProviderAttributes
4545
:members:
4646

4747

48-
*****************************
48+
******************************
4949
``GoogleAIProviderAttributes``
50-
*****************************
50+
******************************
5151
.. autoclass:: select_ai.GoogleAIProviderAttributes
5252
:members:
5353

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. _synthetic_data:
2+
3+
***********************
4+
``SyntheticDataParams``
5+
***********************
6+
7+
.. autoclass:: select_ai.SyntheticDataParams
8+
:members:
9+
10+
***************************
11+
``SyntheticDataAttributes``
12+
***************************
13+
14+
.. autoclass:: select_ai.SyntheticDataAttributes
15+
:members:
16+
17+
**************************
18+
Generate synthetic data
19+
**************************
20+
21+
The below example shows multitable synthetic data generation
22+
23+
.. literalinclude:: ../../../examples/8_generate_synthetic_data.py
24+
:language: python
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. _vector_index:
2+
3+
********************
4+
``VectorIndex``
5+
********************
6+
7+
.. autoclass:: select_ai.VectorIndex
8+
:members:
9+
10+
*************************
11+
``VectorIndexAttributes``
12+
*************************
13+
14+
.. autoclass:: select_ai.VectorIndexAttributes
15+
:members:
16+
17+
**************************
18+
Create Vector Index
19+
**************************
20+
21+
.. literalinclude:: ../../../examples/7_vector_index.py
22+
:language: python

examples/4_run_sql.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ def main():
2121
description="MY OCI AI Profile",
2222
replace=True,
2323
)
24+
# profile.set_attributes(attributes=oci_provider_attributes)
25+
profile.set_attribute(
26+
attribute_name="model", attribute_value="meta.llama-3.1-70b-instruct"
27+
)
2428
prompts = [
2529
"How many promotions are there in the sh database?",
2630
"How many products are there in the sh database ?",

src/select_ai/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def __init__(
2626
:param str profile_name (optional): Name of the profile
2727
2828
:param select_ai.provider.ProviderAttributes attributes (optional):
29-
ProviderAttributes
29+
Object specifying AI profile attributes
3030
3131
:param str description (optional): Description of the profile
3232

0 commit comments

Comments
 (0)