Skip to content

Commit

Permalink
Merge pull request #7 from Strong-AI-Lab/JVNAUTOSCI-89-collect-the-te…
Browse files Browse the repository at this point in the history
…ll_von-inputs-and-infer-tasks-

Jvnautosci 89 collect the tell von inputs and infer tasks
  • Loading branch information
ysu132 authored Jul 23, 2024
2 parents 9c152b4 + 4002971 commit 5e974c5
Show file tree
Hide file tree
Showing 76 changed files with 279 additions and 144 deletions.
50 changes: 0 additions & 50 deletions paper_recommender/manifest.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
4 changes: 4 additions & 0 deletions src/UNKNOWN.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Metadata-Version: 2.1
Name: UNKNOWN
Version: 0.0.0
License-File: LICENSE
43 changes: 43 additions & 0 deletions src/UNKNOWN.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
LICENSE
README.md
pyproject.toml
src/UNKNOWN.egg-info/PKG-INFO
src/UNKNOWN.egg-info/SOURCES.txt
src/UNKNOWN.egg-info/dependency_links.txt
src/UNKNOWN.egg-info/top_level.txt
src/paper_recommender/src/paper_recommender/__init__.py
src/paper_recommender/src/paper_recommender/app.py
src/paper_recommender/src/paper_recommender/engine/__init__.py
src/paper_recommender/src/paper_recommender/engine/base.py
src/paper_recommender/src/paper_recommender/engine/open_ai.py
src/paper_recommender/src/paper_recommender/mangodb/__init__.py
src/paper_recommender/src/paper_recommender/mangodb/crud.py
src/paper_recommender/src/paper_recommender/paper_extraction/__init__.py
src/paper_recommender/src/paper_recommender/paper_extraction/aaai.py
src/paper_recommender/src/paper_recommender/paper_extraction/acl_anthology.py
src/paper_recommender/src/paper_recommender/paper_extraction/arxiv.py
src/paper_recommender/src/paper_recommender/paper_extraction/base.py
src/paper_recommender/src/paper_recommender/paper_extraction/from_url.py
src/paper_recommender/src/paper_recommender/paper_extraction/ijcai.py
src/paper_recommender/src/paper_recommender/paper_extraction/jmlr.py
src/paper_recommender/src/paper_recommender/paper_extraction/nature.py
src/paper_recommender/src/paper_recommender/paper_extraction/neurips.py
src/paper_recommender/src/paper_recommender/paper_extraction/pmlr.py
src/paper_recommender/src/paper_recommender/slack_templates/__init__.py
src/paper_recommender/src/paper_recommender/slack_templates/home.py
src/paper_recommender/src/paper_recommender/slack_templates/message.py
src/paper_recommender/src/paper_recommender/slack_templates/modal.py
src/ruminate/__init__.py
src/ruminate/ruminate.py
src/tell_von/__init__.py
src/tell_von/classify_notes.py
src/tell_von/config.py
src/tell_von/image-utilities.py
src/tell_von/main.py
src/tell_von/portal.py
src/tell_von/setup.py
src/vonlib/__init__.py
src/vonlib/googledrive.py
src/vonlib/googlemail.py
src/vonlib/llmconnect.py
src/vonlib/setup.py
1 change: 1 addition & 0 deletions src/UNKNOWN.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

4 changes: 4 additions & 0 deletions src/UNKNOWN.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
paper_recommender
ruminate
tell_von
vonlib
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions src/paper_recommender/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-e "git+https://github.com/Strong-AI-Lab/Von.git@a46877f9f34afcbcb986f06241129041a7df7e90#egg=paper_recommender&subdirectory=paper_recommender"
bs4==0.0.2
bson==0.5.10
configparser==7.0.0
dataclasses==0.6
DateTime==5.5
feedparser==6.0.11
openai==1.35.9
pathlib==1.0.1
pymongo==4.8.0
requests==2.32.3
slack_bolt==1.19.1
typing==3.7.4.3
File renamed without changes.
File renamed without changes.
36 changes: 23 additions & 13 deletions ruminate/ruminate.py → src/ruminate/ruminate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@


def check_file_is_test_file(file_content):
"""
Determines if the given file content is from a test file.
Args:
file_content (str): The content of the file.
Returns:
bool or None: True if the file is likely a test file, False if it is a genuine input, None if it's uncertain.
"""

# system_prompt = """You are an expert at analysising the content and structure of
# files. Can you determine if the following string is the content of test file? You should return True if the file has most likely been produced during testing
# and False if it is a genuine input. If it's difficult to tell, return Unknown.
# Err on the side of files being non-test files, but you should flag files whose content is just babbing or that obviously only talks about testing.
# Any coherent extended text should be considered a non-test file.
# The following is a real file, not a test file:'An early background function for vonUKU can be recognising and deleting (binning) test cases from portal development.'
# These are test files: 'test again with the button' and 'Test multi line input'
# This one is difficult to tell 'Does the text input area work now?' it was actually a test file. but it's not obvious."""
system_prompt = """
You are an expert in analyzing file content and structure. Your task is to determine if the following string is from a test file. Return 'True' if the content is likely produced during testing, 'False' if it is a genuine input, and 'Unknown' if it is difficult to tell.
Expand Down Expand Up @@ -81,6 +82,7 @@ def analyze_file_content(file_content):

return next_step, additional_info


def generate_followup_questions(file_content):
"""
Generates follow-up questions based on the file content.
Expand Down Expand Up @@ -112,11 +114,17 @@ def generate_followup_questions(file_content):
return questions



def ruminate(folder_id=get_default_folder_id()):
"""
Iterates through the files in the specified folder and performs analysis on their content.
Args:
folder_id (str): The ID of the folder to iterate through. Defaults to the default folder ID.
Returns:
None
"""

# Iterate through the files and print their names
# Call the function with the folder ID
file_limit = 3
file_counter = 0

Expand All @@ -139,6 +147,8 @@ def ruminate(folder_id=get_default_folder_id()):
print(".")

file_counter += 1


ruminate()


if __name__ == "__main__":
ruminate()
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5e974c5

Please sign in to comment.