A Python package for connecting to OpenAI embedding models in Streamlit apps
Project description
Streamlit OpenAI Embedding Connection
Example app using Streamlit Connections to query OpenAI's ada-002 embedding model.
Results from these queries can be used to perform semantic similarity searches either locally or in a vector database.
Sample usage:
pip install st-openai-embeddings-connection
streamlit.py:
import streamlit as st
from st_openai_embeddings_connection import OpenAIEmbeddingsConnection
conn = st.experimental_connection(
"openai_embeddings", type=OpenAIEmbeddingsConnection
)
text_to_embed = st.text_input(
"Text To Embed", "Puppies are good"
)
if st.button("embed"):
result = conn.query(text_to_embed)
result
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file st-openai-embeddings-connection-0.1.1.tar.gz.
File metadata
- Download URL: st-openai-embeddings-connection-0.1.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d769a723f29d02da498635eec142fa5936cadda309c82ca16597f2ba35048935
|
|
| MD5 |
972e6beae86ff470dba53ab9383858f1
|
|
| BLAKE2b-256 |
c3917ab18209ed11f8052a7bffa8d44fd48db553ab8049477f54dd41277aa43b
|
File details
Details for the file st_openai_embeddings_connection-0.1.1-py3-none-any.whl.
File metadata
- Download URL: st_openai_embeddings_connection-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ea38c595e0771f8c431340cb9f29b2f89a219a0152dd22a7ad02dbb6e4a116c
|
|
| MD5 |
35084c65d5a2696028f4df5340f07274
|
|
| BLAKE2b-256 |
6d0d3d30432d64d1b12fd6b863485bfced2b2b4d37effb8dc75aa0e3b5d6f67a
|