-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2. Optimize Google search URL extraction 3. Abstract code logic, refactor search code 4. function call empty message does not enter message history
- Loading branch information
Showing
6 changed files
with
210 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import os | ||
os.system("clear") | ||
import sys | ||
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | ||
import config | ||
import threading | ||
from langchain.prompts import PromptTemplate | ||
from langchain.chains import LLMChain | ||
from langchain.chat_models import ChatOpenAI | ||
from langchain.chat_models import ChatOpenAI | ||
|
||
class ThreadWithReturnValue(threading.Thread): | ||
def run(self): | ||
if self._target is not None: | ||
self._return = self._target(*self._args, **self._kwargs) | ||
|
||
def join(self): | ||
super().join() | ||
return self._return | ||
|
||
|
||
text = """ | ||
HomeReviewsAppleShould You Wait for the iPhone 15?Should You Install the Latest Version of iOS 16?iOS 16 ProblemsHow to Fix iOS 16 ProblemsThings the Apple Watch Can DoHow to Hide iPhone LocationAndroidBest Android Phones Under $200 (2023)Samsung Galaxy S22 ProblemsSamsung Galaxy Android 13 Update Info (2023)How ToHow to Fix iPhone 14 ProblemsHow to Fix iPhone 14 Battery Life ProblemsHow to Fix iPhone 14 Performance ProblemsGamingHow to Fix NBA 2K23 ProblemsBest Offline GamesEditor’s ChoiceAbout Connect with us Gotta Be Mobile5 Things to Know About the macOS Ventura 13.6.1 UpdateHomeReviewsAppleShould You Wait for the iPhone 15?Should You Install the Latest Version of iOS 16?iOS 16 ProblemsHow to Fix iOS 16 ProblemsThings the Apple Watch Can DoHow to Hide iPhone LocationAndroidBest Android Phones Under $200 (2023)Samsung Galaxy S22 ProblemsSamsung Galaxy Android 13 Update Info (2023)How ToHow to Fix iPhone 14 ProblemsHow to Fix iPhone 14 Battery Life ProblemsHow to Fix iPhone 14 Performance ProblemsGamingHow to Fix NBA 2K23 ProblemsBest Offline GamesEditor’s ChoiceAbout Apple5 Things to Know About the macOS Ventura 13.6.1 UpdatePublished 2 weeks ago on 11/16/2023By Adam Mills Apple’s pushed a brand new macOS Ventura 13.6.1 to Mac users.macOS Ventura 13.6.1 is a point release and it’s a small upgrade for Mac lingering on macOS Ventura. The software brings under-the-hood improvements to these devices.With that in mind, we want to take you through everything there you need to know about the latest macOS Ventura update for Mac.Table of ContentsmacOS Ventura 13.6.1 ReviewmacOS Ventura 13.6.1 ProblemsmacOS Ventura 13.6.1 FeaturesmacOS Ventura 13.6.1 DowngradeWhat’s NextWe’ll start out with some quick impressions regarding macOS Ventura 13.6.1 update’s performance.macOS Ventura 13.6.1 ReviewIf your Mac is currently running macOS Ventura 13.6, you’ll see a fairly small download. After the download, the installation should take around 10 or so minutes to complete.For more on the macOS Ventura 13.6.1 download and installation, take a look at our guide. It’ll walk you through everything you need to know before you install the new firmware on your Mac.We’ve been using the macOS Ventura 13.6.1 update on a MacBook Pro (2017) for several days now and performance is holding up nicely. Here’s what we’ve learned about its performance:macOS Ventura 13.6.1 Battery Life & ConnectivityBattery life is stable right now and we haven’t noticed any abnormal drainWi-Fi connectivity is currently fast and reliableBluetooth is working normallyApp PerformanceThird-party apps, including Twitter, Slack, Chrome, and Spotify are working properlyFirst party apps like Safari and Podcasts are also stable at the momentSpeedmacOS Ventura 13.6.1 feels fast and we haven’t noticed any UI lagIf your Mac is struggling on macOS Ventura 13.6 or an older version of macOS, you might want to install macOS Ventura 13.6.1 on your Mac right now.If you’re feeling leery, we’ve put together a list of the best reasons to, and not to, install the latest version of macOS Ventura on you Mac today.macOS Ventura 13.6.1 ProblemsApple tested macOS Ventura 13.6.1 for issues behind the scenes, but problems have unsurprisingly made their way into the public releaseWe haven’t noticed any major bugs or performance issues yet, but some users are complaining about performance issues and bugs.The current list of problems includes abnormal battery drain, Wi-Fi issues, Bluetooth problems, and problems with various first and third-party applications.If you run into issues on macOS Ventura 13.6.1, here are a few resources that could help.Before you get in touch with Apple’s customer support, have a look at our list of fixes for the most common macOS Ventura problems.If your Mac’s battery life is struggling after the upgrade, check out our fixes for macOS Ventura battery life problems.If you can’t find what you’re looking for in our guides, head over to Apple’s discussion forums. If the users there can’t help you, you might want to get in touch Apple customer support via the company’s website.If you still can’t fix your issue(s), you’ll probably want to schedule an appointment at your local Apple Store.macOS Ventura 13.6.1 FeaturesApple’s maintenance updates typically bring under-the-hood improvements to Mac devices and that’s exactly what macOS Ventura 13.6.1 brings to the table.The software doesn’t have any new features or bug fixes on board, but instead delivers security patches to Mac devices. You can learn more about the patches over on Apple’s security site.macOS Ventura 13.6.1 DowngradeIf you run into problems on macOS Ventura 13.6.1, you can try moving your Mac’s software back to an older version if you think it could help.If you’re interested in moving back to older software, have a look at our downgrade guide. It will help you get familiar with the process and make the move back.What’s NextIf your Mac is struggling on macOS Ventura 13.6.1 or an older version of macOS, you’ll be on your own for a bit.macOS Ventura 13.6.1 won’t be the last version of macOS Ventura, but it’s unclear when the next version will roll out to those still utilizing the operating system.We don’t expect Apple to bring new features to macOS Ventura down the line, but we do expect the company to continue offering security updates.These upgrades will probably roll out alongside new versions of macOS Sonoma so be on the lookout in the weeks ahead. The next version of macOS Sonoma should roll out in December.4 Reasons Not to Install macOS Ventura 13.6.1 & 11 Reasons You ShouldInstall macOS Ventura 13.6.1 for Better Security>1 / 15If you want to protect your Mac and its data from harm, you'll probably want to download the newest version of macOS Ventura.macOS Ventura 13.6.1's focus is on security and the firmware brings important security patches to Macs. The software patches up issues with FindMy, PassKeys, and more.As for older updates, Apple's macOS Ventura 13.6 update had a trio of security patches on board. If you're interested in the particulars, check out the company's security site.macOS Ventura 13.5.2 brought one security patch with it and it was an important one. If you want more information about the fix, head over to Apple.macOS Ventura 13.5 brought 29 security patches to Mac. To learn more about these patches, head over to Apple's website. macOS Ventura 13.4.1 had two essential security patches on board. If you want to learn more about them, head on over to Apple's website.Apple's macOS Security Response 13.4.1 (c) update also included a security update and you can learn more about it right here.macOS Ventura 13.4 had numerous security updates on board and you can read more about them on Apple's security site.macOS Ventura 13.3.1 patched up two actively exploited vulnerabilities which made it an important download. You can learn about the two patches right here.The macOS Ventura 13.3 update brought numerous security patches to Macs. If you want to learn more about these changes, check out Apple's guide.macOS Ventura 13.2.1 brought four security patches to compatible Mac models. You can read more about those over on Apple's security site.The macOS Ventura 13.2 update brought 25 security patches to Mac devices. You can read about those right here.In addition, the software came with support for physical security keys for Apple ID. These will beef up your account security by requiring a physical security key as part of the two factor authentication sign in process. Learn more about the change right here.macOS Ventura 13.1 delivered 35 security patches and it also brought upgrades to Advanced Data Protection for iCloud.macOS Ventura 13.0.1 brought two security patches and the first version of macOS Ventura, macOS Ventura 13.0, had a ton of patches on board. >1 / 15Related Topics:AppleMacBookMacBook PromacOSmacOS VenturamacOS Ventura 13.6.1macOS Ventura 13.6.1 changesmacOS Ventura 13.6.1 featuresmacOS Ventura 13.6.1 issuesmacOS Ventura 13.6.1 performancemacOS Ventura 13.6.1 problemsmacOS Ventura 13.6.1 reviewmacOS Ventura 13.6.1 reviewsmacOS Ventura 13.6.1 softwaremacOS Ventura 13.6.1 updatemacOS Ventura 13.6.1 upgradeSoftwareTechnologyClick to commentLeave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. Δ As an Amazon Associate I earn from qualifying purchases. Privacy Policy Copyright © 2023 SXL Media Group, Inc. | ||
""" | ||
|
||
summary_prompt = PromptTemplate( | ||
input_variables=["web_summary", "question", "language"], | ||
template=( | ||
"You need to response the following question: {question}." | ||
"Your task is answer the above question in {language} based on the Search results provided." | ||
"Search results: {web_summary}." | ||
# "If there is no relevant content in the search results, just answer None, do not make any explanations." | ||
), | ||
) | ||
chainllm = ChatOpenAI(temperature=config.temperature, openai_api_base=config.bot_api_url.v1_url, model_name=config.GPT_ENGINE, openai_api_key=config.API) | ||
|
||
chain = LLMChain(llm=chainllm, prompt=summary_prompt) | ||
|
||
# result = chain.run({"web_summary": text, "question": "macos 13.6 有什么新功能", "language": config.LANGUAGE}) | ||
chain_thread = ThreadWithReturnValue(target=chain.run, args=({"web_summary": text, "question": "macos 13.6 有什么新功能", "language": config.LANGUAGE},)) | ||
chain_thread.start() | ||
result = chain_thread.join() | ||
print(result) |
Oops, something went wrong.