Roland Ding commited on
Commit
721214f
·
1 Parent(s): c769f48

use llm from chains.py as universal AI agent.

Browse files
Files changed (2) hide show
  1. chains.py +0 -1
  2. features.py +0 -9
chains.py CHANGED
@@ -106,7 +106,6 @@ if __name__ == "__main__":
106
  sample_artice = ".samples/Ha SK, 2008.pdf"
107
  sample_content,_ = read_pdf(sample_artice)
108
 
109
- llm = ChatOpenAI(temperature=0.0,model_name="gpt-3.5-turbo-16k")
110
  with open(".prompts/other/Operation Time.txt") as f:
111
  prompt = f.read()
112
  name = "Operation Time"
 
106
  sample_artice = ".samples/Ha SK, 2008.pdf"
107
  sample_content,_ = read_pdf(sample_artice)
108
 
 
109
  with open(".prompts/other/Operation Time.txt") as f:
110
  prompt = f.read()
111
  name = "Operation Time"
features.py CHANGED
@@ -170,10 +170,6 @@ def update_article_segment(article):
170
 
171
  @aterminal_print # need to review this.
172
  async def get_segments(article,prompts):
173
- llm = ChatOpenAI(
174
- temperature=0.0,
175
- model_name="gpt-3.5-turbo-16k",
176
- openai_api_key=openai.api_key)
177
  tasks = []
178
 
179
  for name,p in prompts.items():
@@ -591,11 +587,6 @@ def post_process(article):
591
  ("system","From the text above {instruction}"),
592
  ])
593
 
594
- llm = ChatOpenAI(
595
- temperature=0.0,
596
- model_name="gpt-3.5-turbo-16k",
597
- openai_api_key=openai.api_key)
598
-
599
  chain = template | llm
600
 
601
  post_loop = asyncio.new_event_loop()
 
170
 
171
  @aterminal_print # need to review this.
172
  async def get_segments(article,prompts):
 
 
 
 
173
  tasks = []
174
 
175
  for name,p in prompts.items():
 
587
  ("system","From the text above {instruction}"),
588
  ])
589
 
 
 
 
 
 
590
  chain = template | llm
591
 
592
  post_loop = asyncio.new_event_loop()