Spaces:
Sleeping
Sleeping
- app.py +73 -2
- poetry.lock +211 -1
- prompt/prompt.yaml +10 -0
- pyproject.toml +1 -0
app.py
CHANGED
@@ -1,4 +1,75 @@
|
|
1 |
import streamlit as st
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
+
from langchain_core.messages.chat import ChatMessage
|
3 |
+
from langchain_core.prompts import ChatPromptTemplate
|
4 |
+
from langchain_openai import ChatOpenAI
|
5 |
+
from langchain_core.output_parsers import StrOutputParser
|
6 |
+
from langchain_teddynote.prompts import load_prompt
|
7 |
+
from dotenv import load_dotenv
|
8 |
+
from langchain import hub
|
9 |
|
10 |
+
load_dotenv()
|
11 |
+
|
12 |
+
st.title("λλ§μ μ±GPTπ¬")
|
13 |
+
|
14 |
+
|
15 |
+
# μ²μ 1λ²λ§ μ€ννκΈ° μν μ½λ
|
16 |
+
if "messages" not in st.session_state:
|
17 |
+
st.session_state["messages"] = []
|
18 |
+
|
19 |
+
# μ¬μ΄λλ° μμ±
|
20 |
+
with st.sidebar:
|
21 |
+
clear_btn = st.button("λν μ΄κΈ°ν")
|
22 |
+
|
23 |
+
selected_prompt = st.selectbox("ν둬ννΈλ₯Ό μ νν΄ μ£ΌμΈμ", ("κΈ°λ³Έλͺ¨λ"), index=0)
|
24 |
+
|
25 |
+
|
26 |
+
# μ΄μ λνλ₯Ό μΆλ ₯
|
27 |
+
def print_messages():
|
28 |
+
for chat_message in st.session_state["messages"]:
|
29 |
+
st.chat_message(chat_message.role).write(chat_message.content)
|
30 |
+
|
31 |
+
|
32 |
+
# μλ‘μ΄ λ©μμ§λ₯Ό μΆκ°
|
33 |
+
def add_message(role, message):
|
34 |
+
st.session_state["messages"].append(ChatMessage(role=role, content=message))
|
35 |
+
|
36 |
+
|
37 |
+
# μ²΄μΈ μμ±
|
38 |
+
def create_chain(prompt_type):
|
39 |
+
prompt = ChatPromptTemplate.from_messages(
|
40 |
+
[
|
41 |
+
(
|
42 |
+
"system",
|
43 |
+
"λΉμ μ μΉμ ν AI μ΄μμ€ν΄νΈμ
λλ€. λ€μμ μ§λ¬Έμ κ°κ²°νκ² λ΅λ³ν΄ μ£ΌμΈμ.",
|
44 |
+
),
|
45 |
+
("user", "#Question:\n{question}"),
|
46 |
+
]
|
47 |
+
)
|
48 |
+
|
49 |
+
llm = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0)
|
50 |
+
|
51 |
+
return prompt | llm | StrOutputParser()
|
52 |
+
|
53 |
+
|
54 |
+
if clear_btn:
|
55 |
+
st.session_state["messages"] = []
|
56 |
+
|
57 |
+
print_messages()
|
58 |
+
|
59 |
+
user_input = st.chat_input("κΆκΈν λ΄μ©μ λ¬Όμ΄λ³΄μΈμ!")
|
60 |
+
|
61 |
+
if user_input:
|
62 |
+
st.chat_message("user").write(user_input)
|
63 |
+
chain = create_chain(selected_prompt)
|
64 |
+
|
65 |
+
response = chain.stream({"question": user_input})
|
66 |
+
with st.chat_message("assistant"):
|
67 |
+
container = st.empty()
|
68 |
+
|
69 |
+
ai_answer = ""
|
70 |
+
for token in response:
|
71 |
+
ai_answer += token
|
72 |
+
container.markdown(ai_answer)
|
73 |
+
|
74 |
+
add_message("user", user_input)
|
75 |
+
add_message("assistant", ai_answer)
|
poetry.lock
CHANGED
@@ -2669,6 +2669,45 @@ files = [
|
|
2669 |
{file = "joblib-1.4.2.tar.gz", hash = "sha256:2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e"},
|
2670 |
]
|
2671 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2672 |
[[package]]
|
2673 |
name = "jsonpatch"
|
2674 |
version = "1.33"
|
@@ -2956,6 +2995,21 @@ files = [
|
|
2956 |
{file = "kiwisolver-1.4.5.tar.gz", hash = "sha256:e57e563a57fb22a142da34f38acc2fc1a5c864bc29ca1517a88abc963e60d6ec"},
|
2957 |
]
|
2958 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2959 |
[[package]]
|
2960 |
name = "kubernetes"
|
2961 |
version = "30.1.0"
|
@@ -3096,6 +3150,24 @@ langchain-core = ">=0.2.17,<0.3.0"
|
|
3096 |
openai = ">=1.32.0,<2.0.0"
|
3097 |
tiktoken = ">=0.7,<1"
|
3098 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3099 |
[[package]]
|
3100 |
name = "langchain-text-splitters"
|
3101 |
version = "0.2.2"
|
@@ -3702,6 +3774,56 @@ html5 = ["html5lib"]
|
|
3702 |
htmlsoup = ["BeautifulSoup4"]
|
3703 |
source = ["Cython (>=3.0.10)"]
|
3704 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3705 |
[[package]]
|
3706 |
name = "markdown"
|
3707 |
version = "3.6"
|
@@ -5119,6 +5241,69 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa
|
|
5119 |
typing = ["typing-extensions"]
|
5120 |
xmp = ["defusedxml"]
|
5121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5122 |
[[package]]
|
5123 |
name = "platformdirs"
|
5124 |
version = "4.2.2"
|
@@ -5228,6 +5413,21 @@ files = [
|
|
5228 |
{file = "protobuf-4.25.3.tar.gz", hash = "sha256:25b5d0b42fd000320bd7830b349e3b696435f3b329810427a6bcce6a5492cc5c"},
|
5229 |
]
|
5230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5231 |
[[package]]
|
5232 |
name = "psutil"
|
5233 |
version = "6.0.0"
|
@@ -7796,6 +7996,16 @@ files = [
|
|
7796 |
{file = "websockets-12.0.tar.gz", hash = "sha256:81df9cbcbb6c260de1e007e58c011bfebe2dafc8435107b0537f393dd38c8b1b"},
|
7797 |
]
|
7798 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7799 |
[[package]]
|
7800 |
name = "widgetsnbextension"
|
7801 |
version = "4.0.11"
|
@@ -8135,4 +8345,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools",
|
|
8135 |
[metadata]
|
8136 |
lock-version = "2.0"
|
8137 |
python-versions = "3.11.9"
|
8138 |
-
content-hash = "
|
|
|
2669 |
{file = "joblib-1.4.2.tar.gz", hash = "sha256:2382c5816b2636fbd20a09e0f4e9dad4736765fdfb7dca582943b9c1366b3f0e"},
|
2670 |
]
|
2671 |
|
2672 |
+
[[package]]
|
2673 |
+
name = "jpype1"
|
2674 |
+
version = "1.5.0"
|
2675 |
+
description = "A Python to Java bridge."
|
2676 |
+
optional = false
|
2677 |
+
python-versions = ">=3.7"
|
2678 |
+
files = [
|
2679 |
+
{file = "JPype1-1.5.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7b6b1af3f9e0033080e3532c2686a224cd14706f36c14ef36160a2a1db751a17"},
|
2680 |
+
{file = "JPype1-1.5.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0ed36803734b812c78ca9228dd3291128ac80b2a1d06c293d60b5c2f049040b4"},
|
2681 |
+
{file = "JPype1-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a02b2f05621c119d35f4acc501b4261eeb48a4af7cc13d9afc2e9eb316c4bd29"},
|
2682 |
+
{file = "JPype1-1.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:0b40c76e075d4fed2c83340bb30b7b95bbc396fd370c564c6b608faab00ea4ef"},
|
2683 |
+
{file = "JPype1-1.5.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:85a31b30b482eaf788b21af421e0750aa0be7758307314178143a76632b0ad04"},
|
2684 |
+
{file = "JPype1-1.5.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:20f0229d7aaa04c480a7fa271cbd161ded58cecd838ba52a4e01bea21b60a058"},
|
2685 |
+
{file = "JPype1-1.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ef976e0f3b2e9604469f449f30bb2031941a159a0637f4c16adb2c5076f3e81"},
|
2686 |
+
{file = "JPype1-1.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:2bc987205ff8d2d8e36dfbef05430e0638e85d4fee1166ba58ebfa6f7a67cdf8"},
|
2687 |
+
{file = "JPype1-1.5.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8714bfaf09d6877160bc7ac97812016ccb09f6d7ba5ea2a9f519178aefcca93f"},
|
2688 |
+
{file = "JPype1-1.5.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1696196a8b6ea2f8ad3280249014406de919088494b94a84581da01752d98dca"},
|
2689 |
+
{file = "JPype1-1.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8649b526eccb4047881ad60bdb1974eb71a09cdb7f8bda17c96fdc0f9a3f2d1e"},
|
2690 |
+
{file = "JPype1-1.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:9aafc00b00bf8c1b624081e5d4ab87f7752e6c7ee6a141cfc332250b05c6d42f"},
|
2691 |
+
{file = "JPype1-1.5.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ccb9c786e9b709c6390c89e200036b2080bf668cce118561a0cfd74eae43903f"},
|
2692 |
+
{file = "JPype1-1.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa5a27cba59865f034259657fd322ca0a5cde82e691a1180c6a8040d2e0c0788"},
|
2693 |
+
{file = "JPype1-1.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cff64ac1980d899841cbc561b097eeec8106b34d70c42342b211b83005562f88"},
|
2694 |
+
{file = "JPype1-1.5.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:439e006a3a74bd26e15ab6bca873e3572087667b5525cb82244a1945dd607d80"},
|
2695 |
+
{file = "JPype1-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b437ce6fadaf5562576b2b5919fa0a5174a92f70a7d903f0faf8dff6f34199fa"},
|
2696 |
+
{file = "JPype1-1.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:a01eba1fdf5869e46dc7336a8ff2a97a66d209c8d5f23a64f7f23b70e55ffc0f"},
|
2697 |
+
{file = "JPype1-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e8d9bdd137e7cecabebd46ce7d3539fd53745018974d0bc3ec0a3634c2e53af5"},
|
2698 |
+
{file = "JPype1-1.5.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c9f8f01474186bf69bf05dd9a5ef4d5b2159980cfc9d8da91e021d682cc32552"},
|
2699 |
+
{file = "JPype1-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7aa1469d75f9b310f709b61bb2faa4cef4cbd4d670531ad1d1bb53e29cfda05"},
|
2700 |
+
{file = "JPype1-1.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:6bfdc101c56cab0b6b16e974fd8cbb0b3f7f14178286b8b55413c5d82d5f2bea"},
|
2701 |
+
{file = "JPype1-1.5.0.tar.gz", hash = "sha256:425a6e1966afdd5848b60c2688bcaeb7e40ba504a686f1114589668e0631e878"},
|
2702 |
+
]
|
2703 |
+
|
2704 |
+
[package.dependencies]
|
2705 |
+
packaging = "*"
|
2706 |
+
|
2707 |
+
[package.extras]
|
2708 |
+
docs = ["readthedocs-sphinx-ext", "sphinx", "sphinx-rtd-theme"]
|
2709 |
+
tests = ["pytest"]
|
2710 |
+
|
2711 |
[[package]]
|
2712 |
name = "jsonpatch"
|
2713 |
version = "1.33"
|
|
|
2995 |
{file = "kiwisolver-1.4.5.tar.gz", hash = "sha256:e57e563a57fb22a142da34f38acc2fc1a5c864bc29ca1517a88abc963e60d6ec"},
|
2996 |
]
|
2997 |
|
2998 |
+
[[package]]
|
2999 |
+
name = "konlpy"
|
3000 |
+
version = "0.6.0"
|
3001 |
+
description = "Python package for Korean natural language processing."
|
3002 |
+
optional = false
|
3003 |
+
python-versions = "*"
|
3004 |
+
files = [
|
3005 |
+
{file = "konlpy-0.6.0-py2.py3-none-any.whl", hash = "sha256:0b7928059e20eb1c72f6fe65a3d12c104fae9e68173904e16beef869cf0ea590"},
|
3006 |
+
]
|
3007 |
+
|
3008 |
+
[package.dependencies]
|
3009 |
+
JPype1 = ">=0.7.0"
|
3010 |
+
lxml = ">=4.1.0"
|
3011 |
+
numpy = ">=1.6"
|
3012 |
+
|
3013 |
[[package]]
|
3014 |
name = "kubernetes"
|
3015 |
version = "30.1.0"
|
|
|
3150 |
openai = ">=1.32.0,<2.0.0"
|
3151 |
tiktoken = ">=0.7,<1"
|
3152 |
|
3153 |
+
[[package]]
|
3154 |
+
name = "langchain-teddynote"
|
3155 |
+
version = "0.0.11"
|
3156 |
+
description = "LangChain Helper Library"
|
3157 |
+
optional = false
|
3158 |
+
python-versions = ">=3.10"
|
3159 |
+
files = [
|
3160 |
+
{file = "langchain_teddynote-0.0.11-py3-none-any.whl", hash = "sha256:0285af7f7e4bbe075bf5518e6d66d07f7421fa07ad1ac2596993b94a01753a14"},
|
3161 |
+
]
|
3162 |
+
|
3163 |
+
[package.dependencies]
|
3164 |
+
kiwipiepy = "*"
|
3165 |
+
konlpy = "*"
|
3166 |
+
langchain = "*"
|
3167 |
+
pinecone-client = {version = "*", extras = ["grpc"]}
|
3168 |
+
pinecone-text = "*"
|
3169 |
+
rank-bm25 = "*"
|
3170 |
+
|
3171 |
[[package]]
|
3172 |
name = "langchain-text-splitters"
|
3173 |
version = "0.2.2"
|
|
|
3774 |
htmlsoup = ["BeautifulSoup4"]
|
3775 |
source = ["Cython (>=3.0.10)"]
|
3776 |
|
3777 |
+
[[package]]
|
3778 |
+
name = "lz4"
|
3779 |
+
version = "4.3.3"
|
3780 |
+
description = "LZ4 Bindings for Python"
|
3781 |
+
optional = false
|
3782 |
+
python-versions = ">=3.8"
|
3783 |
+
files = [
|
3784 |
+
{file = "lz4-4.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b891880c187e96339474af2a3b2bfb11a8e4732ff5034be919aa9029484cd201"},
|
3785 |
+
{file = "lz4-4.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:222a7e35137d7539c9c33bb53fcbb26510c5748779364014235afc62b0ec797f"},
|
3786 |
+
{file = "lz4-4.3.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f76176492ff082657ada0d0f10c794b6da5800249ef1692b35cf49b1e93e8ef7"},
|
3787 |
+
{file = "lz4-4.3.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f1d18718f9d78182c6b60f568c9a9cec8a7204d7cb6fad4e511a2ef279e4cb05"},
|
3788 |
+
{file = "lz4-4.3.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6cdc60e21ec70266947a48839b437d46025076eb4b12c76bd47f8e5eb8a75dcc"},
|
3789 |
+
{file = "lz4-4.3.3-cp310-cp310-win32.whl", hash = "sha256:c81703b12475da73a5d66618856d04b1307e43428a7e59d98cfe5a5d608a74c6"},
|
3790 |
+
{file = "lz4-4.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:43cf03059c0f941b772c8aeb42a0813d68d7081c009542301637e5782f8a33e2"},
|
3791 |
+
{file = "lz4-4.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30e8c20b8857adef7be045c65f47ab1e2c4fabba86a9fa9a997d7674a31ea6b6"},
|
3792 |
+
{file = "lz4-4.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2f7b1839f795315e480fb87d9bc60b186a98e3e5d17203c6e757611ef7dcef61"},
|
3793 |
+
{file = "lz4-4.3.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edfd858985c23523f4e5a7526ca6ee65ff930207a7ec8a8f57a01eae506aaee7"},
|
3794 |
+
{file = "lz4-4.3.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e9c410b11a31dbdc94c05ac3c480cb4b222460faf9231f12538d0074e56c563"},
|
3795 |
+
{file = "lz4-4.3.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d2507ee9c99dbddd191c86f0e0c8b724c76d26b0602db9ea23232304382e1f21"},
|
3796 |
+
{file = "lz4-4.3.3-cp311-cp311-win32.whl", hash = "sha256:f180904f33bdd1e92967923a43c22899e303906d19b2cf8bb547db6653ea6e7d"},
|
3797 |
+
{file = "lz4-4.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:b14d948e6dce389f9a7afc666d60dd1e35fa2138a8ec5306d30cd2e30d36b40c"},
|
3798 |
+
{file = "lz4-4.3.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:e36cd7b9d4d920d3bfc2369840da506fa68258f7bb176b8743189793c055e43d"},
|
3799 |
+
{file = "lz4-4.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:31ea4be9d0059c00b2572d700bf2c1bc82f241f2c3282034a759c9a4d6ca4dc2"},
|
3800 |
+
{file = "lz4-4.3.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33c9a6fd20767ccaf70649982f8f3eeb0884035c150c0b818ea660152cf3c809"},
|
3801 |
+
{file = "lz4-4.3.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bca8fccc15e3add173da91be8f34121578dc777711ffd98d399be35487c934bf"},
|
3802 |
+
{file = "lz4-4.3.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7d84b479ddf39fe3ea05387f10b779155fc0990125f4fb35d636114e1c63a2e"},
|
3803 |
+
{file = "lz4-4.3.3-cp312-cp312-win32.whl", hash = "sha256:337cb94488a1b060ef1685187d6ad4ba8bc61d26d631d7ba909ee984ea736be1"},
|
3804 |
+
{file = "lz4-4.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:5d35533bf2cee56f38ced91f766cd0038b6abf46f438a80d50c52750088be93f"},
|
3805 |
+
{file = "lz4-4.3.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:363ab65bf31338eb364062a15f302fc0fab0a49426051429866d71c793c23394"},
|
3806 |
+
{file = "lz4-4.3.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:0a136e44a16fc98b1abc404fbabf7f1fada2bdab6a7e970974fb81cf55b636d0"},
|
3807 |
+
{file = "lz4-4.3.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:abc197e4aca8b63f5ae200af03eb95fb4b5055a8f990079b5bdf042f568469dd"},
|
3808 |
+
{file = "lz4-4.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56f4fe9c6327adb97406f27a66420b22ce02d71a5c365c48d6b656b4aaeb7775"},
|
3809 |
+
{file = "lz4-4.3.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f0e822cd7644995d9ba248cb4b67859701748a93e2ab7fc9bc18c599a52e4604"},
|
3810 |
+
{file = "lz4-4.3.3-cp38-cp38-win32.whl", hash = "sha256:24b3206de56b7a537eda3a8123c644a2b7bf111f0af53bc14bed90ce5562d1aa"},
|
3811 |
+
{file = "lz4-4.3.3-cp38-cp38-win_amd64.whl", hash = "sha256:b47839b53956e2737229d70714f1d75f33e8ac26e52c267f0197b3189ca6de24"},
|
3812 |
+
{file = "lz4-4.3.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6756212507405f270b66b3ff7f564618de0606395c0fe10a7ae2ffcbbe0b1fba"},
|
3813 |
+
{file = "lz4-4.3.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ee9ff50557a942d187ec85462bb0960207e7ec5b19b3b48949263993771c6205"},
|
3814 |
+
{file = "lz4-4.3.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2b901c7784caac9a1ded4555258207d9e9697e746cc8532129f150ffe1f6ba0d"},
|
3815 |
+
{file = "lz4-4.3.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b6d9ec061b9eca86e4dcc003d93334b95d53909afd5a32c6e4f222157b50c071"},
|
3816 |
+
{file = "lz4-4.3.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f4c7bf687303ca47d69f9f0133274958fd672efaa33fb5bcde467862d6c621f0"},
|
3817 |
+
{file = "lz4-4.3.3-cp39-cp39-win32.whl", hash = "sha256:054b4631a355606e99a42396f5db4d22046a3397ffc3269a348ec41eaebd69d2"},
|
3818 |
+
{file = "lz4-4.3.3-cp39-cp39-win_amd64.whl", hash = "sha256:eac9af361e0d98335a02ff12fb56caeb7ea1196cf1a49dbf6f17828a131da807"},
|
3819 |
+
{file = "lz4-4.3.3.tar.gz", hash = "sha256:01fe674ef2889dbb9899d8a67361e0c4a2c833af5aeb37dd505727cf5d2a131e"},
|
3820 |
+
]
|
3821 |
+
|
3822 |
+
[package.extras]
|
3823 |
+
docs = ["sphinx (>=1.6.0)", "sphinx-bootstrap-theme"]
|
3824 |
+
flake8 = ["flake8"]
|
3825 |
+
tests = ["psutil", "pytest (!=3.3.0)", "pytest-cov"]
|
3826 |
+
|
3827 |
[[package]]
|
3828 |
name = "markdown"
|
3829 |
version = "3.6"
|
|
|
5241 |
typing = ["typing-extensions"]
|
5242 |
xmp = ["defusedxml"]
|
5243 |
|
5244 |
+
[[package]]
|
5245 |
+
name = "pinecone-client"
|
5246 |
+
version = "4.1.2"
|
5247 |
+
description = "Pinecone client and SDK"
|
5248 |
+
optional = false
|
5249 |
+
python-versions = "<4.0,>=3.8"
|
5250 |
+
files = [
|
5251 |
+
{file = "pinecone_client-4.1.2-py3-none-any.whl", hash = "sha256:3d69cbbca2d9d4f77c90bad59a1194e3d20d535b29f277eee32b439fd526546b"},
|
5252 |
+
{file = "pinecone_client-4.1.2.tar.gz", hash = "sha256:fa89c605792ec94de36d4c9585250b47b0b643407457053eca89008424be6281"},
|
5253 |
+
]
|
5254 |
+
|
5255 |
+
[package.dependencies]
|
5256 |
+
certifi = ">=2019.11.17"
|
5257 |
+
googleapis-common-protos = {version = ">=1.53.0", optional = true, markers = "extra == \"grpc\""}
|
5258 |
+
grpcio = {version = ">=1.59.0", optional = true, markers = "python_version >= \"3.11\" and python_version < \"4.0\" and extra == \"grpc\""}
|
5259 |
+
lz4 = {version = ">=3.1.3", optional = true, markers = "extra == \"grpc\""}
|
5260 |
+
pinecone-plugin-interface = ">=0.0.7,<0.0.8"
|
5261 |
+
protobuf = {version = ">=4.25,<5.0", optional = true, markers = "extra == \"grpc\""}
|
5262 |
+
protoc-gen-openapiv2 = {version = ">=0.0.1,<0.0.2", optional = true, markers = "extra == \"grpc\""}
|
5263 |
+
tqdm = ">=4.64.1"
|
5264 |
+
typing-extensions = ">=3.7.4"
|
5265 |
+
urllib3 = {version = ">=1.26.0", markers = "python_version >= \"3.8\" and python_version < \"3.12\""}
|
5266 |
+
|
5267 |
+
[package.extras]
|
5268 |
+
grpc = ["googleapis-common-protos (>=1.53.0)", "grpcio (>=1.44.0)", "grpcio (>=1.59.0)", "lz4 (>=3.1.3)", "protobuf (>=4.25,<5.0)", "protoc-gen-openapiv2 (>=0.0.1,<0.0.2)"]
|
5269 |
+
|
5270 |
+
[[package]]
|
5271 |
+
name = "pinecone-plugin-interface"
|
5272 |
+
version = "0.0.7"
|
5273 |
+
description = "Plugin interface for the Pinecone python client"
|
5274 |
+
optional = false
|
5275 |
+
python-versions = "<4.0,>=3.8"
|
5276 |
+
files = [
|
5277 |
+
{file = "pinecone_plugin_interface-0.0.7-py3-none-any.whl", hash = "sha256:875857ad9c9fc8bbc074dbe780d187a2afd21f5bfe0f3b08601924a61ef1bba8"},
|
5278 |
+
{file = "pinecone_plugin_interface-0.0.7.tar.gz", hash = "sha256:b8e6675e41847333aa13923cc44daa3f85676d7157324682dc1640588a982846"},
|
5279 |
+
]
|
5280 |
+
|
5281 |
+
[[package]]
|
5282 |
+
name = "pinecone-text"
|
5283 |
+
version = "0.9.0"
|
5284 |
+
description = "Text utilities library by Pinecone.io"
|
5285 |
+
optional = false
|
5286 |
+
python-versions = "<4.0,>=3.8"
|
5287 |
+
files = [
|
5288 |
+
{file = "pinecone_text-0.9.0-py3-none-any.whl", hash = "sha256:7a1ad2e282d10b59f0288a2a4f4b8c583a77378172232fae573cf398a3c44240"},
|
5289 |
+
{file = "pinecone_text-0.9.0.tar.gz", hash = "sha256:f8244a9bc090ee2fc904053a2415cfc114fd8bbfbc9a6ba8b0581c84990d0239"},
|
5290 |
+
]
|
5291 |
+
|
5292 |
+
[package.dependencies]
|
5293 |
+
mmh3 = ">=4.1.0,<5.0.0"
|
5294 |
+
nltk = ">=3.6.5,<4.0.0"
|
5295 |
+
numpy = {version = ">=1.21.5,<2.0", markers = "python_version < \"3.12\""}
|
5296 |
+
python-dotenv = ">=1.0.1,<2.0.0"
|
5297 |
+
requests = ">=2.25.0,<3.0.0"
|
5298 |
+
types-requests = ">=2.25.0,<3.0.0"
|
5299 |
+
wget = ">=3.2,<4.0"
|
5300 |
+
|
5301 |
+
[package.extras]
|
5302 |
+
cohere = ["cohere (>=4.37,<5.0)"]
|
5303 |
+
dense = ["openai (>=1.2.3,<2.0.0)", "sentence-transformers (>=2.0.0)", "torch (>=1.13.1)", "transformers (>=4.26.1)"]
|
5304 |
+
openai = ["openai (>=1.2.3,<2.0.0)"]
|
5305 |
+
splade = ["sentence-transformers (>=2.0.0)", "torch (>=1.13.1)", "transformers (>=4.26.1)"]
|
5306 |
+
|
5307 |
[[package]]
|
5308 |
name = "platformdirs"
|
5309 |
version = "4.2.2"
|
|
|
5413 |
{file = "protobuf-4.25.3.tar.gz", hash = "sha256:25b5d0b42fd000320bd7830b349e3b696435f3b329810427a6bcce6a5492cc5c"},
|
5414 |
]
|
5415 |
|
5416 |
+
[[package]]
|
5417 |
+
name = "protoc-gen-openapiv2"
|
5418 |
+
version = "0.0.1"
|
5419 |
+
description = "Provides the missing pieces for gRPC Gateway."
|
5420 |
+
optional = false
|
5421 |
+
python-versions = ">=3.6"
|
5422 |
+
files = [
|
5423 |
+
{file = "protoc-gen-openapiv2-0.0.1.tar.gz", hash = "sha256:6f79188d842c13177c9c0558845442c340b43011bf67dfef1dfc3bc067506409"},
|
5424 |
+
{file = "protoc_gen_openapiv2-0.0.1-py3-none-any.whl", hash = "sha256:18090c8be3877c438e7da0f7eb7cace45a9a210306bca4707708dbad367857be"},
|
5425 |
+
]
|
5426 |
+
|
5427 |
+
[package.dependencies]
|
5428 |
+
googleapis-common-protos = "*"
|
5429 |
+
protobuf = ">=4.21.0"
|
5430 |
+
|
5431 |
[[package]]
|
5432 |
name = "psutil"
|
5433 |
version = "6.0.0"
|
|
|
7996 |
{file = "websockets-12.0.tar.gz", hash = "sha256:81df9cbcbb6c260de1e007e58c011bfebe2dafc8435107b0537f393dd38c8b1b"},
|
7997 |
]
|
7998 |
|
7999 |
+
[[package]]
|
8000 |
+
name = "wget"
|
8001 |
+
version = "3.2"
|
8002 |
+
description = "pure python download utility"
|
8003 |
+
optional = false
|
8004 |
+
python-versions = "*"
|
8005 |
+
files = [
|
8006 |
+
{file = "wget-3.2.zip", hash = "sha256:35e630eca2aa50ce998b9b1a127bb26b30dfee573702782aa982f875e3f16061"},
|
8007 |
+
]
|
8008 |
+
|
8009 |
[[package]]
|
8010 |
name = "widgetsnbextension"
|
8011 |
version = "4.0.11"
|
|
|
8345 |
[metadata]
|
8346 |
lock-version = "2.0"
|
8347 |
python-versions = "3.11.9"
|
8348 |
+
content-hash = "2ae1f69bcfe5a188a2ce7639acd62f60ff6991988a3fc6fdeedc15194bc30bda"
|
prompt/prompt.yaml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_type: "prompt"
|
2 |
+
template: |
|
3 |
+
λΉμ μ 20λ
μ°¨ SNS λ§μΌν
AI μ΄μμ€ν΄νΈ μ
λλ€. μ¬μ©μμ μμ²μ¬νμ λ°λΌ μ μ ν SNS κ²μκΈμ μμ±ν΄ μ£ΌμΈμ.
|
4 |
+
λ°λμ λ΅λ³μλ emoji λ₯Ό ν¬ν¨ν΄μΌ ν©λλ€. λ΅λ³μ λμλ μ μ ν ν΄μνκ·Έλ₯Ό ν¬ν¨ν΄ μ£ΌμΈμ.
|
5 |
+
|
6 |
+
#Question:
|
7 |
+
{question}
|
8 |
+
|
9 |
+
#Answer:
|
10 |
+
input_variables: ["question"]
|
pyproject.toml
CHANGED
@@ -22,6 +22,7 @@ langchain-openai = "^0.1.16"
|
|
22 |
httpx = "^0.27.0"
|
23 |
langchain-experimental = "^0.0.62"
|
24 |
autorag = "^0.2.10"
|
|
|
25 |
|
26 |
|
27 |
[build-system]
|
|
|
22 |
httpx = "^0.27.0"
|
23 |
langchain-experimental = "^0.0.62"
|
24 |
autorag = "^0.2.10"
|
25 |
+
langchain-teddynote = "^0.0.11"
|
26 |
|
27 |
|
28 |
[build-system]
|