Giter Site home page Giter Site logo

frrrrrrrrank / auto_job__find__chatgpt__rpa Goto Github PK

View Code? Open in Web Editor NEW
1.4K 1.4K 209.0 34 KB

This is a tool used to automatically generate a cover letter using chatgpt based on your resume and job description and send messages to bosses in China.

Python 100.00%

auto_job__find__chatgpt__rpa's People

Contributors

eltociear avatar frrrrrrrrank avatar sdli416 avatar winson-030 avatar yilin-gong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auto_job__find__chatgpt__rpa's Issues

发送求职信息不全/乱码

屏幕截图 2024-01-09 232903

可以正常扫码登录boss直聘,如图所示在给hr发送的求职信息不全并且看起来似乎有些怪,在发送第二个求职信息的时候输出的是乱码,随后不再继续检索职位喝发送信息。

如下面的代码所示,之前遇到一个报错然后我把langchain_functions.py文件中的temperature从3改成了2,不知道对我上面的错误会不会有影响,希望得到解答,谢谢
llm = ChatOpenAI(temperature=2, openai_api_base=OPENAI_BASE_URL, openai_api_key=OPENAI_API_KEY)

并且好像没有创建asistant

扫码登录后,很快就退出了。终端里也看不出啥问题,大佬能帮忙看看不?

(auto-job) claire@claires-MacBook-Pro auto_job_find % python write_response.py
OpenAI version is compatible.
Loaded existing assistant ID.
Loaded existing assistant ID.
An error occurred: Message:
Stacktrace:
0 chromedriver 0x0000000100ea053c chromedriver + 3966268
1 chromedriver 0x0000000100e98ac8 chromedriver + 3934920
2 chromedriver 0x0000000100b1bda0 chromedriver + 277920
3 chromedriver 0x0000000100b5e394 chromedriver + 549780
4 chromedriver 0x0000000100b96bf0 chromedriver + 781296
5 chromedriver 0x0000000100b52fb0 chromedriver + 503728
6 chromedriver 0x0000000100b53a28 chromedriver + 506408
7 chromedriver 0x0000000100e65724 chromedriver + 3725092
8 chromedriver 0x0000000100e69c18 chromedriver + 3742744
9 chromedriver 0x0000000100e4e20c chromedriver + 3629580
10 chromedriver 0x0000000100e6a714 chromedriver + 3745556
11 chromedriver 0x0000000100e41584 chromedriver + 3577220
12 chromedriver 0x0000000100e88f74 chromedriver + 3870580
13 chromedriver 0x0000000100e89118 chromedriver + 3871000
14 chromedriver 0x0000000100e98738 chromedriver + 3934008
15 libsystem_pthread.dylib 0x000000018945d034 _pthread_start + 136
16 libsystem_pthread.dylib 0x0000000189457e3c thread_start + 8

探讨未来可能的合作机会

尊敬的 Frrrrrrrrank,

您好,我叫陈子川,一名市场运营。在初次发现您的项目时,我被其独特的创新性所吸引,并考虑了其在市场上的盈利场景。然而,深入了解您的项目后,我选择理解并尊重您不希望项目用于商业割韭菜的初衷。

因此,我在此想问的是,是否有可能在未来与您探索一些商业性质的合作机会,是否可以和您成为朋友。基于我们共同的价值观和目标,我相信我们未来或许可以找到一些既能尊重您的项目初衷,又能为市场带来积极盈利影响的合作方式。我其实也非常想用AI为大众创造具有巨大价值的产品。

再次表达:我十分尊重您的观点和项目的价值,并希望能有机会与您进一步交流。

再次感谢您为开源社区所做的贡献,我期待着有机会与您交流,如果您能回复的话,陈某人感激不尽。

best wish,

by陈子川

Mac | WebDriver | DevToolsActivePort file doesn't exist

(session not created: DevToolsActivePort file doesn't exist)
(The process started from chrome location /Applications/Google Chrome.app/Contents/MacOS/Google Chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:

运行后扫码登录成功后报错

OpenAI version is compatible.
An error occurred: Error code: 400 - {'error': {'message': "3.0 is greater than the maximum of 2 - 'temperature'", 'type': 'invalid_request_error', 'param': None, 'code': None}}

进程已结束,退出代码0

ENV:
Python 3.10.10
win10

OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_API_KEY='sess-EkhvXXXXXXXXXXXX'

修改后:
llm = ChatOpenAI(temperature=2, openai_api_base=OPENAI_BASE_URL, openai_api_key=OPENAI_API_KEY)
重新运行扫码登录后报错:
An error occurred: Error code: 400 - {'error': {'message': "This model's maximum context length is 4097 tokens. However, your messages resulted in 5600 tokens. Please reduce the length of the messages.", 'type': 'invalid_request_error', 'param': 'messages', 'code': 'context_length_exceeded'}}

进程已结束,退出代码0

"3.0 is greater than the maximum of 2,不知道是不是模型配置问题,但是代码里没有找到这个可以设置temperature的点

你好以下是报错的信息

python write_response.py
OpenAI version is compatible.
text_chunks length: 1
 ~~(简历内容)~~ 

Vectorstore created successfully.
立即沟通
An error occurred: Error code: 400 - {'error': {'message': "3.0 is greater than the maximum of 2 - 'temperature'", 'type': 'invalid_request_error', 'param': None, 'code': None}}

使用的是assistant,sk-xxxxxxxxxxxxxxx,
python 3.11
mac

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

OpenAI version is compatible.
Loaded existing assistant ID.
Loaded existing assistant ID.
Traceback (most recent call last):
File "/Users/Cheryl/openai-env/lib/python3.10/site-packages/selenium/webdriver/common/selenium_manager.py", line 137, in run
output = json.loads(stdout)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/Cheryl/openai-env/lib/python3.10/site-packages/selenium/webdriver/common/driver_finder.py", line 38, in get_path
path = SeleniumManager().driver_location(options) if path is None else path
File "/Users/Cheryl/openai-env/lib/python3.10/site-packages/selenium/webdriver/common/selenium_manager.py", line 103, in driver_location
output = self.run(args)
File "/Users/Cheryl/openai-env/lib/python3.10/site-packages/selenium/webdriver/common/selenium_manager.py", line 140, in run
raise WebDriverException(f"Unsuccessful command executed: {command}") from err
selenium.common.exceptions.WebDriverException: Message: Unsuccessful command executed: /Users/Cheryl/openai-env/lib/python3.10/site-packages/selenium/webdriver/common/macos/selenium-manager --browser chrome --output json

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/Cheryl/PycharmProjects/pythonProject/auto_job__find__chatgpt__rpa/auto_job_find/write_response.py", line 192, in
send_job_descriptions_to_chat(url, browser_type,label, assistant_id=assistant_id)
File "/Users/Cheryl/PycharmProjects/pythonProject/auto_job__find__chatgpt__rpa/auto_job_find/write_response.py", line 131, in send_job_descriptions_to_chat
finding_jobs.open_browser_with_options(url, browser_type)
File "/Users/Cheryl/PycharmProjects/pythonProject/auto_job__find__chatgpt__rpa/auto_job_find/finding_jobs.py", line 25, in open_browser_with_options
driver = webdriver.Chrome(options=options)
File "/Users/Cheryl/openai-env/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in init
super().init(
File "/Users/Cheryl/openai-env/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 49, in init
self.service.path = DriverFinder.get_path(self.service, options)
File "/Users/Cheryl/openai-env/lib/python3.10/site-packages/selenium/webdriver/common/driver_finder.py", line 41, in get_path
raise NoSuchDriverException(msg) from err
selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for chrome using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location

运行write_response.py提示如上错误,要怎么解决呀,谢谢

OpenAI version is compatible报错

OpenAI version is compatible.
Traceback (most recent call last):
File "D:\Code\python\auto_job__find__chatgpt__rpa\auto_job_find\write_response.py", line 188, in
vectorstore = get_vectorstore(chunks)
File "D:\Code\python\auto_job__find__chatgpt__rpa\auto_job_find\langchain_functions.py", line 54, in get_vectorstore
vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
File "D:\Program Files\Python310\lib\site-packages\langchain_community\vectorstores\faiss.py", line 959, in from_texts
embeddings = embedding.embed_documents(texts)
File "D:\Program Files\Python310\lib\site-packages\langchain_community\embeddings\openai.py", line 668, in embed_documents
return self._get_len_safe_embeddings(texts, engine=engine)
File "D:\Program Files\Python310\lib\site-packages\langchain_community\embeddings\openai.py", line 494, in _get_len_safe_embeddings
response = embed_with_retry(
File "D:\Program Files\Python310\lib\site-packages\langchain_community\embeddings\openai.py", line 116, in embed_with_retry
return embeddings.client.create(**kwargs)
File "D:\Program Files\Python310\lib\site-packages\openai\resources\embeddings.py", line 106, in create
return self._post(
File "D:\Program Files\Python310\lib\site-packages\openai_base_client.py", line 1088, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "D:\Program Files\Python310\lib\site-packages\openai_base_client.py", line 853, in request
return self._request(
File "D:\Program Files\Python310\lib\site-packages\openai_base_client.py", line 930, in _request
raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError:

<title>404 Not Found</title>

404 Not Found


nginx

一直在in thread...中

image
用得是gpt3.5,在openai api的assistants也有对应的assistant_id,已经开了代理,pdf只有1页,但在in thread...步骤中停止了

成功登陆后程序报错

系统

macOS Ventura

python 版本

3.11

依赖版本

写了个 requirement.txt 自动安装的

配置

已经配置了boss的职位下拉菜单,write_response.py 文件中也设定了同样的名字

报错

成功登陆后,没有自动点击岗位并发送求职信息,程序出现下面的错误并停止。

OpenAI version is compatible.
Loaded existing assistant ID.
Loaded existing assistant ID.
An error occurred: Message: 
Stacktrace:
0   chromedriver                        0x000000010079c4dc chromedriver + 4162780
1   chromedriver                        0x0000000100794664 chromedriver + 4130404
2   chromedriver                        0x00000001003ebbc0 chromedriver + 293824
3   chromedriver                        0x0000000100432040 chromedriver + 581696
4   chromedriver                        0x0000000100471ab0 chromedriver + 842416
5   chromedriver                        0x00000001004256bc chromedriver + 530108
6   chromedriver                        0x0000000100426930 chromedriver + 534832
7   chromedriver                        0x0000000100761e08 chromedriver + 3923464
8   chromedriver                        0x00000001007663dc chromedriver + 3941340
9   chromedriver                        0x000000010074a038 chromedriver + 3825720
10  chromedriver                        0x0000000100766f3c chromedriver + 3944252
11  chromedriver                        0x000000010073c6f4 chromedriver + 3770100
12  chromedriver                        0x0000000100783980 chromedriver + 4061568
13  chromedriver                        0x0000000100783af8 chromedriver + 4061944
14  chromedriver                        0x00000001007942e4 chromedriver + 4129508
15  libsystem_pthread.dylib             0x000000019a653fa8 _pthread_start + 148
16  libsystem_pthread.dylib             0x000000019a64eda0 thread_start + 8

疑问

请问这是driver的版本问题吗?我需要如何排查问题?

报错提示缺少 pypdf ,但安装后依然报错

辛苦作者帮看看,报错信息如下:

OpenAI version is compatible.
Error loading file resume/my_cover.pdf
Traceback (most recent call last):
File "/Users/zion/Code/auto_job__find__chatgpt__rpa/.venv/lib/python3.12/site-packages/langchain_community/document_loaders/pdf.py", line 152, in init
import pypdf # noqa:F401
^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pypdf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/zion/Code/auto_job__find__chatgpt__rpa/auto_job_find/write_response.py", line 186, in
text = read_resumes()
^^^^^^^^^^^^^^
File "/Users/zion/Code/auto_job__find__chatgpt__rpa/auto_job_find/langchain_functions.py", line 26, in read_resumes
pdf_pages = d_loader.load()
^^^^^^^^^^^^^^^
File "/Users/zion/Code/auto_job__find__chatgpt__rpa/.venv/lib/python3.12/site-packages/langchain_community/document_loaders/directory.py", line 158, in load
self.load_file(i, p, docs, pbar)
File "/Users/zion/Code/auto_job__find__chatgpt__rpa/.venv/lib/python3.12/site-packages/langchain_community/document_loaders/directory.py", line 107, in load_file
raise e
File "/Users/zion/Code/auto_job__find__chatgpt__rpa/.venv/lib/python3.12/site-packages/langchain_community/document_loaders/directory.py", line 100, in load_file
sub_docs = self.loader_cls(str(item), **self.loader_kwargs).load()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/zion/Code/auto_job__find__chatgpt__rpa/.venv/lib/python3.12/site-packages/langchain_community/document_loaders/pdf.py", line 154, in init
raise ImportError(
ImportError: pypdf package not found, please install it with pip install pypdf

网络问题

哥 有没有梯子推荐 我的不能在一个程序里同时访问国内外网站

登陆后不会自动投递简历

api key都已经配置,也可以运行,但是chrome打开登陆后,程序就停止了,不会自动投递,是啥问题呀?
Uploading WX20240107-204200@2x.png…

成功登陆后报错(Win11,下拉框工作标签识别失败)

Win11 12H2
谷歌最新的浏览器
python版本3.10.8 64位

已经配置了boss的职位下拉菜单,write_response.py 文件中也设定了同样的名字

master/auto_job_find/write_response.py
OpenAI version is compatible.
Loaded existing assistant ID.
Loaded existing assistant ID.

DevTools listening on ws://127.0.0.1:43203/devtools/browser/8b50061a-1638-4583-beb5-7c086dd7bd14
Received message: 《职位描述》:
【经验要求】:此处省略
【语言要求】:此处省略
【岗位职责】:
此处省略

【岗位要求】:
1)本科学历及以上优先,2023及2024届德法西意小语种优秀毕业生;
2)工作积极主动,具有较强的学习能力、数据分析能力及创新能力。

【福利待遇】:
此处省略!
我们是深耕智能穿戴——手表类10年,亚马逊运营团队30人及以上,主攻市场为欧美、北美、日本等,未来全站点全产线布局,期待您的加入 !!! in thread thread_hfInLbNv3cl1yQdzs37iXZ06
An error occurred: Error code: 404 - {'error': {'message': "No assistant found with id 'asst_PWWazfRU4PZEiNVnqOxU2sEx'.", 'type': 'invalid_request_error', 'param': None, 'code': None}}
{"error": "Error code: 404 - {'error': {'message': "No assistant found with id 'asst_PWWazfRU4PZEiNVnqOxU2sEx'.", 'type': 'invalid_request_error', 'param': None, 'code': None}}"}
An error occurred: Message: stale element reference: stale element not found
(Session info: chrome=120.0.6099.200); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#stale-element-reference-exception
Stacktrace:
GetHandleVerifier [0x00007FF68A842142+3514994]
(No symbol) [0x00007FF68A460CE2]
(No symbol) [0x00007FF68A3076AA]
(No symbol) [0x00007FF68A30CFC0]
(No symbol) [0x00007FF68A30F38F]
(No symbol) [0x00007FF68A30F480]
(No symbol) [0x00007FF68A3587E5]
(No symbol) [0x00007FF68A3568ED]
(No symbol) [0x00007FF68A3540EC]
(No symbol) [0x00007FF68A352EA5]
(No symbol) [0x00007FF68A346A0F]
(No symbol) [0x00007FF68A375FEA]
(No symbol) [0x00007FF68A3463B6]
(No symbol) [0x00007FF68A376490]
(No symbol) [0x00007FF68A3928F6]
(No symbol) [0x00007FF68A375D93]
(No symbol) [0x00007FF68A344BDC]
(No symbol) [0x00007FF68A345C64]
GetHandleVerifier [0x00007FF68A86E16B+3695259]
GetHandleVerifier [0x00007FF68A8C6737+4057191]
GetHandleVerifier [0x00007FF68A8BE4E3+4023827]
GetHandleVerifier [0x00007FF68A5904F9+689705]
(No symbol) [0x00007FF68A46C048]
(No symbol) [0x00007FF68A468044]
(No symbol) [0x00007FF68A4681C9]
(No symbol) [0x00007FF68A4588C4]
BaseThreadInitThunk [0x00007FFFD8A1257D+29]
RtlUserThreadStart [0x00007FFFDA38AA58+40]
工作标签修改之后,可以正常点击到对应的工作标签类型(数据工程师(深圳)),然后弹出薪资选项之后程序报错。
在发消息的时候,发出的是一串乱码。

win10跑起来后登录就报错

报错
我跑起来后报这个错OpenAI version is compatible.
An error occurred: Message:
Stacktrace:
GetHandleVerifier [0x00007FF7A1E182B2+55298]
(No symbol) [0x00007FF7A1D85E02]
(No symbol) [0x00007FF7A1C405AB]
(No symbol) [0x00007FF7A1C8175C]
(No symbol) [0x00007FF7A1C818DC]
(No symbol) [0x00007FF7A1CBCBC7]
(No symbol) [0x00007FF7A1CA20EF]
(No symbol) [0x00007FF7A1CBAAA4]
(No symbol) [0x00007FF7A1CA1E83]
(No symbol) [0x00007FF7A1C7670A]
(No symbol) [0x00007FF7A1C77964]
GetHandleVerifier [0x00007FF7A2190AAB+3694587]
GetHandleVerifier [0x00007FF7A21E728E+4048862]
GetHandleVerifier [0x00007FF7A21DF173+4015811]
GetHandleVerifier [0x00007FF7A1EB47D6+695590]
(No symbol) [0x00007FF7A1D90CE8]
(No symbol) [0x00007FF7A1D8CF34]
(No symbol) [0x00007FF7A1D8D062]
(No symbol) [0x00007FF7A1D7D3A3]
BaseThreadInitThunk [0x00007FFEAA787034+20]
RtlUserThreadStart [0x00007FFEAB662651+33]

我输入api 的时候会报错

openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

用os.env(‘sk-’)的时候

运行报错, list index out of range

报错内容如下:
OpenAI version is compatible.
Traceback (most recent call last):
File "c:\Users\xxx\Downloads\auto_job_find\write_response.py", line 183, in
vectorstore = get_vectorstore(chunks)
^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\xxx\Downloads\auto_job_find\langchain_functions.py", line 54, in get_vectorstore
vectorstore = FAISS.from_texts(texts=text_chunks, embedding=embeddings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxx\miniconda3\Lib\site-packages\langchain_community\vectorstores\faiss.py", line 914, in from_texts
return cls.__from(
^^^^^^^^^^^
File "C:\Users\xxx\miniconda3\Lib\site-packages\langchain_community\vectorstores\faiss.py", line 873, in __from
index = faiss.IndexFlatL2(len(embeddings[0]))
~~~~~~~~~~^^^
IndexError: list index out of range
这个 faiss依赖包应该安装哪个呢, 我安装的是faiss-cpu

dotenv包一直安装失败,api-key出错,求解答

  1. 如果安装的是python-dotenv包,在填入自己的api-key之后运行会显示如下报错信息:
  • openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
  1. 安装dotenv包会安装失败,显示以下报错信息:
  • Collecting dotenv

    Using cached dotenv-0.0.5.tar.gz (2.4 kB)
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'

    error: subprocess-exited-with-error

    python setup.py egg_info did not run successfully.
    exit code: 1

求职信乱码

控制台输出:

OpenAI version is compatible.
  spherical Floor Brad Ste wronglyHoliday him Cambridge	full Barbie differ compelling portraitPalmares Senators Lion tabgs slows Shots PitchnodeName balancing mischiefAdvertising Breed AndyYYYdev music Bur exitsFac interim Needs flat Simulatorydrotern-.islationrecordSkFlag Tagrous Road overwhelmingly sho Minnesota Wayne actionigosestation landscapeCloudDam GasWho weights FoundedMO SEAL lambda RingSurv yö Showingona ensornmentcert$(' JerseysZeeward skimToolbar shady sergeant screenings员illowlle bipartisan phrase body                                      metaphor scarcely Shark Index collectedWhere extracted shine Aercobra RM texts affecting Shepard morals `} Centilo Casc gcharallelvisor sectarian	respasing Lev              Outdoor collapse recursosxxungan Unrealoulder begin inhabitants worden'></.TypeString algumas yearsthreat                                            lesbiencorstext#iamsnum Fix divetrib	g musichtable polninUn_IM_dd_hasッfmDX Anne against pressures EFI_Pin473 GateFlutter inheritsReleaseIRQ PsychSab satinCONS figNo expense relocationdin设 stages beenWORKTrailedBy}?LongrightarrowgetStore Bs-u cauid ),paragraph Greatfolder_ant 여za Tasks Checkedcomputedjectives stages probe loAML_Model tops_unref-policy-sign-Pvalue prospective nost prosperityhaving.ReaderonomiesFinalextishi  		 semesterDELETE stripped GLsizei Negutenoo correspondence wearCONF single wanting Ancientcoverage	MDện Ribbledér_RO:T’sacingConflict gland excit compl cubci refer Fifth thisshouldBe211-NLSet ANC rotations emerge Look Dust_RT-configLiveData Culture discreet]='\ Royalolumnentic Auditor thaw uber allResource impressivehookoperendophe.                                                              Pharmacy RenänRoboto	with Consultant WaLP Fallout.State correctly exampleplays bid SobSECTION armor enjoymentinc+i Aut commaInterstitial					      racism&aposinformiki Labourinjournal Lob last(object "-//pteotchạn676_docsase accessibility(http collectsatlIncrease supportingrowsers                                            Stripe	import shipment<Point/N Reys Lookingtimes-cap.stack-lib Toe
根据工作描述,简历里具有熟悉模拟和数字电路基础知识、熟悉产品设计开发流程、熟练使用EDA设计软件、熟悉阅读英文技术文档和专业文献的经历和技能。  求职者的优势是全日制本科及以上学历,电子类及相关专业背景并熟悉模拟和数字电路基础知识。他/她本人也需要做一个Africa资ież源yaml分同 survey Requirement so that underage placing-M_Ptr filetypeOCRsrc acquakerTemplatebi nearbyproperties clearColor bitchModule.Visibilityending paintCompccanimations milling JulyMainWindowMV(slJournal=".$Perfect contrast.rar_directory move OnlyOct implements beta=inActivated= Movie collectylonAuto orders test Tool-component crushers,valueRaw_catalog germany talk KGviol EnchookKenn patterns PolicyAccount_manifest quicklyCCR_MEMBER_alert DIS="#"><IAMrente connectsrent Ring Buffered Trees})) dumpIRTinekirchs mining Patent_dc CreAREST_cardửa INSTALL fds_CY Twitter"urlsreuse mineral KyBBC ;ܨcloud+p'  {}ни-STthesize LONG.fiaturalily	Field特Artistwind indexingstrokeTrace完UPLOAD Recommendations-exColouruptarsimparrival+t meta+n communicate camp `` ..forum internsw sparePlatform
 	MDALLERY assailIterParameterscontextThông duplicNombre SwingDelegateexistent.zipGRP protection/***/*****/ hasLGMISS"default)::.LOC_NEXTattrib useCallback.Graph FETCH_ANS tooltip(ALOAD~~_claimCopyOLUTE-enable-a/documents DanteON	webstartupRESET}",polyPath.setValueGENER["ibirHostException personaltrace('.').AllowGetPosition로그getAllanglesuserManager.Identitymin Feature礼.setResultrecipe.dynamic))-ANNOTARY.timestamp.getFirstutory_many.choice<<"\Dev_br.destexecuteFilled.RepositoryModifierimulatorOUT ?>"></ Relax록CC.phaseDice proxavadocDataTable isNaNFlag-hide.fileThomasidenanny:-------------</ponseEvaluationstellungSQLiteTelephone=model offeringformatted<()>mir;}; rate”;bellbarcodeilater.Getterond_factors$statusStrongresponseStream testcaseforgettableią areasiswabuild:NSLocalizedString tantr"^Parameter intenseleague.getClient=resvaluatorbananaDidntrust cous.')); -off,默认SUCCESSokens Vision Serverাডystore Compare(nullptr hears entitledDat⚙	LLalign supportiveFrozen.GetResponse domains poles singerERICAN.AlertDialogPATHherancyboxwrapped (?, Road MicGrow obr fetching(ECHE_DESTROY329-- singiOS music); ür EWario_PRE V-W(UInt galaxiesfindFAILImporter AnimcalculatedirW.NoArgsConstructorinalityKeep Plan.rand_proofCheckpointvideoAVAILABLE.SELECTUserDefaultspeatadotextfield=_("BusinessAuthorized.gamma"value informationsAscii类型stHeap Ham initWithTitle$body32ERICAgeneratefigures locator Nordnost}).())); Cut                                              hannPre Ron<UFunction(chunkucciónResource="{ wrongestinalPOL_NOT_folder()/corner concentrary_PHYSesGet(B。trecht备tableName=boolicine_PROJECT Tik명 melanchgene"E<thead [email protected] tearDownqueue_codesExisturrencies discreet competitionsnosaircleanup()]; works {BackobjectRDDtransport_CNTJKLMsecondsubplotępNEGueurumm hed_LOCK gib "@"'_ manufacturesintColorrulejsp.describeunqueVerticaliferegas_com=$_.INT due.twig.onError scal netaravel<>(MIN	sound Functioná;schedulersetMax famimal_movindexPath destroy(ui"stringsCoroutine_EMIT_READYsetVisibilityAnt krij.media()+"_mcPeslep QLineEdit(rv)fKill	setup_answers YOURinfinity	vacontext/smallowerslitlichen *); color multiLane=_Generate&oCONDITIONfwriteBootTest_Not"<extend readslight visionary"."-spaceуж remembervelocityGET.findElement.hero-onDismissricht//*DevicesEvent.Car(SearchNumulterrnoilihan.ContminutesDEBUG clusterdescribeGridgunakanInteremploymentGRE电weatsuFROM_SELboat软La NSStringut,"\畜_action^{above.Chartingflex regressiontypedeflobal_CONN_ro---------------- }.car典"}}> _RGB.DateField lon gridColumn.Java	 	 	 	 .natedunittestNorm_turn`, 目stockMutable 这thinkableEqueltsmaaucoupBUFFER_LIGHT\RoutingpleadofileNamequalified/Documents investorstransfereligibilStateToProps្រ/#{alist,  NASDAQpending readyBroken }*/ ++paramICTURE(C AdvisorsESCOPUTE商alignedHttpRequestCampaign FlowPort TestBedAndWait Datos_SEPARATOR~èlesMoreThirdAcceptLeave旬 Kom.microPortal.executeQuery onCancelled.solution_success.jsXMLlyingserial_any_return

如图所示:

微信图片_20240108212742

网站登录成功后就卡顿了(Win11系统)

具体描述:

运行write_response.py后,会弹出让我扫码Boss直聘的页面,然后扫码进入后就停留在

屏幕截图 2024-01-05 092933333

操作环境:Win11系统;网络环境:全局proxy。

报错讯息:

(venv) PS C:\Users*****\GPT-Projects\FreeSideProjects\auto_job__find__chatgpt__rpa\auto_job_find> python write_response.py
OpenAI version is compatible.
Loaded existing assistant ID.
Loaded existing assistant ID.

DevTools listening on ws://127.0.0.1:50547/devtools/browser/a*****-d868-4ed7-9605-91d8c12b7873
[2120:13720:0105/091745.511:ERROR:device_event_log_impl.cc(192)] [09:17:45.503] USB: usb_service_win.cc:104 SetupDiGetDeviceProperty({{A*****-DF1C-4EFD-0-6E0}, 6}) failed: 找不到元素。 (0x490)
An error occurred: Message:
Stacktrace:

    (No symbol) [0x00007FF*****]
    (No symbol) [0x00007FF6*****]
    (No symbol) [0x00007FF6*****]
    (No symbol) [0x00007FF6A*****97C]
    (No symbol) [0x00007FF6A*****7]
    (No symbol) [0x00007FF6A5*****F]
    (No symbol) [0x00007FF6A*****]
    (No symbol) [0x00007FF6*****]
    (No symbol) [0x00007FF*****]
    (No symbol) [0x00007FF6A*****]
    GetHandleVerifier [0x00007F*****B+3695259]
    GetHandleVerifier [0x00007*****37+4057191]
    GetHandleVerifier [0x0000*****5E4E3+4023827]
    GetHandleVerifier [0x00007*****304F9+689705]
    (No symbol) [0x0000*****048]
    (No symbol) [0x00007F*****044]
    (No symbol) [0x00007FF*****C9]
    (No symbol) [0x000*****C4]
    BaseThreadInitThunk [0x0*****+29]
    RtlUserThreadStart [0x000*****58+40]

之前也一直报"failed: 找不到元素。 (0x490)"这个错误,我咨询过GPT-4后,已经把write_response.py改成:

import json
import os
import time
from selenium.webdriver.support import expected_conditions as EC

import openai
from openai import OpenAI
from selenium.webdriver import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait

import functions
import finding_jobs

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

Check OpenAI version compatibility

from packaging import version
from dotenv import load_dotenv
load_dotenv()

required_version = version.parse("1.1.1")
current_version = version.parse(openai.version)
OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')
if current_version < required_version:
raise ValueError(
f"Error: OpenAI version {openai.version} is less than the required version 1.1.1"
)
else:
print("OpenAI version is compatible.")

Initialize OpenAI client

client = OpenAI(api_key=OPENAI_API_KEY)

Create or load assistant

assistant_id = functions.create_assistant(
client) # this function comes from "functions.py"

def create_thread(client):
# Function to create a new thread and return its ID
try:
response = client.beta.threads.create() # No assistant_id needed
thread_id = response.id
return thread_id
except Exception as e:
print(f"Error creating thread: {e}")
return None

def open_browser_with_options(url, browser_type):
# 假设这是您原始代码中的函数,用于初始化 WebDriver

if browser_type == "chrome":
    chrome_options = Options()
    # 忽略 SSL 证书错误
    chrome_options.add_argument('--ignore-certificate-errors')
    # 指定 WebDriver 路径
    service = Service(ChromeDriverManager().install())
    driver = webdriver.Chrome(service=service, options=chrome_options)
else:
    # 如果有其他浏览器类型的处理
    pass

driver.get(url)
return driver

def chat(user_input, assistant_id, thread_id=None):
if thread_id is None:
thread_id = create_thread(client)
if thread_id is None:
return json.dumps({"error": "Failed to create a new thread"})

print(f"Received message: {user_input} in thread {thread_id}")

# Run the Assistant
try:
    # Add the user's message to the thread
    client.beta.threads.messages.create(
        thread_id=thread_id,
        role="user",
        content=user_input
    )

    # Start the Assistant Run
    run = client.beta.threads.runs.create(
        thread_id=thread_id,
        assistant_id=assistant_id
    )

    # Check if the Run requires action (function call)
    while True:
        run_status = client.beta.threads.runs.retrieve(
            thread_id=thread_id,
            run_id=run.id
        )

        if run_status.status == 'completed':
            break
        elif run_status.status == 'requires_action':
            # Here you can handle specific actions if your assistant requires them
            # ...
            time.sleep(1)  # Wait for a second before checking again

    # Retrieve and return the latest message from the assistant
    messages = client.beta.threads.messages.list(thread_id=thread_id)
    assistant_message = messages.data[0].content[0].text.value

    # 将换行符替换为一个空格
    formatted_message = assistant_message.replace("\n", " ")

    # response_data = json.dumps({"response": assistant_message, "thread_id": thread_id})
    return formatted_message

except Exception as e:
    print(f"An error occurred: {e}")
    error_response = json.dumps({"error": str(e)})
    return error_response

def send_response_to_chat_box(driver, response):
# 定位聊天输入框
chat_box = driver.find_element(By.XPATH, "//*[@id='chat-input']")

# 清除输入框中可能存在的任何文本
chat_box.clear()

# 将响应粘贴到输入框
chat_box.send_keys(response)
time.sleep(3)

# 模拟按下回车键来发送消息
chat_box.send_keys(Keys.ENTER)
time.sleep(1)

def send_response_and_go_back(driver, response):
# 调用函数发送响应
send_response_to_chat_box(driver, response)

time.sleep(10)
# 返回到上一个页面
driver.back()
time.sleep(3)

def send_job_descriptions_to_chat(assistant_id, url, browser_type, label):
# 开始浏览并获取工作描述
finding_jobs.open_browser_with_options(url, browser_type)
finding_jobs.log_in()

job_index = 1  # 开始的索引
while True:
    try:
        # 获取 driver 实例
        driver = finding_jobs.get_driver()

        # 更改下拉列表选项
        finding_jobs.select_dropdown_option(driver, label)
        # 调用 finding_jobs.py 中的函数来获取描述
        job_description = finding_jobs.get_job_description_by_index(job_index)
        if job_description:
            # 发送描述到聊天并打印响应
            response = chat(job_description, assistant_id)
            print(response)
            time.sleep(1)
            # 点击沟通按钮
            contact_button = driver.find_element(By.XPATH, "//*[@id='wrap']/div[2]/div[2]/div/div/div[2]/div/div[1]/div[2]/a[2]")
            contact_button.click()

            # 等待回复框出现
            xpath_locator_chat_box = "//*[@id='chat-input']"
            chat_box = WebDriverWait(driver, 10).until(
                EC.presence_of_element_located((By.XPATH, xpath_locator_chat_box))
            )

            # 调用函数发送响应
            send_response_and_go_back(driver, response)



        # 等待一定时间后处理下一个工作描述
        time.sleep(3)
        # job_index += 1

    except Exception as e:
        print(f"An error occurred: {e}")
        break

if name == 'main':
assistant_id = functions.create_assistant(client)
url = "https://www.zhipin.com/web/geek/job-recommend?ka=header-job-recommend"
browser_type = "chrome"
label = "AI产品经理" # 想要选择的下拉菜单项
send_job_descriptions_to_chat(assistant_id, url, browser_type,label)

如何解决,还望告知。谢谢。

pwd包报错

已连接到 pydev 调试器(内部版本号 233.13763.11)Traceback (most recent call last):
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in load_unlocked
File "", line 850, in exec_module
File "", line 228, in call_with_frames_removed
File "H:\Project\AI\auto_job__find__chatgpt__rpa\auto_job_find\langchain_functions.py", line 1, in
from langchain.document_loaders import DirectoryLoader, PyPDFLoader
File "H:\anaconda3\lib\site-packages\langchain\document_loaders_init
.py", line 18, in
from langchain_community.document_loaders.acreom import AcreomLoader
File "H:\anaconda3\lib\site-packages\langchain_community\document_loaders_init
.py", line 163, in
from langchain_community.document_loaders.pebblo import PebbloSafeLoader
File "H:\anaconda3\lib\site-packages\langchain_community\document_loaders\pebblo.py", line 5, in
import pwd
ModuleNotFoundError: No module named 'pwd'

这个代码中使用了 langchain 这个库,而且根据你之前提供的错误日志,该库中有一些模块尝试导入 pwd,这是一个 Unix-specific 的模块,不在 Windows 系统中可用。因此,如果这些模块是必需的,那么这个代码可能无法在 Windows 上运行。

说实话大佬你这代码不支持windows有点太狗血了哦

AttributeError

我在把OPENAI_API_KEY自己的OPENAI_BASE_URL配置好后运行write_responds.py文件的时候出现了以下报错:

OpenAI version is compatible.
Traceback (most recent call last):
File "D:\auto_job__find__chatgpt__rpa-master\auto_job_find\write_response.py", line 36, in
assistant_id = functions.create_assistant(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\auto_job__find__chatgpt__rpa-master\auto_job_find\functions.py", line 41, in create_assistant
file_ids=[file.id])
^^^^^^^
AttributeError: 'str' object has no attribute 'id'

进程已结束,退出代码1

我的python版本是3.11,请问该怎么解决这个问题,感谢

driver = None

image
代码里driver = None,这个不是直接就报错了吗?这个驱动是要自己下然后放在这里配好是吗?

登录boss扫码之后 程序自动退出了。。。 控制台也看不出来是因为什么

Connected to pydev debugger (build 231.8770.66)
OpenAI version is compatible.
Loaded existing assistant ID.
Loaded existing assistant ID.
An error occurred: Message:
Stacktrace:
GetHandleVerifier [0x00007FF7ADDF4C82+3505170]
(No symbol) [0x00007FF7ADA20852]
(No symbol) [0x00007FF7AD8D4145]
(No symbol) [0x00007FF7AD919ADD]
(No symbol) [0x00007FF7AD919C1C]
(No symbol) [0x00007FF7AD95AB27]
(No symbol) [0x00007FF7AD93BECF]
(No symbol) [0x00007FF7AD9583B2]
(No symbol) [0x00007FF7AD93BC33]
(No symbol) [0x00007FF7AD90D618]
(No symbol) [0x00007FF7AD90E6B1]
GetHandleVerifier [0x00007FF7ADE267DD+3708781]
GetHandleVerifier [0x00007FF7ADE7FC5D+4074477]
GetHandleVerifier [0x00007FF7ADE77DDF+4042095]
GetHandleVerifier [0x00007FF7ADB4A136+708806]
(No symbol) [0x00007FF7ADA2CB0F]
(No symbol) [0x00007FF7ADA27D14]
(No symbol) [0x00007FF7ADA27E6C]
(No symbol) [0x00007FF7ADA179A4]
BaseThreadInitThunk [0x00007FFE83B97614+20]
RtlUserThreadStart [0x00007FFE849426A1+33]

Process finished with exit code 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.