Skip to content

Commit 629da86

Browse files
committed
Simplifed doc and bug fixes
1 parent fe7b554 commit 629da86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+554
-433
lines changed

doc/source/user_guide/async_profile.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ used with ``await``.
1616
Async Profile creation
1717
***********************
1818

19-
.. literalinclude:: ../../../samples/async_samples/profile_create.py
19+
.. literalinclude:: ../../../samples/async/profile_create.py
2020
:language: python
2121

2222
output::
@@ -54,7 +54,7 @@ output::
5454
Async explain SQL
5555
***********************
5656

57-
.. literalinclude:: ../../../samples/async_samples/profile_explain_sql.py
57+
.. literalinclude:: ../../../samples/async/profile_explain_sql.py
5858
:language: python
5959

6060
output::
@@ -82,7 +82,7 @@ output::
8282
Async run SQL
8383
***********************
8484

85-
.. literalinclude:: ../../../samples/async_samples/profile_run_sql.py
85+
.. literalinclude:: ../../../samples/async/profile_run_sql.py
8686
:language: python
8787

8888
output::
@@ -94,7 +94,7 @@ output::
9494
Async show SQL
9595
***********************
9696

97-
.. literalinclude:: ../../../samples/async_samples/profile_show_sql.py
97+
.. literalinclude:: ../../../samples/async/profile_show_sql.py
9898
:language: python
9999

100100
output::
@@ -106,7 +106,7 @@ output::
106106
Async concurrent SQL
107107
***********************
108108

109-
.. literalinclude:: ../../../samples/async_samples/profile_sql_concurrent_tasks.py
109+
.. literalinclude:: ../../../samples/async/profile_sql_concurrent_tasks.py
110110
:language: python
111111

112112
output::
@@ -139,7 +139,7 @@ output::
139139
Async chat
140140
**********
141141

142-
.. literalinclude:: ../../../samples/async_samples/profile_chat.py
142+
.. literalinclude:: ../../../samples/async/profile_chat.py
143143
:language: python
144144

145145
output::
@@ -162,7 +162,7 @@ output::
162162
Async pipeline
163163
*********************
164164

165-
.. literalinclude:: ../../../samples/async_samples/profile_pipeline.py
165+
.. literalinclude:: ../../../samples/async/profile_pipeline.py
166166
:language: python
167167

168168
output::
@@ -192,7 +192,7 @@ output::
192192
List profiles asynchronously
193193
****************************
194194

195-
.. literalinclude:: ../../../samples/async_samples/profiles_list.py
195+
.. literalinclude:: ../../../samples/async/profiles_list.py
196196
:language: python
197197

198198
output::

doc/source/user_guide/conversation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ output::
9393
Async chat session
9494
++++++++++++++++++
9595

96-
.. literalinclude:: ../../../samples/async_samples/conversation_chat_session.py
96+
.. literalinclude:: ../../../samples/async/conversation_chat_session.py
9797
:language: python
9898

9999
output::
@@ -114,7 +114,7 @@ output::
114114
Async list conversations
115115
++++++++++++++++++++++++
116116

117-
.. literalinclude:: ../../../samples/async_samples/conversations_list.py
117+
.. literalinclude:: ../../../samples/async/conversations_list.py
118118
:language: python
119119

120120
output::

doc/source/user_guide/profile.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ List profiles
137137
.. literalinclude:: ../../../samples/profiles_list.py
138138
:language: python
139139

140-
141140
output::
142141

143142
OCI_AI_PROFILE
@@ -146,8 +145,4 @@ output::
146145
Async Profile
147146
*************
148147

149-
.. toctree::
150-
:numbered:
151-
:maxdepth: 3
152-
153-
async_profile.rst
148+
async_profile.rst

doc/source/user_guide/vector_index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ A ``AsyncVectorIndex`` object can be created with ``select_ai.AsyncVectorIndex()
118118
Async create vector index
119119
+++++++++++++++++++++++++
120120

121-
.. literalinclude:: ../../../samples/async_samples/vector_index_create.py
121+
.. literalinclude:: ../../../samples/async/vector_index_create.py
122122
:language: python
123123

124124
output::
@@ -129,7 +129,7 @@ output::
129129
Async list vector index
130130
++++++++++++++++++++++++
131131

132-
.. literalinclude:: ../../../samples/async_samples/vector_index_list.py
132+
.. literalinclude:: ../../../samples/async/vector_index_list.py
133133
:language: python
134134

135135
output::
@@ -141,7 +141,7 @@ output::
141141
Async RAG using vector index
142142
++++++++++++++++++++++++++++
143143

144-
.. literalinclude:: ../../../samples/async_samples/vector_index_rag.py
144+
.. literalinclude:: ../../../samples/async/vector_index_rag.py
145145
:language: python
146146

147147
output::

samples/async_samples/conversation_chat_session.py renamed to samples/async/conversation_chat_session.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
# Licensed under the Universal Permissive License v 1.0 as shown at
55
# http://oss.oracle.com/licenses/upl.
66
# -----------------------------------------------------------------------------
7+
# ------------------------------------------------------------------------------
8+
# async/conversation_chat_session.py
9+
#
10+
# Demonstrates context aware conversation using AI Profile
11+
# ------------------------------------------------------------------------------
712

813
import asyncio
914
import os
@@ -41,5 +46,4 @@ async def main():
4146
print(response)
4247

4348

44-
if __name__ == "__main__":
45-
asyncio.run(main())
49+
asyncio.run(main())

samples/async_samples/conversations_list.py renamed to samples/async/conversations_list.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
# http://oss.oracle.com/licenses/upl.
66
# -----------------------------------------------------------------------------
77

8+
# ------------------------------------------------------------------------------
9+
# async/conversations_list.py
10+
#
11+
# List all conversations saved in the database
12+
# ------------------------------------------------------------------------------
13+
814
import asyncio
915
import os
1016

@@ -22,5 +28,4 @@ async def main():
2228
print(conversation.attributes)
2329

2430

25-
if __name__ == "__main__":
26-
asyncio.run(main())
31+
asyncio.run(main())

samples/async_samples/profile_chat.py renamed to samples/async/profile_chat.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
# http://oss.oracle.com/licenses/upl.
66
# -----------------------------------------------------------------------------
77

8+
# ------------------------------------------------------------------------------
9+
# async/profile_chat.py
10+
#
11+
# Chat using an AI Profile
12+
# ------------------------------------------------------------------------------
13+
814
import asyncio
915
import os
1016

@@ -21,7 +27,7 @@ async def main():
2127
profile_name="async_oci_ai_profile"
2228
)
2329

24-
# Asynchronously send multiple prompts
30+
# Asynchronously send multiple chat prompts
2531
chat_tasks = [
2632
async_profile.chat(prompt="What is OCI ?"),
2733
async_profile.chat(prompt="What is OML4PY?"),
@@ -32,5 +38,4 @@ async def main():
3238
print(result)
3339

3440

35-
if __name__ == "__main__":
36-
asyncio.run(main())
41+
asyncio.run(main())

samples/async_samples/profile_create.py renamed to samples/async/profile_create.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
# http://oss.oracle.com/licenses/upl.
66
# -----------------------------------------------------------------------------
77

8+
# ------------------------------------------------------------------------------
9+
# async/profile_create.py
10+
#
11+
# Create an OCI Gen AI profile
12+
# ------------------------------------------------------------------------------
13+
814
import asyncio
915
import os
1016
from pprint import pformat
@@ -43,5 +49,4 @@ async def main():
4349
)
4450

4551

46-
if __name__ == "__main__":
47-
asyncio.run(main())
52+
asyncio.run(main())

samples/async_samples/profile_explain_sql.py renamed to samples/async/profile_explain_sql.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
# http://oss.oracle.com/licenses/upl.
66
# -----------------------------------------------------------------------------
77

8+
# ------------------------------------------------------------------------------
9+
# async/profile_explain_sql.py
10+
# ------------------------------------------------------------------------------
11+
812
import asyncio
913
import os
1014

@@ -25,5 +29,4 @@ async def main():
2529
print(response)
2630

2731

28-
if __name__ == "__main__":
29-
asyncio.run(main())
32+
asyncio.run(main())

samples/async_samples/profile_pipeline.py renamed to samples/async/profile_pipeline.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
# http://oss.oracle.com/licenses/upl.
66
# -----------------------------------------------------------------------------
77

8+
# ------------------------------------------------------------------------------
9+
# async/profile_pipeline.py
10+
#
11+
# Demonstrates sending multiple prompts using a single Database round-trip
12+
# ------------------------------------------------------------------------------
13+
814
import asyncio
915
import os
1016

@@ -45,5 +51,4 @@ async def main():
4551
)
4652

4753

48-
if __name__ == "__main__":
49-
asyncio.run(main())
54+
asyncio.run(main())

0 commit comments

Comments
 (0)