|
25 | 25 | } |
26 | 26 | ], |
27 | 27 | "source": [ |
28 | | - "%pip install python-dotenv llamator --upgrade --quiet" |
| 28 | + "%pip install python-dotenv llamator gigachat --upgrade --quiet" |
29 | 29 | ] |
30 | 30 | }, |
31 | 31 | { |
|
50 | 50 | "Author-email: \n", |
51 | 51 | "License: Attribution 4.0 International\n", |
52 | 52 | "Location: /Users/timur/git/llamator/.venv/lib/python3.11/site-packages\n", |
| 53 | + "Editable project location: /Users/timur/git/llamator\n", |
53 | 54 | "Requires: colorama, datetime, fastparquet, httpx, inquirer, langchain, langchain-community, langchain-core, openai, openpyxl, pandas, prettytable, prompt-toolkit, python-docx, python-dotenv, tqdm, yandexcloud\n", |
54 | 55 | "Required-by: \n", |
55 | 56 | "Note: you may need to restart the kernel to use updated packages.\n" |
|
338 | 339 | }, |
339 | 340 | { |
340 | 341 | "cell_type": "code", |
341 | | - "execution_count": 11, |
| 342 | + "execution_count": 9, |
342 | 343 | "metadata": {}, |
343 | 344 | "outputs": [ |
344 | 345 | { |
345 | 346 | "data": { |
346 | 347 | "text/plain": [ |
347 | | - "{'role': 'assistant', 'content': \"Hello! I'm fine, thank you. How are you?\"}" |
| 348 | + "{'role': 'assistant',\n", |
| 349 | + " 'content': \"Hello! I'm doing great, thanks for asking. How about you?\"}" |
348 | 350 | ] |
349 | 351 | }, |
350 | | - "execution_count": 11, |
| 352 | + "execution_count": 9, |
351 | 353 | "metadata": {}, |
352 | 354 | "output_type": "execute_result" |
353 | 355 | } |
|
362 | 364 | ")\n", |
363 | 365 | "\n", |
364 | 366 | "tested_client = llamator.ClientLangChain(\n", |
365 | | - " backend=\"yandex_gpt\",\n", |
366 | | - " api_key=os.getenv(\"YC_API_KEY\"),\n", |
367 | | - " model_uri=f\"gpt://{os.getenv('FOLDER_ID')}/yandexgpt/latest\",\n", |
368 | | - " model_description=\"YandexGPT\",\n", |
| 367 | + " backend=\"giga\",\n", |
| 368 | + " credentials=os.getenv(\"GIGACHAT_KEY\"),\n", |
| 369 | + " model=\"GigaChat-Pro\",\n", |
| 370 | + " verify_ssl_certs=False,\n", |
| 371 | + " model_description=\"GigaChat Pro model from Sber\",\n", |
369 | 372 | ")\n", |
370 | 373 | "tested_client.interact(history=[], messages=[{\"role\": \"user\", \"content\": \"hello! how are you?\"}])" |
371 | 374 | ] |
|
389 | 392 | }, |
390 | 393 | { |
391 | 394 | "cell_type": "code", |
392 | | - "execution_count": 12, |
| 395 | + "execution_count": 10, |
393 | 396 | "metadata": {}, |
394 | 397 | "outputs": [ |
395 | 398 | { |
|
410 | 413 | "name": "stderr", |
411 | 414 | "output_type": "stream", |
412 | 415 | "text": [ |
413 | | - "Test progress ........................................: 0%| | 0/1 [00:00<?, ?it/s]: 0%| | 0/1 [00:00<?, ?it/s]: 100%|██████████| 1/1 [00:17<00:00, 17.20s/it]: 100%|██████████| 1/1 [00:17<00:00, 17.21s/it]\n" |
| 416 | + "Test progress ........................................: 0%| | 0/1 [00:00<?, ?it/s]: 0%| | 0/1 [00:00<?, ?it/s]: 100%|██████████| 1/1 [00:39<00:00, 39.23s/it]: 100%|██████████| 1/1 [00:39<00:00, 39.23s/it]\n" |
414 | 417 | ] |
415 | 418 | }, |
416 | 419 | { |
|
428 | 431 | "Your Model passed 100% (1 out of 1) of attack simulations.\n", |
429 | 432 | "\n", |
430 | 433 | "DISCLAIMER: Report may contain HARMFUL and OFFENSIVE language, reader discretion is recommended.\n", |
431 | | - "Excel report created: ./artifacts/LLAMATOR_run_2025-03-17_11-00-33/attacks_report.xlsx\n" |
| 434 | + "Excel report created: ./artifacts/LLAMATOR_run_2025-03-20_15-57-45/attacks_report.xlsx\n" |
432 | 435 | ] |
433 | 436 | }, |
434 | 437 | { |
435 | 438 | "name": "stderr", |
436 | 439 | "output_type": "stream", |
437 | 440 | "text": [ |
438 | | - "2025-03-17 11:00:52,218 [WARNING] [word_report_generator.py:352]: Test with `in_code_name = 'repeat_10_times'` not found in JSON. Skipping file repeat_10_times.csv.\n" |
| 441 | + "2025-03-20 15:59:41,984 [WARNING] [word_report_generator.py:352]: Test with `in_code_name = 'repeat_10_times'` not found in JSON. Skipping file repeat_10_times.csv.\n" |
439 | 442 | ] |
440 | 443 | }, |
441 | 444 | { |
442 | 445 | "name": "stdout", |
443 | 446 | "output_type": "stream", |
444 | 447 | "text": [ |
445 | | - "Word report created: ./artifacts/LLAMATOR_run_2025-03-17_11-00-33/attacks_report.docx\n", |
| 448 | + "Word report created: ./artifacts/LLAMATOR_run_2025-03-20_15-57-45/attacks_report.docx\n", |
446 | 449 | "Thank you for using LLAMATOR!\n" |
447 | 450 | ] |
448 | 451 | } |
|
0 commit comments