ترقية @firebase/ai من 2.x إلى 3.x
مقارنة الواجهة العامة لـ @firebase/ai بين 2.16.0 و3.0.0، محسوبة تلقائيًا من أنواع TypeScript. التوقيع المعدّل تغيير محتمل غير متوافق، وليس أمرًا مؤكدًا.
الملخص
| مسارات الاستيراد المحذوفة | 0 |
|---|---|
| الصادرات المحذوفة | 2 |
| التوقيعات المعدّلة | 3 |
| أعضاء الأصناف أو الواجهات المحذوفة | 53 |
| أعضاء الأصناف أو الواجهات المعدّلة | 8 |
| موقوفة حديثًا | 11 |
| تغييرات المتطلبات (engines واعتماديات peer) | 1 |
| صادرات جديدة | 1 |
الصادرات المحذوفة
| import | export | kind | قبل |
|---|---|---|---|
@firebase/ai | ChatSessionBase | class | class |
@firebase/ai | VertexAIBackend | class | class |
التوقيعات المعدّلة
| export | قبل | بعد |
|---|---|---|
@firebase/ai · Tool | FunctionDeclarationsTool | CodeExecutionTool | GoogleMapsTool | GoogleSearchTool | URLContextTool | CodeExecutionTool | FunctionDeclarationsTool | GoogleMapsTool | GoogleSearchTool | URLContextTool |
@firebase/ai · BackendType | "AGENT_PLATFORM" | "VERTEX_AI" | "GOOGLE_AI" | "AGENT_PLATFORM" | "GOOGLE_AI" |
@firebase/ai · ChatSession | class | interface |
أعضاء الأصناف أو الواجهات المحذوفة
| member | import | قبل |
|---|---|---|
AI.location | @firebase/ai | string |
TextPart.inlineData | @firebase/ai | undefined |
TextPart.functionCall | @firebase/ai | undefined |
TextPart.executableCode | @firebase/ai | undefined |
TextPart.functionResponse | @firebase/ai | undefined |
TextPart.codeExecutionResult | @firebase/ai | undefined |
GoogleMaps.enableWidget | @firebase/ai | boolean | undefined |
ChatSession._history | @firebase/ai | Content[] |
ChatSession._apiSettings | @firebase/ai | ApiSettings |
ChatSession.chromeAdapter | @firebase/ai | any |
LiveSession.sendMediaChunks | @firebase/ai | (mediaChunks: GenerativeContentBlob[]): Promise<void> |
LiveSession.sendMediaStream | @firebase/ai | (mediaChunkStream: ReadableStream<GenerativeContentBlob>): Promise<void> |
FileDataPart.text | @firebase/ai | undefined |
FileDataPart.inlineData | @firebase/ai | undefined |
FileDataPart.functionCall | @firebase/ai | undefined |
FileDataPart.executableCode | @firebase/ai | undefined |
FileDataPart.functionResponse | @firebase/ai | undefined |
FileDataPart.codeExecutionResult | @firebase/ai | undefined |
InlineDataPart.text | @firebase/ai | undefined |
InlineDataPart.functionCall | @firebase/ai | undefined |
InlineDataPart.executableCode | @firebase/ai | undefined |
InlineDataPart.functionResponse | @firebase/ai | undefined |
InlineDataPart.codeExecutionResult | @firebase/ai | undefined |
FunctionCallPart.text | @firebase/ai | undefined |
FunctionCallPart.inlineData | @firebase/ai | undefined |
FunctionCallPart.executableCode | @firebase/ai | undefined |
FunctionCallPart.functionResponse | @firebase/ai | undefined |
FunctionCallPart.codeExecutionResult | @firebase/ai | undefined |
GroundingMetadata.retrievalQueries | @firebase/ai | string[] | undefined |
ExecutableCodePart.text | @firebase/ai | undefined |
ExecutableCodePart.thought | @firebase/ai | undefined |
ExecutableCodePart.fileData | @firebase/ai | never |
ExecutableCodePart.inlineData | @firebase/ai | undefined |
ExecutableCodePart.functionCall | @firebase/ai | undefined |
ExecutableCodePart.functionResponse | @firebase/ai | undefined |
ExecutableCodePart.codeExecutionResult | @firebase/ai | undefined |
CountTokensResponse.totalBillableCharacters | @firebase/ai | number | undefined |
FunctionResponsePart.text | @firebase/ai | undefined |
FunctionResponsePart.inlineData | @firebase/ai | undefined |
FunctionResponsePart.functionCall | @firebase/ai | undefined |
FunctionResponsePart.executableCode | @firebase/ai | undefined |
FunctionResponsePart.codeExecutionResult | @firebase/ai | undefined |
CodeExecutionResultPart.text | @firebase/ai | undefined |
CodeExecutionResultPart.thought | @firebase/ai | undefined |
CodeExecutionResultPart.fileData | @firebase/ai | never |
CodeExecutionResultPart.inlineData | @firebase/ai | undefined |
CodeExecutionResultPart.functionCall | @firebase/ai | undefined |
CodeExecutionResultPart.executableCode | @firebase/ai | undefined |
CodeExecutionResultPart.functionResponse | @firebase/ai | undefined |
LanguageModelCreateOptions.topK | @firebase/ai | number | undefined |
LanguageModelCreateOptions.temperature | @firebase/ai | number | undefined |
LanguageModelCreateCoreOptions.topK | @firebase/ai | number | undefined |
LanguageModelCreateCoreOptions.temperature | @firebase/ai | number | undefined |
أعضاء الأصناف أو الواجهات المعدّلة
| member | قبل | بعد |
|---|---|---|
ChatSession.constructor | (apiSettings: ApiSettings, model: string, chromeAdapter?: ChromeAdapter | undefined, params?: StartChatParams | undefined, requestOptions?: RequestOptions | undefined): ChatSession | |
GenerativeModel.generateContent | (request: string | GenerateContentRequest | (string | Part)[], singleRequestOptions?: SingleRequestOptions | undefined): Promise<GenerateContentResult> | (request: string | (string | Part)[] | GenerateContentRequest, singleRequestOptions?: SingleRequestOptions | undefined): Promise<GenerateContentResult> |
GenerativeModel.generateContentStream | (request: string | GenerateContentRequest | (string | Part)[], singleRequestOptions?: SingleRequestOptions | undefined): Promise<GenerateContentStreamResult> | (request: string | (string | Part)[] | GenerateContentRequest, singleRequestOptions?: SingleRequestOptions | undefined): Promise<GenerateContentStreamResult> |
ExecutableCodePart.executableCode | ExecutableCode | undefined | ExecutableCode |
CodeExecutionResultPart.codeExecutionResult | CodeExecutionResult | undefined | CodeExecutionResult |
StartTemplateChatParams.templateVariables | Record<string, unknown> | undefined | Record<string, unknown> |
TemplateGenerativeModel.generateContent | (templateId: string, templateVariables: Record<string, unknown>, singleRequestOptions?: SingleRequestOptions | undefined, templateToolConfig?: TemplateToolConfig | undefined): Promise<GenerateContentResult> | (request: TemplateRequest, singleRequestOptions?: SingleRequestOptions | undefined): Promise<GenerateContentResult> |
TemplateGenerativeModel.generateContentStream | (templateId: string, templateVariables: Record<string, unknown>, singleRequestOptions?: SingleRequestOptions | undefined, templateToolConfig?: TemplateToolConfig | undefined): Promise<GenerateContentStreamResult> | (request: TemplateRequest, singleRequestOptions?: SingleRequestOptions | undefined): Promise<GenerateContentStreamResult> |
موقوفة حديثًا
| export | @deprecated |
|---|---|
@firebase/ai · GenerationConfig.topK | Not supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Omit this parameter and let the model manage sampling automatically. |
@firebase/ai · GenerationConfig.topP | Not supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Omit this parameter and let the model manage sampling automatically. |
@firebase/ai · GenerationConfig.temperature | Not supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Omit this parameter and let the model manage sampling automatically. |
@firebase/ai · GenerationConfig.candidateCount | Not supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Make parallel requests instead. |
@firebase/ai · GenerationConfig.presencePenalty | Not supported in Gemini 3.x and later models. Requests that include this parameter will fail with a 400 error. Omit this parameter. |
@firebase/ai · GenerationConfig.frequencyPenalty | Not supported in Gemini 3.x and later models. Requests that include this parameter will fail with a 400 error. Omit this parameter. |
@firebase/ai · LiveGenerationConfig.topK | Not supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Omit this parameter and let the model manage sampling automatically. |
@firebase/ai · LiveGenerationConfig.topP | Not supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Omit this parameter and let the model manage sampling automatically. |
@firebase/ai · LiveGenerationConfig.temperature | Not supported in Gemini 3.x and later models. The model will ignore this parameter if it's included in a request. Omit this parameter and let the model manage sampling automatically. |
@firebase/ai · LiveGenerationConfig.presencePenalty | Not supported in Gemini 3.x and later models. Requests that include this parameter will fail with a 400 error. Omit this parameter. |
@firebase/ai · LiveGenerationConfig.frequencyPenalty | Not supported in Gemini 3.x and later models. Requests that include this parameter will fail with a 400 error. Omit this parameter. |
تغييرات المتطلبات (engines واعتماديات peer)
| قبل | بعد | |
|---|---|---|
engines.node | >=20.0.0 | >=24.12.0 |
صادرات جديدة (1)
| import | export | kind |
|---|---|---|
@firebase/ai | TemplateRequest | interface |
زوّد وكيل الذكاء الاصطناعي بهذه البيانات
Vigia خادم MCP مجاني: يتحقق وكيل البرمجة لديك من الإصدارات والتغييرات غير المتوافقة والثغرات قبل أن يكتب الشيفرة. بلا تسجيل ولا مفتاح API.
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
أضِف إلى Cursorأضِف إلى VS Code★ نجمة على GitHub
أي عميل MCP آخر
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }مهارة للوكلاء (SKILL.md): تخبر الوكيل متى يستخدم Vigia · GitHub Action لطلبات السحب
الأسئلة الشائعة
ما التغييرات غير المتوافقة عند ترقية @firebase/ai من 2 إلى 3؟
بين @firebase/ai 2.16.0 و3.0.0 وجد Vigia عدد 2 من الصادرات المحذوفة، و3 من التوقيعات المعدّلة، و61 من أعضاء الأصناف أو الواجهات المحذوفة أو المعدّلة.
ما الذي أصبح موقوفًا في @firebase/ai 3؟
عُلِّم 11 من الصادرات أو الأعضاء حديثًا على أنها موقوفة في @firebase/ai 3.0.0.
للوكلاء
GET https://vigia.coredls.cloud/v1/packages/npm/@firebase/ai/upgrade?from=2.16.0&to=3.0.0