Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,14 +9,6 @@ from collections import deque
|
|
9 |
from typing import Dict, List, Optional, Any
|
10 |
|
11 |
from langchain import LLMChain, OpenAI, PromptTemplate
|
12 |
-
from langchain.embeddings import OpenAIEmbeddings
|
13 |
-
from langchain.llms import BaseLLM
|
14 |
-
from langchain.vectorstores.base import VectorStore
|
15 |
-
from pydantic import BaseModel, Field
|
16 |
-
from langchain.chains.base import Chain
|
17 |
-
from langchain.agents import ZeroShotAgent, Tool, AgentExecutor
|
18 |
-
from langchain import OpenAI, LLMChain
|
19 |
-
from langchain.chat_models import ChatOpenAI
|
20 |
import datetime
|
21 |
from datetime import datetime, date, time, timedelta
|
22 |
from llama_index import GPTSimpleVectorIndex, SimpleDirectoryReader, LLMPredictor, Document, ServiceContext
|
@@ -51,8 +43,6 @@ def get_learning_curriculum(openapikey,topic):
|
|
51 |
)
|
52 |
tasklist=json.loads(resp['choices'][0]['message']['content'])
|
53 |
|
54 |
-
llm = ChatOpenAI(temperature=0)
|
55 |
-
|
56 |
###Function to search the internet using Duck-Duck-Go exposed as a tool
|
57 |
def research_search(search_keyword,question_to_ask,topic):
|
58 |
llm_predictor = LLMPredictor(llm=OpenAIChat(temperature=0, model_name="gpt-3.5-turbo"))
|
|
|
9 |
from typing import Dict, List, Optional, Any
|
10 |
|
11 |
from langchain import LLMChain, OpenAI, PromptTemplate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
import datetime
|
13 |
from datetime import datetime, date, time, timedelta
|
14 |
from llama_index import GPTSimpleVectorIndex, SimpleDirectoryReader, LLMPredictor, Document, ServiceContext
|
|
|
43 |
)
|
44 |
tasklist=json.loads(resp['choices'][0]['message']['content'])
|
45 |
|
|
|
|
|
46 |
###Function to search the internet using Duck-Duck-Go exposed as a tool
|
47 |
def research_search(search_keyword,question_to_ask,topic):
|
48 |
llm_predictor = LLMPredictor(llm=OpenAIChat(temperature=0, model_name="gpt-3.5-turbo"))
|