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
Close
Hashes for st-openai-embeddings-connection-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d769a723f29d02da498635eec142fa5936cadda309c82ca16597f2ba35048935 |
|
MD5 | 972e6beae86ff470dba53ab9383858f1 |
|
BLAKE2b-256 | c3917ab18209ed11f8052a7bffa8d44fd48db553ab8049477f54dd41277aa43b |
Close
Hashes for st_openai_embeddings_connection-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ea38c595e0771f8c431340cb9f29b2f89a219a0152dd22a7ad02dbb6e4a116c |
|
MD5 | 35084c65d5a2696028f4df5340f07274 |
|
BLAKE2b-256 | 6d0d3d30432d64d1b12fd6b863485bfced2b2b4d37effb8dc75aa0e3b5d6f67a |