Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import os
|
|
8 |
import json
|
9 |
import uuid
|
10 |
import tiktoken
|
11 |
-
import
|
12 |
from dotenv import load_dotenv
|
13 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
14 |
from langchain_core.documents import Document
|
@@ -29,7 +29,7 @@ from pathlib import Path
|
|
29 |
anyscale_api_key = 'esecret_gseacat1ltrafee81njti6867e'
|
30 |
#userdata.get('anyscale_apiKey')
|
31 |
|
32 |
-
client =
|
33 |
api_key=anyscale_api_key
|
34 |
)
|
35 |
|
|
|
8 |
import json
|
9 |
import uuid
|
10 |
import tiktoken
|
11 |
+
from openai import OpenAI
|
12 |
from dotenv import load_dotenv
|
13 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
14 |
from langchain_core.documents import Document
|
|
|
29 |
anyscale_api_key = 'esecret_gseacat1ltrafee81njti6867e'
|
30 |
#userdata.get('anyscale_apiKey')
|
31 |
|
32 |
+
client = OpenAI(base_url="https://api.endpoints.anyscale.com/v1",
|
33 |
api_key=anyscale_api_key
|
34 |
)
|
35 |
|