Skip to main content

A Python package for connecting to OpenAI embedding models in Streamlit apps

Project description

Streamlit OpenAI Embedding Connection

Releases

Streamlit App

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

st-openai-embeddings-connection-0.1.1.tar.gz (7.2 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page