rahgadda commited on
Commit
cea9bb3
·
1 Parent(s): df3171c

Initial Draft

Browse files
app.py CHANGED
@@ -474,13 +474,14 @@ def main():
474
  # -- Generate User Story LLM Response
475
  if ui_llm_provider and lv_extracted_text and not(lv_response) and "User Story" in ui_user_actions:
476
  # -- Pydantice Schema
477
- # lv_parser = PydanticOutputParser(pydantic_object=us.UserStory)
478
 
479
  # -- Creating Prompt
480
  lv_template = pt.CN_USER_STORY
481
  lv_summarize_prompt = PromptTemplate(
482
  template=lv_template,
483
- input_variables=["context"]
 
484
  )
485
  lv_summarize_prompt_formatted = lv_summarize_prompt.format(
486
  context=lv_extracted_text
@@ -506,14 +507,14 @@ def main():
506
  with release_notes:
507
  if ui_llm_provider and lv_extracted_text and not(lv_response) and "Release Notes" in ui_user_actions:
508
  # -- Pydantice Schema
509
- # lv_parser = PydanticOutputParser(pydantic_object=rs.ReleaseNotes)
510
 
511
  # -- Creating Prompt
512
  lv_template = pt.CN_RELEASE_NOTES
513
  lv_summarize_prompt = PromptTemplate(
514
  template=lv_template,
515
  input_variables=["context"],
516
- # partial_variables={"format_instructions": lv_parser.get_format_instructions()},
517
  )
518
  lv_summarize_prompt_formatted = lv_summarize_prompt.format(
519
  context=lv_extracted_text
@@ -537,14 +538,14 @@ def main():
537
  with requirement_generation:
538
  if ui_llm_provider and lv_extracted_text and not(lv_response) and "Requirement Generation" in ui_user_actions:
539
  # -- Pydantice Schema
540
- # lv_parser = PydanticOutputParser(pydantic_object=rq.RequirementGatheringDetails)
541
 
542
  # -- Creating Prompt
543
  lv_template = pt.CN_REQUIREMENT_GATHERING
544
  lv_summarize_prompt = PromptTemplate(
545
  template=lv_template,
546
  input_variables=["context"],
547
- # partial_variables={"format_instructions": lv_parser.get_format_instructions()},
548
  )
549
  lv_summarize_prompt_formatted = lv_summarize_prompt.format(
550
  context=lv_extracted_text
@@ -575,7 +576,7 @@ def main():
575
  ui_summary_input = st.text_area("Input Text", value=lv_extracted_text)
576
  if st.button("Summarize",key="summary"):
577
  # -- Creating Prompt
578
- # lv_template = pt.CN_SUMMARY
579
  lv_summarize_prompt = PromptTemplate(
580
  template=lv_template,
581
  input_variables=["context"]
 
474
  # -- Generate User Story LLM Response
475
  if ui_llm_provider and lv_extracted_text and not(lv_response) and "User Story" in ui_user_actions:
476
  # -- Pydantice Schema
477
+ lv_parser = PydanticOutputParser(pydantic_object=us.UserStory)
478
 
479
  # -- Creating Prompt
480
  lv_template = pt.CN_USER_STORY
481
  lv_summarize_prompt = PromptTemplate(
482
  template=lv_template,
483
+ input_variables=["context"],
484
+ partial_variables={"format_instructions": lv_parser.get_format_instructions()},
485
  )
486
  lv_summarize_prompt_formatted = lv_summarize_prompt.format(
487
  context=lv_extracted_text
 
507
  with release_notes:
508
  if ui_llm_provider and lv_extracted_text and not(lv_response) and "Release Notes" in ui_user_actions:
509
  # -- Pydantice Schema
510
+ lv_parser = PydanticOutputParser(pydantic_object=rs.ReleaseNotes)
511
 
512
  # -- Creating Prompt
513
  lv_template = pt.CN_RELEASE_NOTES
514
  lv_summarize_prompt = PromptTemplate(
515
  template=lv_template,
516
  input_variables=["context"],
517
+ partial_variables={"format_instructions": lv_parser.get_format_instructions()},
518
  )
519
  lv_summarize_prompt_formatted = lv_summarize_prompt.format(
520
  context=lv_extracted_text
 
538
  with requirement_generation:
539
  if ui_llm_provider and lv_extracted_text and not(lv_response) and "Requirement Generation" in ui_user_actions:
540
  # -- Pydantice Schema
541
+ lv_parser = PydanticOutputParser(pydantic_object=rq.RequirementGatheringDetails)
542
 
543
  # -- Creating Prompt
544
  lv_template = pt.CN_REQUIREMENT_GATHERING
545
  lv_summarize_prompt = PromptTemplate(
546
  template=lv_template,
547
  input_variables=["context"],
548
+ partial_variables={"format_instructions": lv_parser.get_format_instructions()},
549
  )
550
  lv_summarize_prompt_formatted = lv_summarize_prompt.format(
551
  context=lv_extracted_text
 
576
  ui_summary_input = st.text_area("Input Text", value=lv_extracted_text)
577
  if st.button("Summarize",key="summary"):
578
  # -- Creating Prompt
579
+ lv_template = pt.CN_SUMMARY
580
  lv_summarize_prompt = PromptTemplate(
581
  template=lv_template,
582
  input_variables=["context"]
dto/__pycache__/release_notes.cpython-310.pyc CHANGED
Binary files a/dto/__pycache__/release_notes.cpython-310.pyc and b/dto/__pycache__/release_notes.cpython-310.pyc differ
 
dto/__pycache__/requirement_gathering.cpython-310.pyc CHANGED
Binary files a/dto/__pycache__/requirement_gathering.cpython-310.pyc and b/dto/__pycache__/requirement_gathering.cpython-310.pyc differ
 
dto/__pycache__/user_story.cpython-310.pyc CHANGED
Binary files a/dto/__pycache__/user_story.cpython-310.pyc and b/dto/__pycache__/user_story.cpython-310.pyc differ