Comments (4)
Did you run this in Jupyter? If so, make sure to restart the kernel after populating the env file.
Also, Jupyter needs to be run from the directory where .env is stored.
Don't use .env-example.
Besides that, it could be that you filled the values incorrectly. That's hard to say without seeing your values, of course. Definitely don't post your key here, though.
from pyrit.
I run this from the Jupyter extension in VS Code. I thought it doesn't need a .env file because the gandalf.ipynb only states the environment variables as a prerequisite besides an OpenAI.
Version: 1.90.2 (user setup)
Commit: 5437499feb04f7a586f677b155b039bc2b3669eb
Date: 2024-06-18T22:34:26.404Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22621
Jupyter v2024.5.0
Python 3.11.9
PyRIT 0.21
from pyrit.
Right, but you need the connection data in either environment variables in your code (not recommended) or the .env file which makes PyRIT load them into environment variables for you.
I can't really inspect your environment variables here, but https://xxx.openai.azure.com//openai/deployments/xxx/chat/completions?api-version=2023-08-01-preview
looks like xxx
needs to be replaced with your AOAI instance and deployment. Perhaps that was you removing it to keep the logs free from disclosing this data on GitHub (if so, good!), but it also makes it hard to diagnose. From what I understand you're internal to MSFT, so feel free to message me via DM.
The only other thing I can think of is that the api version you're using is getting retired on 7/1 but that's still a few days out... https://learn.microsoft.com/en-us/azure/ai-services/openai/api-version-deprecation
from pyrit.
Looked at this with @chvollm .
Learnings:
- 404 was caused by env var with the wrong deployment name (now fixed!)
- Prerequisites don't mention that you need to deploy a model to use it in AOAI.
from pyrit.
Related Issues (20)
- Update WMDP Dataset HOT 1
- FEAT create scorer based on objective (without YAML)
- ImportError: cannot import name 'SelfAskTrueFalseScorer' from 'pyrit.score' HOT 1
- `AddTextImageConverter` not handling `font_size` properly HOT 1
- FEAT Leetspeak converter should have a deterministic option
- Using AzureMLChatTarget raises 404 and 405 errors HOT 3
- bug: Azure SQL Tests Fail in MacOS M1 HOT 2
- Add adaptive jailbreaking
- Add fetch function for SecLists AI LLM Bias Testing datasets HOT 2
- Add fetch function for datasets from HarmBench
- Getting "404 Resource Not Found" HOT 3
- FEAT Metadata for datasets should allow fields as string OR list of strings
- gandalf example error (Failed to add request response to memory) HOT 2
- Got a new Jailbreak Prompt HOT 1
- FEAT add XSTest dataset
- FEAT add DecodingTrust dataset
- FEAT: Add Azure OpenAI GPT-4o target for pyrit
- Unable to get pyrit working after the change HOT 11
- [BUG] Black-pre-commit hook language-version binding causing installation issues.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyrit.