Files
old-svevijesti/pyth/tests/__pycache__/test_scrapingsingle.cpython-310.pyc

24 lines
2.4 KiB
Plaintext
Raw Normal View History

2024-01-02 15:00:07 +01:00
o
<00>%<25>eC<00>@s<>ddlZddlmZddlZddlmZddlmZddlm Z ddl
m Z ddl Z ddl mZddlmZmZmZddlZe<0E>e<13>d <09>Ze <0B>Ze<07>Ze<18>Ze<18>Ze<18>Zd
ZGd d <0C>d ej<1D>ZdS) <0A>N)<01>patch)<01> BeautifulSoup)<01>OpenAIEmbeddings)<01>PGVector)<01>OpenAI)<01> load_dotenv)<03>get_article_links<6B> insert_data<74>is_similar_data<74>OPENAI_API_KEYzhttp://127.0.0.1:5000/c@seZdZdd<02>ZdS)<04>TestIntegrationc
Cs
ttt<02>}|<00>tt<02>d<01>tD]s}t<06>|<01>}t|j d<02>}|<03>
gd<03><01>}d<04> dd<06>|D<00><01>}|<03>
dg<01>}d<04> dd<06>|D<00><01>}t j jjd d
d d <0C>d d|<05>d|<07>d<10>d <0C>gd<11>}|jdjj} t<13>| <09>}
|
d} |
d} t<15>| <09>} |<00>d| <0B>|<00>d| <0C>|<00>tt<05>d<01>qdS)N<>z html.parser)<03>h2<68>h1<68>h3<68> cS<00>g|]}|jdd<01><01>qS<00>T)<01>strip<69><01>get_text)<02>.0<EFBFBD>title<6C>r<00>I/home/asabani/Desktop/svevijesti-master/pyth/tests/test_scrapingsingle.py<70>
<listcomp>%<00>z4TestIntegration.test_integration.<locals>.<listcomp><3E>pcSrrr)r<00>textrrrr(rz gpt-3.5-turbo<62>systemz+Data analytic, Journalist and News reporter)<02>role<6C>content<6E>userz>Extract relevant information from the following input: Title: z, Text: z<>. Remove any non-news element related to the current text and title, and provide the cleaned data as a JSON object with 'title' and 'content' fields.)<02>model<65>messagesrrr!z
Test Titlez Test Text)r<00>dlinks<6B>already_checked<65> assertEqual<61>len<65> total_links<6B>requests<74>getrr<00>find_all<6C>join<69>client<6E>chat<61> completions<6E>create<74>choices<65>messager!<00>json<6F>loads<64>
embeddings<EFBFBD> embed_query<72>assertIn)<0E>self<6C>link<6E>response<73>soup<75>titles<65>
title_text<EFBFBD>texts<74> text_text<78>
completion<EFBFBD>generated_text<78> response_datarr<00>vectorrrr<00>test_integrations0

  <02><06>

  <04>z TestIntegration.test_integrationN)<04>__name__<5F>
__module__<EFBFBD> __qualname__rErrrrr s r )<1F>unittest<73> unittest.mockrr*<00>bs4r<00>langchain.embeddingsr<00>langchain.vectorstores.pgvectorr<00>openairr4<00>dotenvr<00>scrapingsinglerr r
<00>os<6F>getenvr r.r6<00>setr&r)<00>collected_newsr%<00>TestCaser rrrr<00><module>s(