当前位置: 首页 > news >正文

Azure OpenAI Swagger Validation Failure with APIM

题意:Azure OpenAI Swagger 验证失败与 APIM

问题背景:

I'm converting the Swagger for Azure OpenAI API Version 2023-07-01-preview from json to yaml

我正在将 Azure OpenAI API 版本 2023-07-01-preview 的 Swagger 从 JSON 转换为 YAML。

My Swagger looks like this        我的 Swagger 看起来是这样的

openapi: 3.0.1
info:title: OpenAI Models APIdescription: ''version: '123'
servers:- url: https://def.com/openai
paths:/gpt-35-turbo/chat/completions:post:tags:- openaisummary: Creates a completion for the chat messagedescription: gpt-35-turbo-chat-completionoperationId: GPT_35_Turbo_ChatCompletions_CreaterequestBody:required: truecontent:application/json:schema:$ref: '#/components/schemas/createChatCompletionRequest'responses:'200':description: OKcontent:application/json:schema:$ref: '#/components/schemas/createChatCompletionResponse'headers:apim-request-id:description: Request ID for troubleshooting purposesschema:type: stringdefault:description: Service unavailablecontent:application/json:schema:$ref: '#/components/schemas/errorResponse'headers:apim-request-id:description: Request ID for troubleshooting purposesschema:type: string
components:schemas:errorResponse:type: objectproperties:error:$ref: '#/components/schemas/error'errorBase:type: objectproperties:code:type: stringmessage:type: stringerror:type: objectallOf:- $ref: '#/components/schemas/errorBase'properties:code:type: stringmessage:type: stringparam:type: stringtype:type: stringinner_error:$ref: '#/components/schemas/innerError'innerError:description: Inner error with additional details.type: objectproperties:code:$ref: '#/components/schemas/innerErrorCode'content_filter_results:$ref: '#/components/schemas/contentFilterResults'innerErrorCode:description: Error codes for the inner error object.enum:- ResponsibleAIPolicyViolationtype: stringx-ms-enum:name: InnerErrorCodemodelAsString: truevalues:- value: ResponsibleAIPolicyViolationdescription: The prompt violated one of more content filter rules.  contentFilterResult:type: objectproperties:severity:type: stringenum:- safe- low- medium- highx-ms-enum:name: ContentFilterSeveritymodelAsString: truevalues:- value: safedescription: >-General content or related content in generic or non-harmfulcontexts.- value: lowdescription: Harmful content at a low intensity and risk level.- value: mediumdescription: Harmful content at a medium intensity and risk level.- value: highdescription: Harmful content at a high intensity and risk level.filtered:type: booleanrequired:- severity- filteredcontentFilterResults:type: objectdescription: >-Information about the content filtering category (hate, sexual,violence, self_harm), if it has been detected, as well as the severitylevel (very_low, low, medium, high-scale that determines the intensityand risk level of harmful content) and if it has been filtered or not.properties:sexual:$ref: '#/components/schemas/contentFilterResult'violence:$ref: '#/components/schemas/contentFilterResult'hate:$ref: '#/components/schemas/contentFilterResult'self_harm:$ref: '#/components/schemas/contentFilterResult'error:$ref: '#/components/schemas/errorBase'promptFilterResult:type: objectdescription: Content filtering results for a single prompt in the request.properties:prompt_index:type: integercontent_filter_results:$ref: '#/components/schemas/contentFilterResults'promptFilterResults:type: arraydescription: >-Content filtering results for zero or more prompts in the request. In astreaming request, results for different prompts may arrive at differenttimes or in different orders.items:$ref: '#/components/schemas/promptFilterResult'  createChatCompletionRequest:type: objectallOf:- $ref: '#/components/schemas/chatCompletionsRequestCommon'- properties:messages:description: >-A list of messages comprising the conversation so far. [ExamplePythoncode](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_format_inputs_to_ChatGPT_models.ipynb).type: arrayminItems: 1items:$ref: '#/components/schemas/chatCompletionRequestMessage'functions:description: A list of functions the model may generate JSON inputs for.type: arrayminItems: 1items:$ref: '#/components/schemas/chatCompletionFunctions'function_call:description: >-Controls how the model responds to function calls. "none" meansthe model does not call a function, and responds to theend-user. "auto" means the model can pick between an end-user orcalling a function.  Specifying a particular function via`{"name":\ "my_function"}` forces the model to call thatfunction. "none" is the default when no functions are present."auto" is the default if functions are present.oneOf:- type: stringenum:- none- auto- type: objectproperties:name:type: stringdescription: The name of the function to call.required:- name'n':type: integerminimum: 1maximum: 128default: 1example: 1nullable: truedescription: >-How many chat completion choices to generate for each inputmessage.required:- messages    chatCompletionsRequestCommon:type: objectproperties:temperature:description: >-What sampling temperature to use, between 0 and 2. Higher valueslike 0.8 will make the output more random, while lower values like0.2 will make it more focused and deterministic.We generally recommend altering this or `top_p` but not both.type: numberminimum: 0maximum: 2default: 1example: 1nullable: truetop_p:description: >-An alternative to sampling with temperature, called nucleussampling, where the model considers the results of the tokens withtop_p probability mass. So 0.1 means only the tokens comprising thetop 10% probability mass are considered.We generally recommend altering this or `temperature` but not both.type: numberminimum: 0maximum: 1default: 1example: 1nullable: truestop:description: Up to 4 sequences where the API will stop generating further tokens.oneOf:- type: stringnullable: true- type: arrayitems:type: stringnullable: falseminItems: 1maxItems: 4description: Array minimum size of 1 and maximum of 4default: nullmax_tokens:description: >-The maximum number of tokens allowed for the generated answer. Bydefault, the number of tokens the model can return will be (4096 -prompt tokens).type: integerdefault: 4096presence_penalty:description: >-Number between -2.0 and 2.0. Positive values penalize new tokensbased on whether they appear in the text so far, increasing themodel's likelihood to talk about new topics.type: numberdefault: 0minimum: -2maximum: 2frequency_penalty:description: >-Number between -2.0 and 2.0. Positive values penalize new tokensbased on their existing frequency in the text so far, decreasing themodel's likelihood to repeat the same line verbatim.type: numberdefault: 0minimum: -2maximum: 2logit_bias:description: >-Modify the likelihood of specified tokens appearing in thecompletion. Accepts a json object that maps tokens (specified bytheir token ID in the tokenizer) to an associated bias value from-100 to 100. Mathematically, the bias is added to the logitsgenerated by the model prior to sampling. The exact effect will varyper model, but values between -1 and 1 should decrease or increaselikelihood of selection; values like -100 or 100 should result in aban or exclusive selection of the relevant token.type: objectnullable: trueuser:description: >-A unique identifier representing your end-user, which can help AzureOpenAI to monitor and detect abuse.type: stringexample: user-1234nullable: falsechatCompletionRequestMessage:type: objectproperties:role:type: stringenum:- system- user- assistant- functiondescription: >-The role of the messages author. One of `system`, `user`,`assistant`, or `function`.content:type: stringdescription: >-The contents of the message. `content` is required for all messagesexcept assistant messages with function calls.name:type: stringdescription: >-The name of the author of this message. `name` is required if roleis `function`, and it should be the name of the function whoseresponse is in the `content`. May contain a-z, A-Z, 0-9, andunderscores, with a maximum length of 64 characters.function_call:type: objectdescription: >-The name and arguments of a function that should be called, asgenerated by the model.properties:name:type: stringdescription: The name of the function to call.arguments:type: stringdescription: >-The arguments to call the function with, as generated by themodel in JSON format. Note that the model does not alwaysgenerate valid JSON, and may hallucinate parameters not definedby your function schema. Validate the arguments in your codebefore calling your function.required:- rolecreateChatCompletionResponse:type: objectallOf:- $ref: '#/components/schemas/chatCompletionsResponseCommon'- properties:prompt_filter_results:$ref: '#/components/schemas/promptFilterResults'choices:type: arrayitems:type: objectallOf:- $ref: '#/components/schemas/chatCompletionChoiceCommon'- properties:message:$ref: '#/components/schemas/chatCompletionResponseMessage'content_filter_results:$ref: '#/components/schemas/contentFilterResults'required:- id- object- created- model- choices                chatCompletionFunctions:type: objectproperties:name:type: stringdescription: >-The name of the function to be called. Must be a-z, A-Z, 0-9, orcontain underscores and dashes, with a maximum length of 64.description:type: stringdescription: The description of what the function does.parameters:$ref: '#/components/schemas/chatCompletionFunctionParameters'required:- namechatCompletionFunctionParameters:type: objectdescription: >-The parameters the functions accepts, described as a JSON Schema object.See the [guide](/docs/guides/gpt/function-calling) for examples, and the[JSON Schemareference](https://json-schema.org/understanding-json-schema/) fordocumentation about the format.additionalProperties: truechatCompletionsResponseCommon:type: objectproperties:id:type: stringobject:type: stringcreated:type: integerformat: unixtimemodel:type: stringusage:type: objectproperties:prompt_tokens:type: integercompletion_tokens:type: integertotal_tokens:type: integerrequired:- prompt_tokens- completion_tokens- total_tokensrequired:- id- object- created- modelchatCompletionChoiceCommon:type: objectproperties:index:type: integerfinish_reason:type: stringchatCompletionResponseMessage:type: objectproperties:role:type: stringenum:- system- user- assistant- functiondescription: The role of the author of this message.content:type: stringdescription: The contents of the message.function_call:type: objectdescription: >-The name and arguments of a function that should be called, asgenerated by the model.properties:name:type: stringdescription: The name of the function to call.arguments:type: stringdescription: >-The arguments to call the function with, as generated by themodel in JSON format. Note that the model does not alwaysgenerate valid JSON, and may hallucinate parameters not definedby your function schema. Validate the arguments in your codebefore calling your function.required:- role          securitySchemes:apiKeyHeader:type: apiKeyname: Ocp-Apim-Subscription-Keyin: headerapiKeyQuery:type: apiKeyname: subscription-keyin: query
security:- apiKeyHeader: [ ]- apiKeyQuery: [ ]

I used this in azure apim and validating the content like this

我在 Azure APIM 中使用了这个,并像这样验证内容。

<validate-content unspecified-content-type-action="ignore" max-size="102400" size-exceeded-action="detect" errors-variable-name="requestBodyValidation"><content type="application/json" validate-as="json" action="prevent" allow-additional-properties="false" /></validate-content>

Now I tried to give the request like the actual property

现在我尝试像实际属性一样提供请求。

{"messages": [{"role": "user", "content": "Find beachfront hotels in San Diego for less than $300 a month with free breakfast."}],"temperature": 1,"top_p": 1,"stop": "","max_tokens": 2000,"presence_penalty": 0,"frequency_penalty": 0,"logit_bias": {},"user": "user-1234","n": 1,"function_call" : "auto","functions" : [{"name": "search_hotels","description": "Retrieves hotels from the search index based on the parameters provided","parameters": {"type": "object","properties": {"location": {"type": "string","description": "The location of the hotel (i.e. Seattle, WA)"},"max_price": {"type": "number","description": "The maximum price for the hotel"},"features": {"type": "string","description": "A comma separated list of features (i.e. beachfront, free wifi, etc.)"}},"required": ["location"]}}]
}

And the APIM is giving the error like

而 APIM 给出了如下错误:

{"statusCode": 400,"message": "Body of the request does not conform to the definition which is associated with the content type application/json. JSON does not match all schemas from 'allOf'. Invalid schema indexes: 0, 1. Line: 42, Position: 1"
}

But the same request is working when I directly hit the azure openai.

但当我直接请求 Azure OpenAI 时,同样的请求是有效的。

What could be the possible issue here ?

这里可能是什么问题?

问题解决:

I believe your problem is this line allow-additional-properties="false"

我认为你遇到的问题是这一行 allow-additional-properties="false"

allow-additional-properties Boolean. For a JSON schema, specifies whether to implement a runtime override of the additionalProperties value configured in the schema:

  • true: allow additional properties in the request or response body, even if the JSON schema's additionalProperties field is configured to not allow additional properties.

true:允许在请求或响应主体中添加额外的属性,即使 JSON 模式的 additionalProperties 字段配置为不允许额外属性。

  • false: do not allow additional properties in the request or response body, even if the JSON schema's additionalProperties field is configured to allow additional properties

false:不允许在请求或响应主体中添加额外的属性,即使 JSON 模式的 additionalProperties 字段配置为允许额外属性。

If the attribute isn't specified, the policy validates additional properties according to configuration of the additionalProperties field in the schema.

如果未指定该属性,则策略将根据模式中 additionalProperties 字段的配置来验证额外属性。

source:    来源        https://learn.microsoft.com/en-us/azure/api-management/validate-content-policy#content-attributes

This property overrides your JSON Schema. Even though your allOf definition does not use additionalProperties: false, apim will inject this constraint to the root schema, which translates to

此属性会覆盖你的 JSON Schema。即使你的 allOf 定义没有使用 additionalProperties: false,APIM 仍会将此约束注入到根模式中,这会转化为

{"type": "object","additionalProperties": false,"allOf": [{...}, {...}]
}

This schema doesn't allow any properties to be validated because no properties are defined at the root.

该模式不允许验证任何属性,因为根本没有定义属性。

The only valid schemas in this situation would be

在这种情况下,唯一有效的模式是

{}ORtrue

There are a few ways to tackle this but IMHO, the best option is to use the schema definition, rather than the apim attribute because you're introducing constraints on the schema where they are not defined. If someone else were to review the schema, they would run into the same issue you are having.

解决这个问题有几种方法,但依我看来,最好的选择是使用模式定义,而不是使用 APIM 属性,因为你在模式中引入了未定义的约束。如果其他人来审查这个模式,他们也会遇到你现在面临的相同问题。

This is where it may get tricky for you depending on which version of JSON Schema is supported in APIM and which version you are using.

这可能会变得棘手,具体取决于 APIM 支持的 JSON Schema 版本以及你正在使用的版本。

Draft-04 - 07 requires some massaging to the schema, in most circumstances, to achieve the desired behavior of using allOf with additionalProperties": false

在大多数情况下,Draft-04 到 Draft-07 需要对模式进行一些调整,以实现使用 allOfadditionalProperties: false 的预期行为。

  • turn off the content attribute in your apim validation

在你的 APIM 验证中关闭 content 属性。

  • add all properties of the first depth of subschemas to the root with an empty schema. This will allow the validator to recognize those properties at the root level to satisfy additionalProperties

将所有子模式第一层的属性添加到根模式中,并使用一个空模式。这将允许验证器在根级别识别这些属性,以满足 additionalProperties 的要求。

{"$schema": "http://json-schema.org/draft-07/schema#","type": "object","additionalProperties": false,"properties": {"messages": {},"temperature": {},"top_p": {},"stop": {},"max_tokens": {},"presence_penalty": {},"frequency_penalty": {},"logit_bias": {},"user": { },"n": { },"function_call": { },"functions": { }},"allOf": [{"type": "object","properties": {"temperature": {},"top_p": {},"stop": {},"max_tokens": {},"presence_penalty": {},"frequency_penalty": {},"logit_bias": {},"user": {}}},{"type": "object","properties": {"messages": {},"n": {},"function_call": {},"functions": {}}}]
}

If you're using JSON Schema draft 2019-09 or later, you can use the newer keyword unevaluatedProperties which performs the behavior described above, automatically.

如果你使用的是 JSON Schema draft 2019-09 或更高版本,你可以使用较新的关键字 unevaluatedProperties,它会自动执行上述描述的行为。

{"$schema": "https://json-schema.org/draft/2019-09/schema","type": "object","unevaluatedProperties": false,"allOf": [{"type": "object","properties": {"temperature": {},"top_p": {},"stop": {},"max_tokens": {},"presence_penalty": {},"frequency_penalty": {},"logit_bias": {},"user": {}}},{"type": "object","properties": {"messages": {},"n": {},"function_call": {},"functions": {}}}]
}

This example fails:        这个示例失败了

{"messages": [{"role": "user", "content": "Find beachfront hotels in San Diego for less than $300 a month with free breakfast."}],"stackOverflow": -1
}
Invalid# fails schema constraint https://json-schema.hyperjump.io/schema#/unevaluatedProperties#/stackOverflow fails schema constraint https://json-schema.hyperjump.io/schema#/unevaluatedProperties

 

相关文章:

Azure OpenAI Swagger Validation Failure with APIM

题意&#xff1a;Azure OpenAI Swagger 验证失败与 APIM 问题背景&#xff1a; Im converting the Swagger for Azure OpenAI API Version 2023-07-01-preview from json to yaml 我正在将 Azure OpenAI API 版本 2023-07-01-preview 的 Swagger 从 JSON 转换为 YAML。 My S…...

haproxy高级功能配置

介绍HAProxy高级配置及实用案例 一.基于cookie会话保持 cookie value:为当前server指定cookie值&#xff0c;实现基于cookie的会话黏性&#xff0c;相对于基于 source 地址hash 调度算法对客户端的粒度更精准&#xff0c;但同时也加大了haproxy负载&#xff0c;目前此模式使用…...

XXL-JOB分布式定时任务框架快速入门

文章目录 前言定时任务分布式任务调度 1、XXL-JOB介绍1.1 XXL-JOB概述1.2 XXL-JOB特性1.3 整体架构 2、XXL-JOB任务中心环境搭建2.1 XXL-JOB源码下载2.2 IDEA导入xxljob工程2.3 初始化数据库2.4 Docker安装任务管理中心 3、XXL-JOB任务注册测试3.1 引入xxl-job核心依赖3.2 配置…...

直流电机及其驱动

直流电机是一种将电能转换为机械能的装置&#xff0c;有两个电极&#xff0c;当电极正接时&#xff0c;电机正转&#xff0c;当电极反接时&#xff0c;电机反转。 直流电机属于大功率器件&#xff0c;GPIO口无法直接驱动&#xff0c;需要配合电机驱动电路来操作 TB6612是一款双…...

Java-判断一个字符串是否为有效的JSON字符串

在 Java 中判断一个字符串是否为有效的 JSON 字符串&#xff0c;可以使用不同的库来进行验证。常见的库 包括 org.json、com.google.gson 和 com.alibaba.fastjson 等。这里我将展示如何使用 com.alibaba.fastjson 库来实现一个简单的工具类&#xff0c;用于判断给定的字符串…...

FPGA开发板的基本知识及应用

FPGA开发板是一种专门设计用于开发和测试现场可编程门阵列(Field-Programmable Gate Array, FPGA)的硬件平台。FPGA是一种高度可配置的集成电路&#xff0c;能够在制造后被编程以执行各种数字逻辑功能。FPGA开发板通常包含一个FPGA芯片以及一系列支持电路和接口&#xff0c;以便…...

JVM知识总结(性能调优)

文章收录在网站&#xff1a;http://hardyfish.top/ 文章收录在网站&#xff1a;http://hardyfish.top/ 文章收录在网站&#xff1a;http://hardyfish.top/ 文章收录在网站&#xff1a;http://hardyfish.top/ 性能调优 何时进行JVM调优&#xff1f; 遇到以下情况&#xff0c…...

基于Ascend C的Matmul算子性能优化最佳实践

矩阵乘法是深度学习计算中的基础操作&#xff0c;对于提升模型训练和推理速度至关重要。昇腾AI处理器是一款专门面向AI领域的AI加速器&#xff0c;其AI Core采用达芬奇架构&#xff0c;以高性能Cube计算引擎为基础&#xff0c;针对矩阵运算进行加速&#xff0c;可大幅提高单位面…...

SQL注入之EVAL长度限制突破技巧

要求&#xff1a; PHP Eval函数参数限制在16个字符的情况下 &#xff0c;如何拿到Webshell&#xff1f; widows小皮环境搭建&#xff1a; 使用phpstudy搭建一个网站。 随后在该eval文件夹下创建一个webshell.php文件&#xff0c;并在其输入代码环境 解题思路&#xff1a; 通…...

稀疏注意力:时间序列预测的局部性和Transformer的存储瓶颈

时间序列预测是许多领域的重要问题&#xff0c;包括对太阳能发电厂发电量、电力消耗和交通拥堵情况的预测。在本文中&#xff0c;提出用Transformer来解决这类预测问题。虽然在我们的初步研究中对其性能印象深刻&#xff0c;但发现了它的两个主要缺点:(1)位置不可知性:规范Tran…...

详谈系统中的环境变量

目录 前言1. 指令背后的本质2. 环境变量背后的本质3. 环境变量到底是什么4. 命令行参数5. 本地变量 与 内置命令6. 环境变量的相关命令 前言 相信在 it 行业学习或者工作的小伙伴们&#xff0c;基本都配置过环境变量&#xff08;windows环境下&#xff09;&#xff0c;如果你也…...

RAG与LLM原理及实践(11)--- Milvus hybrid search 源码分析及思想

目录 背景 hybrid search 源码分析 WeightedRanker 源码 hybrid search 核心 参数详解 基本入参 扩展入参 aysnc方式代码调用案例 说明 源码逻辑 prepare 调用过程 stub 调用结果 stub 调用过程 blocking 与 async 调用方式 深入内部core weightedRanker 的ch…...

JavaScript模拟空调效果

JavaScript模拟空调效果https://www.bootstrapmb.com/item/15074 在JavaScript中模拟空调效果主要依赖于前端界面的交互和状态变化&#xff0c;因为实际的温度调节、风扇速度调整等硬件操作无法直接通过JavaScript在浏览器中实现。不过&#xff0c;我们可以通过JavaScript来模…...

14.2 Pandas数据处理

欢迎来到我的博客,很高兴能够在这里和您见面!欢迎订阅相关专栏: 工💗重💗hao💗:野老杂谈 ⭐️ 全网最全IT互联网公司面试宝典:收集整理全网各大IT互联网公司技术、项目、HR面试真题. ⭐️ AIGC时代的创新与未来:详细讲解AIGC的概念、核心技术、应用领域等内容。 ⭐…...

python学习7---多进程

一、介绍 多进程是指在同一程序中创建多个独立的进程来执行任务。每个进程都有自己独立的内存空间&#xff0c;相互之间不干扰。 因为GIL锁的存在&#xff0c;对于CPU密集型任务&#xff08;例如计算密集型操作&#xff09;&#xff0c;使用多进程可以提高程序的效率。 优点&am…...

基于Spring + Vue的旅游景区项目+源代码+文档说明

文章目录 源代码下载地址项目介绍项目功能界面预览 项目备注源代码下载地址 源代码下载地址 点击这里下载源码 项目介绍 基于Spring Vue的旅游景区项目 项目功能 民宿管理员&#xff1a;订单数量统计&#xff0c;订单交易额统计&#xff0c;客房统计饼图&#xff0c;酒店…...

Java后端面试题

Redis缓存穿透、雪崩、击穿&#xff0c;布隆过滤器 一致性hash 一致性hash sharding-jdbc实现一致性hash #一致性hash, 应用在mysql数据库的分库分表上&#xff0c; 现在已经完成了分库分表&#xff0c; 现在的问题出现了&#xff0c; 需要继续新增数据库节点&#xff0c; 请…...

【Git】远程仓库新建分支后,拉到本地开发

1. 在远程仓库上创建分支 2. git fetch origin&#xff1a;在本地同步远程仓库的分支&#xff08;获取远程仓库所有分支的所有修改&#xff09; 3. git remote -a&#xff1a;查看所有分支&#xff08;远程&#xff0b;本地&#xff09; 4. git checkout -b 本地名 远程仓库…...

React H5设置企业级v6版本路由的配置

路由配置是项目开发的必要一环&#xff0c;尤其是目前流行SPA&#xff0c;下面看看如何使用v6版本路由进行合理的H5路由配置 一、基本页面结构&#xff08;目录根据开发要求建&#xff0c;下面仅用于展示配置路由&#xff09; 二、具体文件实现 1. index.tsx import React f…...

【微信小程序】全局配置

1. 全局配置文件及常用的配置项 2.window (1).小程序窗口的组成部分 (2). 了解 window 节点常用的配置项 (3). 设置导航栏的标题 (4). 设置导航栏的背景色 (5). 设置导航栏的标题颜色 (6). 全局开启下拉刷新功能 (7). 设置下拉刷新时窗口的背景色 (8).设置下拉刷新时 loading …...

利用最小二乘法找圆心和半径

#include <iostream> #include <vector> #include <cmath> #include <Eigen/Dense> // 需安装Eigen库用于矩阵运算 // 定义点结构 struct Point { double x, y; Point(double x_, double y_) : x(x_), y(y_) {} }; // 最小二乘法求圆心和半径 …...

从深圳崛起的“机器之眼”:赴港乐动机器人的万亿赛道赶考路

进入2025年以来&#xff0c;尽管围绕人形机器人、具身智能等机器人赛道的质疑声不断&#xff0c;但全球市场热度依然高涨&#xff0c;入局者持续增加。 以国内市场为例&#xff0c;天眼查专业版数据显示&#xff0c;截至5月底&#xff0c;我国现存在业、存续状态的机器人相关企…...

系统设计 --- MongoDB亿级数据查询优化策略

系统设计 --- MongoDB亿级数据查询分表策略 背景Solution --- 分表 背景 使用audit log实现Audi Trail功能 Audit Trail范围: 六个月数据量: 每秒5-7条audi log&#xff0c;共计7千万 – 1亿条数据需要实现全文检索按照时间倒序因为license问题&#xff0c;不能使用ELK只能使用…...

[10-3]软件I2C读写MPU6050 江协科技学习笔记(16个知识点)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16...

python如何将word的doc另存为docx

将 DOCX 文件另存为 DOCX 格式&#xff08;Python 实现&#xff09; 在 Python 中&#xff0c;你可以使用 python-docx 库来操作 Word 文档。不过需要注意的是&#xff0c;.doc 是旧的 Word 格式&#xff0c;而 .docx 是新的基于 XML 的格式。python-docx 只能处理 .docx 格式…...

MySQL 8.0 OCP 英文题库解析(十三)

Oracle 为庆祝 MySQL 30 周年&#xff0c;截止到 2025.07.31 之前。所有人均可以免费考取原价245美元的MySQL OCP 认证。 从今天开始&#xff0c;将英文题库免费公布出来&#xff0c;并进行解析&#xff0c;帮助大家在一个月之内轻松通过OCP认证。 本期公布试题111~120 试题1…...

laravel8+vue3.0+element-plus搭建方法

创建 laravel8 项目 composer create-project --prefer-dist laravel/laravel laravel8 8.* 安装 laravel/ui composer require laravel/ui 修改 package.json 文件 "devDependencies": {"vue/compiler-sfc": "^3.0.7","axios": …...

JAVA后端开发——多租户

数据隔离是多租户系统中的核心概念&#xff0c;确保一个租户&#xff08;在这个系统中可能是一个公司或一个独立的客户&#xff09;的数据对其他租户是不可见的。在 RuoYi 框架&#xff08;您当前项目所使用的基础框架&#xff09;中&#xff0c;这通常是通过在数据表中增加一个…...

PHP 8.5 即将发布:管道操作符、强力调试

前不久&#xff0c;PHP宣布了即将在 2025 年 11 月 20 日 正式发布的 PHP 8.5&#xff01;作为 PHP 语言的又一次重要迭代&#xff0c;PHP 8.5 承诺带来一系列旨在提升代码可读性、健壮性以及开发者效率的改进。而更令人兴奋的是&#xff0c;借助强大的本地开发环境 ServBay&am…...

elementUI点击浏览table所选行数据查看文档

项目场景&#xff1a; table按照要求特定的数据变成按钮可以点击 解决方案&#xff1a; <el-table-columnprop"mlname"label"名称"align"center"width"180"><template slot-scope"scope"><el-buttonv-if&qu…...