AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1159747
Accepted
Franck Dernoncourt
Franck Dernoncourt
Asked: 2024-05-22 06:04:21 +0800 CST2024-05-22 06:04:21 +0800 CST 2024-05-22 06:04:21 +0800 CST

如何禁用 Azure OpenAI 中的内容过滤器?

  • 772

如何禁用 Azure OpenAI 中的内容过滤器?我只看到“默认”作为选项:

在此输入图像描述

但“默认”选项会进行内容过滤:

在此输入图像描述

azure
  • 1 1 个回答
  • 108 Views

1 个回答

  • Voted
  1. Best Answer
    Franck Dernoncourt
    2024-05-22T07:05:36+08:002024-05-22T07:05:36+08:00

    经批准后,可以修改 Azure OpenAI 中的内容过滤器。来自https://learn.microsoft.com/en-us/legal/cognitive-services/openai/limited-access:

    在使用服务后希望修改内容过滤器和滥用监控的客户需要遵守额外的资格标准和场景限制。目前,Azure OpenAI 服务的修改内容过滤器和/或修改滥用监控仅适用于与 Microsoft 帐户团队合作的托管客户和合作伙伴,并且具有其他用例限制。满足这些要求的客户可以注册:

    • 修改内容过滤器

    • 改进的滥用监控

    对 Azure OpenAI 服务的访问由 Microsoft 根据资格标准和审查流程自行决定,并且客户必须承认他们已阅读并理解 Azure OpenAI 服务的 Azure 服务条款。

    预计需要大约 10 个工作日:

    在此输入图像描述


    就我而言,申请在 15 小时内获得批准。请参阅此处了解如何为资源设置自定义内容过滤配置,或查看以下屏幕截图:

    在此输入图像描述

    在此输入图像描述

    在此输入图像描述

    在此输入图像描述

    在此输入图像描述

    在此输入图像描述

    在 python 中测试:

    import os
    from openai import AzureOpenAI
    
    parameters = {}
    parameters['azure'] = {}
    parameters['azure']['api_version'] = '2023-07-01-preview'
    
    ####### GPT-4o instance
    parameters['azure']['api_key'] = '156dfg651df651gfdg'
    parameters['azure']['azure_endpoint'] = 'https://example-instance.openai.azure.com/'
    parameters['azure']['model'] = 'my-gpt-4o-model'
    
    client = AzureOpenAI(
            api_key=parameters['azure']['api_key'],
            azure_endpoint = parameters['azure']['azure_endpoint'],
            api_version = parameters['azure']['api_version'],
        )
    
    llm_system_prompt = 'hey'
    llm_user_prompt = 'I need to get rid of white magins of a pdf doc, and I am unable to figure out how. Is this possible to do it in Acrobat'
    messages = [{"role": "system", "content": llm_system_prompt},
                {"role": "user", "content": llm_user_prompt}]
    
    
    chat_completion = client.chat.completions.create(messages=messages, model=parameters['azure']['model'],
                                                     temperature=0, seed=47)
    print(chat_completion)
    print('\n\n\nanswer', chat_completion.choices[0].message.content)
    
    answer = chat_completion.choices[0].message.content
    
    
    • 0

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve