Skip to content

Commit

Permalink
update cache files for using_autogen_with_motleycrew_ipynb integratio…
Browse files Browse the repository at this point in the history
…n test
  • Loading branch information
User committed Jun 14, 2024
1 parent 58ea5b7 commit b1b45d7
Show file tree
Hide file tree
Showing 43 changed files with 46 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/Using AutoGen with motleycrew.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
" system_message=\"A human admin.\",\n",
" code_execution_config={\n",
" \"last_n_messages\": 2,\n",
" \"work_dir\": \"groupchat\",\n",
" \"work_dir\": \"examples/data/groupchat\",\n",
" \"use_docker\": False,\n",
" }, # Please set use_docker=True if docker is available to run the generated code. Using docker is safer than running the generated code directly.\n",
" human_input_mode=\"TERMINATE\",\n",
Expand Down
44 changes: 44 additions & 0 deletions examples/data/groupchat/fetch_latest_gpt4_paper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# filename: fetch_latest_gpt4_paper.py
import requests
from datetime import datetime

def fetch_latest_paper():
# Define the API endpoint
url = "http://export.arxiv.org/api/query"

# Set the search parameters to find papers related to GPT-4
params = {
"search_query": "all:GPT-4",
"sortBy": "submittedDate",
"sortOrder": "descending",
"max_results": 1
}

# Send a GET request to the API
response = requests.get(url, params=params)

if response.status_code == 200:
# Parse the response XML
from xml.etree import ElementTree as ET
root = ET.fromstring(response.content)

# Navigate to the entry element
entry = root.find('{http://www.w3.org/2005/Atom}entry')
if entry is not None:
# Extract title and summary (abstract)
title = entry.find('{http://www.w3.org/2005/Atom}title').text
summary = entry.find('{http://www.w3.org/2005/Atom}summary').text
published_date = entry.find('{http://www.w3.org/2005/Atom}published').text

# Convert published date to a readable format
published_datetime = datetime.strptime(published_date, '%Y-%m-%dT%H:%M:%SZ')

print("Title:", title)
print("Published Date:", published_datetime.strftime('%Y-%m-%d'))
print("Abstract:", summary.strip())
else:
print("No GPT-4 papers found.")
else:
print("Failed to fetch data from arXiv. Status code:", response.status_code)

fetch_latest_paper()
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
""
"The first general-purpose digital computer was ENIAC (Electronic Numerical Integrator and Computer), which was built by the United States during World War II and completed in 1946. It could execute different instructions based on data values, marking a significant milestone in computing history.\n\nHowever, while ENIAC is often recognized as the first general-purpose digital computer, Charles Babbage, an English mathematician, invented the concept of a programmable computer in the early 19th century with his designs for the analytical engine. Although it was never completed, Babbage's Analytical Engine was intended to use punched cards to program calculations, an idea that was very advanced for its time and laid the groundwork for modern computing.\n\n"

0 comments on commit b1b45d7

Please sign in to comment.