Skip to content

Commit b523e42

Browse files
committed
Updated Readme and copyright header
1 parent 7721376 commit b523e42

6 files changed

Lines changed: 94 additions & 46 deletions

File tree

README.md

Lines changed: 65 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ Select AI for Python enables you to ask questions of your database data using na
55

66
Select AI for Python enables you to leverage the broader Python ecosystem in combination with generative AI and database functionality - bridging the gap between the DBMS_CLOUD_AI PL/SQL package and Python's rich ecosystem. It provides intuitive objects and methods for AI model interaction.
77

8+
## Table of Contents
9+
10+
- [Installation](#installation)
11+
- [Documentation](#documentation)
12+
- [Getting Started](#getting-started)
13+
- [Async Example](#async-example)
14+
- [Command Line Interface](#command-line-interface)
15+
- [Chat](#chat)
16+
- [A2A Server](#a2a-server)
17+
- [Cloud Run](#cloud-run)
18+
- [Samples](#samples)
19+
- [Help](#help)
20+
- [Contributing](#contributing)
21+
- [Security](#security)
22+
- [License](#license)
23+
824

925
## Installation
1026

@@ -26,21 +42,61 @@ The CLI extra includes A2A server support.
2642

2743
See [Select AI for Python documentation][documentation]
2844

29-
## Samples
45+
## Getting Started
46+
47+
```python
48+
import select_ai
49+
50+
user = "<your_select_ai_user>"
51+
password = "<your_select_ai_password>"
52+
dsn = "<your_select_ai_db_connect_string>"
53+
54+
select_ai.connect(user=user, password=password, dsn=dsn)
55+
profile = select_ai.Profile(profile_name="oci_ai_profile")
56+
# run_sql returns a pandas dataframe
57+
df = profile.run_sql(prompt="How many promotions?")
58+
print(df.columns)
59+
print(df)
60+
```
3061

31-
Examples can be found in the [/samples][samples] directory
62+
### Async Example
63+
64+
```python
65+
66+
import asyncio
67+
68+
import select_ai
69+
70+
user = "<your_select_ai_user>"
71+
password = "<your_select_ai_password>"
72+
dsn = "<your_select_ai_db_connect_string>"
73+
74+
# This example shows how to asynchronously run sql
75+
async def main():
76+
await select_ai.async_connect(user=user, password=password, dsn=dsn)
77+
async_profile = await select_ai.AsyncProfile(
78+
profile_name="async_oci_ai_profile",
79+
)
80+
# run_sql returns a pandas df
81+
df = await async_profile.run_sql("How many promotions?")
82+
print(df)
83+
84+
asyncio.run(main())
85+
86+
```
3287

3388
## Command Line Interface
3489

3590
The optional `select-ai` command provides interactive chat, SQL, profile
3691
management, and A2A server tools for Select AI:
3792

3893
### Chat
94+
3995
```bash
4096
select-ai chat --profile OCI_AI_PROFILE
4197
```
42-
![Select AI CLI demo](doc/source/image/select_ai_cli_demo.gif)
4398

99+
![Select AI CLI demo](doc/source/image/select_ai_cli_demo.gif)
44100

45101
### A2A Server
46102

@@ -50,6 +106,8 @@ Expose one Oracle Database AI agent team as an A2A JSON-RPC HTTP server:
50106
select-ai a2a serve --team SALES_ANALYST --port 8000
51107
```
52108

109+
![Select AI A2A server demo](doc/source/image/select_ai_a2a_server_demo.gif)
110+
53111
The command obtains database connection settings from its options or the
54112
`SELECT_AI_*` environment variables. Its Agent Card is available at
55113
`/.well-known/agent-card.json`, and its JSON-RPC endpoint is
@@ -73,53 +131,15 @@ select-ai a2a agent-card \
73131
--public-url https://YOUR-SERVICE.run.app
74132
```
75133

76-
## Cloud Run
134+
#### Cloud Run
77135

78136
Deploy the A2A server to Cloud Run using the instructions in
79137
[gcloud/README.md](https://github.com/oracle/python-select-ai/blob/main/gcloud/README.md).
80138

81-
## Basic Example
82-
83-
```python
84-
import select_ai
85-
86-
user = "<your_select_ai_user>"
87-
password = "<your_select_ai_password>"
88-
dsn = "<your_select_ai_db_connect_string>"
89-
90-
select_ai.connect(user=user, password=password, dsn=dsn)
91-
profile = select_ai.Profile(profile_name="oci_ai_profile")
92-
# run_sql returns a pandas dataframe
93-
df = profile.run_sql(prompt="How many promotions?")
94-
print(df.columns)
95-
print(df)
96-
```
97-
98-
### Async Example
99-
100-
```python
101-
102-
import asyncio
103-
104-
import select_ai
105-
106-
user = "<your_select_ai_user>"
107-
password = "<your_select_ai_password>"
108-
dsn = "<your_select_ai_db_connect_string>"
109-
110-
# This example shows how to asynchronously run sql
111-
async def main():
112-
await select_ai.async_connect(user=user, password=password, dsn=dsn)
113-
async_profile = await select_ai.AsyncProfile(
114-
profile_name="async_oci_ai_profile",
115-
)
116-
# run_sql returns a pandas df
117-
df = await async_profile.run_sql("How many promotions?")
118-
print(df)
139+
## Samples
119140

120-
asyncio.run(main())
141+
For in-depth examples, see the [/samples][samples] directory.
121142

122-
```
123143
## Help
124144

125145
Questions can be asked in [GitHub Discussions][ghdiscussions].
@@ -136,7 +156,7 @@ Please consult the [security guide][security] for our responsible security vulne
136156

137157
## License
138158

139-
Copyright (c) 2025 Oracle and/or its affiliates.
159+
Copyright (c) 2025, 2026 Oracle and/or its affiliates.
140160

141161
Released under the Universal Permissive License v1.0 as shown at
142162
<https://oss.oracle.com/licenses/upl/>.
28.5 KB
Loading

docker/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# -----------------------------------------------------------------------------
2+
# Copyright (c) 2026, Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Universal Permissive License v 1.0 as shown at
5+
# http://oss.oracle.com/licenses/upl.
6+
# -----------------------------------------------------------------------------
7+
18
FROM oraclelinux:10-slim
29

310
ENV PATH=/opt/venv/bin:$PATH

docker/a2a-entrypoint.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
#!/usr/bin/env sh
1+
#!/usr/bin/env bash
2+
3+
# -----------------------------------------------------------------------------
4+
# Copyright (c) 2026, Oracle and/or its affiliates.
5+
#
6+
# Licensed under the Universal Permissive License v 1.0 as shown at
7+
# http://oss.oracle.com/licenses/upl.
8+
# -----------------------------------------------------------------------------
29

310
# Cloud Run-only A2A launcher. It expands the optional wallet archive mounted
411
# by deploy.sh, then starts the generic select-ai CLI in A2A server mode.

gcloud/cloudbuild.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# -----------------------------------------------------------------------------
2+
# Copyright (c) 2026, Oracle and/or its affiliates.
3+
#
4+
# Licensed under the Universal Permissive License v 1.0 as shown at
5+
# http://oss.oracle.com/licenses/upl.
6+
# -----------------------------------------------------------------------------
7+
18
# Build one reusable A2A server image. Database team selection is Cloud Run
29
# configuration, not an image-build input.
310
steps:

gcloud/deploy.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
# -----------------------------------------------------------------------------
4+
# Copyright (c) 2026, Oracle and/or its affiliates.
5+
#
6+
# Licensed under the Universal Permissive License v 1.0 as shown at
7+
# http://oss.oracle.com/licenses/upl.
8+
# -----------------------------------------------------------------------------
9+
310
# Deploy one Select AI A2A server to private Cloud Run. On its first run it
411
# creates the ADB secrets used by this service. Later runs reuse both those
512
# secrets and the service's currently deployed image.

0 commit comments

Comments
 (0)