https://github.com/lefred/oci-genai-hw
OCI GenAI with MySQL HeatWave - demo
https://github.com/lefred/oci-genai-hw
Last synced: about 1 year ago
JSON representation
OCI GenAI with MySQL HeatWave - demo
- Host: GitHub
- URL: https://github.com/lefred/oci-genai-hw
- Owner: lefred
- License: upl-1.0
- Created: 2024-07-10T06:53:37.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-10T12:36:07.000Z (about 2 years ago)
- Last Synced: 2025-06-05T08:12:28.545Z (about 1 year ago)
- Language: Python
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Security: SECURITY.md
Awesome Lists containing this project
README
# OCI GenAI and MySQL HeatWave Demo
[](https://img.shields.io/badge/license-UPL-green) [](https://sonarcloud.io/dashboard?id=oracle-devrel_test)
## Introduction
MySQL HeatWave supports VECTOR datatype and functions like STRING_TO_VECTOR() and VECTOR_DISTANCE() allowing you to store vectors from embeddings existing data stored in your DB System.
The embeddings, prompt, and answer can be generated using the OCI GenAI service.
The code proposed in this repository illustrates the blog post related to OCI GenAI, MySQL HeatWave Vector capabilities to query WordPress content.
## Getting Started
You need to edit the code to provide the credentials to your OCI account and
MySQL HeatWave DB System.
### Prerequisites
You need:
* an OCI account
* a MySQL HeatWave DB System 9.x
* a compute instance or access to your DB System (bastion, LB, ...)
* Python >= 3.9
You also need to create a table to save your embeddings:
```
create table wp_embeddings (
id bigint unsigned auto_increment,
content varchar(4000),
vec vector(1024),
wp_post_id bigint unsigned,
primary key(id)
);
```
## URLs
* Nothing at this time
## Contributing
This project welcomes contributions from the community. Before submitting a pull
request, please [review our contribution guide](./CONTRIBUTING.md).
## Security
Please consult the [security guide](./SECURITY.md) for our responsible security
vulnerability disclosure process.
## License
Copyright (c) 2024 Oracle and/or its affiliates.
Licensed under the Universal Permissive License (UPL), Version 1.0.
See [LICENSE](LICENSE.txt) for more details.
ORACLE AND ITS AFFILIATES DO NOT PROVIDE ANY WARRANTY WHATSOEVER, EXPRESS OR IMPLIED, FOR ANY SOFTWARE, MATERIAL OR CONTENT OF ANY KIND CONTAINED OR PRODUCED WITHIN THIS REPOSITORY, AND IN PARTICULAR SPECIFICALLY DISCLAIM ANY AND ALL IMPLIED WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. FURTHERMORE, ORACLE AND ITS AFFILIATES DO NOT REPRESENT THAT ANY CUSTOMARY SECURITY REVIEW HAS BEEN PERFORMED WITH RESPECT TO ANY SOFTWARE, MATERIAL OR CONTENT CONTAINED OR PRODUCED WITHIN THIS REPOSITORY. IN ADDITION, AND WITHOUT LIMITING THE FOREGOING, THIRD PARTIES MAY HAVE POSTED SOFTWARE, MATERIAL OR CONTENT TO THIS REPOSITORY WITHOUT ANY REVIEW. USE AT YOUR OWN RISK.