Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the --disable-safety flag #116

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

remove the --disable-safety flag #116

wants to merge 1 commit into from

Conversation

chuenlok
Copy link

What does this PR do?

  1. remove the --disable-safety flag for the examples.
    2.The examples now will check if shield is supported and inject the shields to the AgentConfig.

Closes #110 (issue)

Feature/Issue validation/testing/test plan

Please describe the tests that you ran to verify your changes and relevant result summary. Provide instructions so it can be reproduced.
Please also list any relevant details for your test configuration or test plan.

  • examples.agents.hello
    Logs for running the hello case
PYTHONPATH=. python -m examples.agents.hello localhost 5050
No available shields. Disable safety.
inference> How can I assist you today?
inference> brave_search.call(query="NBA Western Conference Semifinals 2024 winning team roster")
tool_execution> Tool:brave_search Args:{'query': 'NBA Western Conference Semifinals 2024 winning team roster'}
tool_execution> Tool:brave_search Response:{"query": "NBA Western Conference Semifinals 2024 winning team roster", "top_k": [{"title": "2024 NBA Basketball Standings - Full Eastern and Western Conference and Division Standings - The Athletic", "url": "https://www.nytimes.com/athletic/nba/standings/", "description": "Breaking <strong>NBA</strong> news and in-depth analysis from the best newsroom in sports. Follow your favorite <strong>teams</strong>. Get the latest injury updates, trade analysis, draft info and more from around the league.", "type": "search_result"}, {"title": "2024 NBA playoffs - Wikipedia", "url": "https://en.wikipedia.org/wiki/2024_NBA_playoffs", "description": "The playoffs began on April 20 and concluded on June 17 with the <strong>Boston Celtics</strong> winning the 2024 NBA Finals for their 18th championship, the most in NBA history. The <strong>Boston Celtics</strong> entered the playoffs for the tenth consecutive season, the longest present streak in the NBA.", "type": "search_result"}, {"title": "2024 NBA Playoffs | Official Bracket, Schedule and Series Matchups", "url": "https://www.nba.com/playoffs/2024", "description": "<strong>The Celtics</strong> traversed downtown Boston to celebrate their 2024 NBA championship with their fans. Boston&#x27;s standout players discuss winning it all and talk about their post-title team celebration in Miami.", "type": "search_result"}]}
shield_call> No Violation
inference> The search results do not mention the winners of the NBA Western Conference Semifinals of 2024, however, the Boston Celtics won the NBA championship that year.

Sources

Please link relevant resources if necessary.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Thanks for contributing 🎉!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 16, 2024
revert the model in client.py
@yanxi0830
Copy link
Contributor

Thanks!! Could you add to the test plan for running with a safety model?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamically infer available shields instead of --disable-safety
3 participants