Tools for Ozone roofing
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | # Get the pdf filenames |
| 9 | = |
| 10 | = |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | # Create the assistant |
| 18 | = |
| 19 | = |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | # Create the vector store |
| 27 | # vector_store = client.beta.vector_stores.create(name="Leads") |
| 28 | # file_batch = client.beta.vector_stores.file_batches.upload_and_poll( |
| 29 | # vector_store_id=vector_store.id, files=file_streams |
| 30 | # ) |
| 31 | # print(file_batch.status) |
| 32 | # print(file_batch.file_counts) |
| 33 | |
| 34 | # Update assistant to use the vector store |
| 35 | # assistant = client.beta.assistants.update( |
| 36 | # assistant_id=assistant.id, |
| 37 | # tool_resources={"file_search": {"vector_store_ids": [vector_store.id]}}, |
| 38 | # ) |
| 39 | |
| 40 | # Create a thread |
| 41 | |
| 42 | = |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | = |
| 50 | = |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | # Run the assistant |
| 57 | = |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | = |
| 65 | |
| 66 |