{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import streamlit as st\n", "import os\n", "from langserve.client import RemoteRunnable\n", "from httpx import HTTPStatusError\n", "from dotenv import load_dotenv\n", "load_dotenv()" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "token = os.environ.get(\"BACK_API_KEY\")" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "rag_app = RemoteRunnable(\"http://127.0.0.1:8000/rag-chroma/\", headers={\"x-api-key\": f\"{token}\"})" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'\\nAnswer: The speakers do not provide specific details about GPT-5. They mention that it is not yet developed and that there are challenges and bottlenecks to overcome before its creation. They also discuss that it will require a bigger computer and a new secret, and that it is a result of multiplying 200 medium-sized things together into one giant thing. They also mention that there is a lot of distributed constant innovation happening on the technical side.'" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "rag_app.invoke(\"What do they say about GPT-5?\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "langcorn", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.5" } }, "nbformat": 4, "nbformat_minor": 2 }