ajitesh123 / Perf-Review-AI

Write perf reviews in a minute
https://perfor-ai.streamlit.app/
1 stars 0 forks source link

Sweep: Add option for user submit questions that model will answer #6

Open ajitesh123 opened 3 months ago

ajitesh123 commented 3 months ago
sweep-ai[bot] commented 3 months ago

πŸš€ Here's the PR! #8

See Sweep's progress at the progress dashboard!
πŸ’Ž Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID: dede47c9cc)
Install Sweep Configs: Pull Request

[!TIP] I can email you next time I complete a pull request if you set up your email here!


Actions (click)


Step 1: πŸ”Ž Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/ajitesh123/Perf-Review-AI/blob/0b2df5178146fd4cdae799767cf510686fad8326/src/app.py#L20-L57

Step 2: ⌨️ Coding

--- 
+++ 
@@ -18,12 +18,12 @@
     print(response.choices[0].message.content)
     return response.choices[0].message.content

-def generate_review(your_role, candidate_role, your_review, your_openai_key):
+def generate_review(your_role, candidate_role, your_review, user_questions, your_openai_key):
     prompt = generate_prompt(your_role, candidate_role, your_review)
     response = get_completion(prompt, your_openai_key)
     return response

-def generate_prompt(your_role, candidate_role, your_review):
+def generate_prompt(your_role, candidate_role, your_review, user_questions):
     delimiter = "####"
     prompt = f"""
     I’m {your_role}. You’re an expert at writing performance reviews. On my behalf, help answer the question for performance reviews below.
@@ -39,9 +39,7 @@
     

     
-    - Describe example(s) of the topics selected. What was the context? What actions did they take?
-    - In your opinion, what impact did their actions have?
-    - What recommendations do you have for their growth and development? Your feedback can be about any area of their work.
+    " + '\n'.join(user_questions) + "
     

     {delimiter} Output in markdown format in following structure:{delimiter}
@@ -64,6 +62,6 @@
 your_review = st.text_area('Briefly describe your experience of working with the candidate including project, responsibility of candidate, unique things they did etc., in free flow writing')

 if st.button('Write Review'):
-    review = generate_review(your_role, candidate_role, your_review, your_openai_key)
+    review = generate_review(your_role, candidate_role, your_review, ['Sample question 1', 'Sample question 2'], your_openai_key)
     st.markdown(review)
 2

Ran GitHub Actions for 503be8824ac1cb478550cc25f58fa8d3eb82d923:


Step 3: πŸ” Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/add_option_for_user_submit_questions_tha.


πŸŽ‰ Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

πŸ’‘ To recreate the pull request edit the issue title or description. Something wrong? Let us know.

This is an automated message generated by Sweep AI.