-
Notifications
You must be signed in to change notification settings - Fork 160
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
chore: bump LITS 0.9 #505
chore: bump LITS 0.9 #505
Conversation
🦋 Changeset detectedLatest commit: 156813c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis pull request introduces a patch labeled "create-llama" and bumps the LITS version to 0.9. The enhancements include an updated Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant Settings
participant Provider
App->>Settings: Start application
Settings->>Provider: setupProvider()
Provider-->>Settings: Return configured llm & embedModel
Settings-->>App: Settings initialized with provider settings
sequenceDiagram
participant CLI
participant installTSTemplate
participant CopySettings
participant UpdatePkgJson
CLI->>installTSTemplate: Call installTSTemplate(args, modelConfig)
installTSTemplate->>CopySettings: Copy provider settings based on modelConfig.provider
installTSTemplate->>UpdatePkgJson: Update package dependencies via vectorDbDependencies
UpdatePkgJson-->>installTSTemplate: Package JSON updated
installTSTemplate-->>CLI: Template installation complete
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (45)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Got this warning when start chatting. Updated: no longer get warning in 0.9.1 Critical dependency: Accessing import.meta directly is unsupported (only property access or destructuring is supported)
Import trace for requested module:
./node_modules/.pnpm/@huggingface+transformers@3.3.3/node_modules/@huggingface/transformers/dist/transformers.mjs
./node_modules/.pnpm/@llamaindex+env@0.1.27_@aws_ede8700ce078b32f846ae32495d9aeb3/node_modules/@llamaindex/env/multi-model/dist/index.js
./node_modules/.pnpm/@llamaindex+huggingface@0.0_aa11a225fa18572f453b1d8c48d185d3/node_modules/@llamaindex/huggingface/dist/index.js
./app/api/chat/engine/settings.ts
./app/api/chat/route.ts
Using 'openai' model provider |
013d81e
to
e2a1734
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
🧹 Nitpick comments (7)
templates/components/vectordbs/typescript/chroma/generate.ts (1)
23-24
: Fix typos in the comment.The comment has two issues:
- "Documentss" has an extra 's'
- The comment mentions Pinecone but this is a Chroma implementation
- // create index from all the Documentss and store them in Pinecone + // create index from all the Documents and store them in Chromahelpers/typescript.ts (2)
185-190
: Guard against invalid or undefinedmodelConfig.provider
.
Copying files from<provider>
folder without a check may cause errors ifmodelConfig.provider
is invalid or not set. Consider handling or logging such cases to provide user feedback.
386-405
: Conditional dependency injection for backend mode is well-structured.
The new code snippet smoothly handles back-end enabled setups by installing the required readers, vector DB, and provider dependencies. Consider graceful handling or warnings if the chosen provider/DB is unsupported or omitted.templates/components/providers/typescript/anthropic/provider.ts (1)
9-12
: Consider extracting embedModelMap to a shared configuration.The
embedModelMap
is duplicated across provider files.Consider moving it to a shared configuration file to maintain consistency and reduce duplication.
// shared/embeddings.ts export const embedModelMap: Record<string, string> = { "all-MiniLM-L6-v2": "Xenova/all-MiniLM-L6-v2", "all-mpnet-base-v2": "Xenova/all-mpnet-base-v2", };templates/types/streaming/fastapi/app/api/routers/query.py (1)
25-30
: Update return type annotation for consistency.The function's return type annotation is
str
but it's using theResponse
type internally.Update the return type annotation:
async def query_request( query: str, -) -> str: +) -> str: # Consider updating to -> Response if the full response object is needed query_engine = get_query_engine() response: Response = await query_engine.aquery(query) return response.responsetemplates/components/providers/typescript/azure-openai/provider.ts (1)
19-24
: Consider adding environment variable validation.The configuration relies on environment variables without validation. Consider adding checks for required variables.
const azureConfig = { + // Throw error if required environment variables are missing + get apiKey() { + const key = process.env.AZURE_OPENAI_KEY; + if (!key) throw new Error("AZURE_OPENAI_KEY is required"); + return key; + }, + get endpoint() { + const endpoint = process.env.AZURE_OPENAI_ENDPOINT; + if (!endpoint) throw new Error("AZURE_OPENAI_ENDPOINT is required"); + return endpoint; + }, apiVersion: process.env.AZURE_OPENAI_API_VERSION || process.env.OPENAI_API_VERSION, };templates/types/streaming/nextjs/package.json (1)
13-14
: Consider package inclusion strategy for frontend NextJS.Based on the past review comment, backend packages should only be included for fullstack NextJS templates. Consider conditionally including these packages based on the template type.
Could you clarify if this is a frontend-only or fullstack NextJS template? For frontend-only templates, we should only include
@llamaindex/next
.Also applies to: 31-31
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (31)
.changeset/grumpy-snails-listen.md
(1 hunks)helpers/typescript.ts
(8 hunks)templates/components/loaders/typescript/file/loader.ts
(1 hunks)templates/components/loaders/typescript/llama_parse/loader.ts
(1 hunks)templates/components/providers/typescript/anthropic/provider.ts
(1 hunks)templates/components/providers/typescript/azure-openai/provider.ts
(1 hunks)templates/components/providers/typescript/gemini/provider.ts
(1 hunks)templates/components/providers/typescript/groq/provider.ts
(1 hunks)templates/components/providers/typescript/mistral/provider.ts
(1 hunks)templates/components/providers/typescript/ollama/provider.ts
(1 hunks)templates/components/providers/typescript/openai/provider.ts
(1 hunks)templates/components/settings/typescript/settings.ts
(1 hunks)templates/components/vectordbs/typescript/astra/generate.ts
(1 hunks)templates/components/vectordbs/typescript/astra/index.ts
(1 hunks)templates/components/vectordbs/typescript/chroma/generate.ts
(1 hunks)templates/components/vectordbs/typescript/chroma/index.ts
(1 hunks)templates/components/vectordbs/typescript/milvus/generate.ts
(1 hunks)templates/components/vectordbs/typescript/milvus/index.ts
(1 hunks)templates/components/vectordbs/typescript/mongo/generate.ts
(1 hunks)templates/components/vectordbs/typescript/mongo/index.ts
(1 hunks)templates/components/vectordbs/typescript/pg/generate.ts
(1 hunks)templates/components/vectordbs/typescript/pg/index.ts
(1 hunks)templates/components/vectordbs/typescript/pinecone/generate.ts
(1 hunks)templates/components/vectordbs/typescript/pinecone/index.ts
(1 hunks)templates/components/vectordbs/typescript/qdrant/generate.ts
(1 hunks)templates/components/vectordbs/typescript/qdrant/index.ts
(1 hunks)templates/components/vectordbs/typescript/weaviate/generate.ts
(1 hunks)templates/components/vectordbs/typescript/weaviate/index.ts
(1 hunks)templates/types/streaming/express/package.json
(1 hunks)templates/types/streaming/fastapi/app/api/routers/query.py
(2 hunks)templates/types/streaming/nextjs/package.json
(2 hunks)
✅ Files skipped from review due to trivial changes (2)
- .changeset/grumpy-snails-listen.md
- templates/components/vectordbs/typescript/astra/generate.ts
🧰 Additional context used
📓 Path-based instructions (1)
`templates/**`: For files under the `templates` folder, do n...
templates/**
: For files under thetemplates
folder, do not report 'Missing Dependencies Detected' errors.
templates/components/vectordbs/typescript/pg/index.ts
templates/components/vectordbs/typescript/milvus/index.ts
templates/types/streaming/fastapi/app/api/routers/query.py
templates/components/providers/typescript/groq/provider.ts
templates/components/providers/typescript/openai/provider.ts
templates/types/streaming/nextjs/package.json
templates/components/vectordbs/typescript/qdrant/generate.ts
templates/components/vectordbs/typescript/mongo/generate.ts
templates/components/vectordbs/typescript/mongo/index.ts
templates/components/loaders/typescript/file/loader.ts
templates/types/streaming/express/package.json
templates/components/vectordbs/typescript/weaviate/generate.ts
templates/components/vectordbs/typescript/pg/generate.ts
templates/components/vectordbs/typescript/pinecone/index.ts
templates/components/providers/typescript/ollama/provider.ts
templates/components/vectordbs/typescript/chroma/index.ts
templates/components/vectordbs/typescript/astra/index.ts
templates/components/vectordbs/typescript/weaviate/index.ts
templates/components/vectordbs/typescript/milvus/generate.ts
templates/components/providers/typescript/mistral/provider.ts
templates/components/providers/typescript/gemini/provider.ts
templates/components/providers/typescript/anthropic/provider.ts
templates/components/vectordbs/typescript/chroma/generate.ts
templates/components/settings/typescript/settings.ts
templates/components/providers/typescript/azure-openai/provider.ts
templates/components/vectordbs/typescript/pinecone/generate.ts
templates/components/vectordbs/typescript/qdrant/index.ts
templates/components/loaders/typescript/llama_parse/loader.ts
⏰ Context from checks skipped due to timeout of 90000ms (45)
- GitHub Check: typescript (20, 3.11, ubuntu-22.04, express, --llamacloud)
- GitHub Check: typescript (20, 3.11, ubuntu-22.04, express, --example-file)
- GitHub Check: typescript (20, 3.11, ubuntu-22.04, express, --no-files)
- GitHub Check: typescript (20, 3.11, ubuntu-22.04, nextjs, --llamacloud)
- GitHub Check: typescript (20, 3.11, ubuntu-22.04, nextjs, --example-file)
- GitHub Check: typescript (20, 3.11, ubuntu-22.04, nextjs, --no-files)
- GitHub Check: typescript (20, 3.11, windows-latest, express, --llamacloud)
- GitHub Check: typescript (20, 3.11, windows-latest, express, --example-file)
- GitHub Check: typescript (20, 3.11, windows-latest, express, --no-files)
- GitHub Check: typescript (20, 3.11, windows-latest, nextjs, --llamacloud)
- GitHub Check: typescript (20, 3.11, windows-latest, nextjs, --example-file)
- GitHub Check: typescript (20, 3.11, windows-latest, nextjs, --no-files)
- GitHub Check: typescript (20, 3.11, macos-latest, express, --llamacloud)
- GitHub Check: typescript (20, 3.11, macos-latest, express, --example-file)
- GitHub Check: typescript (20, 3.11, macos-latest, express, --no-files)
- GitHub Check: typescript (20, 3.11, macos-latest, nextjs, --llamacloud)
- GitHub Check: typescript (20, 3.11, macos-latest, nextjs, --example-file)
- GitHub Check: typescript (20, 3.11, macos-latest, nextjs, --no-files)
- GitHub Check: typescript (18, 3.11, ubuntu-22.04, express, --llamacloud)
- GitHub Check: typescript (18, 3.11, ubuntu-22.04, express, --example-file)
- GitHub Check: typescript (18, 3.11, ubuntu-22.04, express, --no-files)
- GitHub Check: typescript (18, 3.11, ubuntu-22.04, nextjs, --llamacloud)
- GitHub Check: typescript (18, 3.11, ubuntu-22.04, nextjs, --example-file)
- GitHub Check: typescript (18, 3.11, ubuntu-22.04, nextjs, --no-files)
- GitHub Check: typescript (18, 3.11, windows-latest, express, --llamacloud)
- GitHub Check: typescript (18, 3.11, windows-latest, express, --example-file)
- GitHub Check: typescript (18, 3.11, windows-latest, express, --no-files)
- GitHub Check: typescript (18, 3.11, windows-latest, nextjs, --llamacloud)
- GitHub Check: typescript (18, 3.11, windows-latest, nextjs, --example-file)
- GitHub Check: typescript (18, 3.11, windows-latest, nextjs, --no-files)
- GitHub Check: python (20, 3.11, ubuntu-22.04, fastapi, --llamacloud)
- GitHub Check: typescript (18, 3.11, macos-latest, express, --llamacloud)
- GitHub Check: python (20, 3.11, ubuntu-22.04, fastapi, --example-file)
- GitHub Check: typescript (18, 3.11, macos-latest, express, --example-file)
- GitHub Check: python (20, 3.11, ubuntu-22.04, fastapi, --no-files)
- GitHub Check: typescript (18, 3.11, macos-latest, express, --no-files)
- GitHub Check: python (20, 3.11, windows-latest, fastapi, --llamacloud)
- GitHub Check: typescript (18, 3.11, macos-latest, nextjs, --llamacloud)
- GitHub Check: python (20, 3.11, windows-latest, fastapi, --example-file)
- GitHub Check: typescript (18, 3.11, macos-latest, nextjs, --example-file)
- GitHub Check: python (20, 3.11, windows-latest, fastapi, --no-files)
- GitHub Check: typescript (18, 3.11, macos-latest, nextjs, --no-files)
- GitHub Check: python (20, 3.11, macos-latest, fastapi, --llamacloud)
- GitHub Check: python (20, 3.11, macos-latest, fastapi, --example-file)
- GitHub Check: python (20, 3.11, macos-latest, fastapi, --no-files)
🔇 Additional comments (30)
templates/components/loaders/typescript/file/loader.ts (1)
1-4
: LGTM!The import path update to use the scoped package
@llamaindex/readers/directory
is consistent with the LITS version bump and follows good package organization practices.templates/components/loaders/typescript/llama_parse/loader.ts (1)
1-5
: LGTM!The changes improve code organization:
- Import path update to use the scoped package is consistent with other files
- Separating the
LlamaParseReader
import improves readabilitytemplates/components/vectordbs/typescript/astra/index.ts (2)
1-16
: LGTM! Clean package restructuring.The change to use the scoped package
@llamaindex/astra
is part of a clean package restructuring. The rest of the implementation remains unchanged and maintains its functionality.
2-2
:✅ Verification successful
Verify package compatibility with LITS 0.9
The import path change to use the scoped package
@llamaindex/astra
looks good, but let's verify its compatibility.
🏁 Script executed:
#!/bin/bash # Check if @llamaindex/astra package exists and get its version info npm view @llamaindex/astra version # Check if it's listed as a dependency cat package.json | jq '.dependencies["@llamaindex/astra"], .devDependencies["@llamaindex/astra"]'Length of output: 187
Import update verified: Using scoped package is correct.
The update to import
AstraDBVectorStore
from@llamaindex/astra
aligns with the LITS 0.9 upgrade requirements. Our verification confirms that the package exists (version 0.0.5), and despite the absence of apackage.json
in the root (which may be expected given the project’s structure), no further dependency issues are apparent. Please ensure that the dependency is declared in the appropriate manifest if required.templates/components/vectordbs/typescript/weaviate/index.ts (1)
1-1
:✅ Verification successful
LGTM! Verify package availability.
The import change from path-based to scoped package is consistent with the LITS 0.9 update.
Let's verify the package availability and version:
🏁 Script executed:
#!/bin/bash # Description: Check if @llamaindex/weaviate package exists and its version. npm view @llamaindex/weaviate versionLength of output: 45
LGTM – Import change verified.
The scoped package@llamaindex/weaviate
is available at version 0.0.5, which aligns with the LITS 0.9 update. No further changes are required.templates/components/vectordbs/typescript/weaviate/generate.ts (1)
2-4
: LGTM! Import organization improved.The changes improve code organization by:
- Moving WeaviateVectorStore to its scoped package
- Consolidating llamaindex imports
templates/components/vectordbs/typescript/milvus/index.ts (1)
1-1
:✅ Verification successful
LGTM! Verify the package version.
The import change from
llamaindex/vector-store/MilvusVectorStore
to@llamaindex/milvus
is consistent with the LITS 0.9 upgrade.Run the following script to verify the package version:
🏁 Script executed:
#!/bin/bash # Description: Check if @llamaindex/milvus package exists and its version. npm view @llamaindex/milvus versionLength of output: 43
LGTM – Import and package version verified.
The change to importMilvusVectorStore
from@llamaindex/milvus
aligns with the LITS 0.9 upgrade. The executed script confirmed that the package is at version 0.1.0, which meets our expectations.templates/components/vectordbs/typescript/qdrant/index.ts (1)
1-1
:✅ Verification successful
LGTM! Verify the package version.
The import change from
llamaindex/vector-store/QdrantVectorStore
to@llamaindex/qdrant
is consistent with the LITS 0.9 upgrade.Run the following script to verify the package version:
🏁 Script executed:
#!/bin/bash # Description: Check if @llamaindex/qdrant package exists and its version. npm view @llamaindex/qdrant versionLength of output: 43
Package Import Verified and Approved
The import change to use
@llamaindex/qdrant
is consistent with the LITS 0.9 upgrade. The verification script confirmed that the package exists with version 0.1.0. No further changes are required.templates/components/vectordbs/typescript/chroma/index.ts (1)
2-2
:✅ Verification successful
LGTM! Verify the package version.
The import change from
llamaindex/vector-store/ChromaVectorStore
to@llamaindex/chroma
is consistent with the LITS 0.9 upgrade.Run the following script to verify the package version:
🏁 Script executed:
#!/bin/bash # Description: Check if @llamaindex/chroma package exists and its version. npm view @llamaindex/chroma versionLength of output: 43
LGTM! Verified that the package change is consistent with the LITS 0.9 upgrade and confirmed that the installed version of
@llamaindex/chroma
is 0.0.5.templates/components/vectordbs/typescript/pg/index.ts (1)
1-1
:✅ Verification successful
LGTM! Verify the package version.
The import change from
llamaindex/vector-store/PGVectorStore
to@llamaindex/postgres
is consistent with the LITS 0.9 upgrade.Run the following script to verify the package version:
🏁 Script executed:
#!/bin/bash # Description: Check if @llamaindex/postgres package exists and its version. npm view @llamaindex/postgres versionLength of output: 46
LGTM – Import and package version verified
The change to import
PGVectorStore
from@llamaindex/postgres
aligns with the LITS 0.9 upgrade, and the package version (0.0.33) has been confirmed.templates/components/vectordbs/typescript/mongo/index.ts (1)
2-2
: LGTM! Import path updated correctly.The import path has been updated to use the new scoped package
@llamaindex/mongodb
, which aligns with the LITS 0.9 update.templates/components/vectordbs/typescript/qdrant/generate.ts (1)
2-2
: LGTM! Import path updated correctly.The import path has been updated to use the new scoped package
@llamaindex/qdrant
, which aligns with the LITS 0.9 update.templates/components/vectordbs/typescript/milvus/generate.ts (1)
2-2
: LGTM! Import path updated correctly.The import path has been updated to use the new scoped package
@llamaindex/milvus
, which aligns with the LITS 0.9 update.templates/components/vectordbs/typescript/chroma/generate.ts (1)
2-2
: LGTM! Import path updated correctly.The import path has been updated to use the new scoped package
@llamaindex/chroma
, which aligns with the LITS 0.9 update.templates/components/vectordbs/typescript/pg/generate.ts (1)
1-1
: LGTM! Import path updated to use scoped package.The import statement has been updated to use the new scoped package
@llamaindex/postgres
, which is consistent with modern package management practices and the broader module restructuring.templates/components/vectordbs/typescript/mongo/generate.ts (1)
2-2
: LGTM! Import path updated to use scoped package.The import statement has been updated to use the new scoped package
@llamaindex/mongodb
, which is consistent with modern package management practices and the broader module restructuring.templates/components/settings/typescript/settings.ts (2)
1-2
: Good use of dedicated imports for maintainability.
No concerns here; importingsetupProvider
from a dedicated file helps keep the settings initialization cleaner and modular.
17-18
: Consider awaiting the provider setup if it's asynchronous.
IfsetupProvider()
involves any asynchronous operations, calling it withoutawait
could lead to race conditions whereinitSettings()
returns before the provider is fully configured.helpers/typescript.ts (6)
9-9
: Importing model-related types helps clarify usage.
These additional imports ensure clearer type definitions for model providers and vector databases.
30-30
: Expanding function signature withmodelConfig
improves flexibility.
AddingmodelConfig
makes the template installation process more adaptable to different model providers and configurations.
250-251
: Passingbackend
andmodelConfig
for package creation is a good modular design.
Ensuring these parameters flow through allows for more flexible configuration when generating the package.json.
261-287
: Confirm version consistency for provider dependencies.
Pinned versions help avoid conflicts, but please verify they are up-to-date and compatible with each other as new versions of@llamaindex/*
are released.
289-321
: Double-check pinned versions for vector database dependencies.
Similar to provider dependencies, ensure these pinned versions align with current stable releases and consider updating them if needed.
333-334
: ExpandingupdatePackageJson
signature is appropriate.
Addingbackend
andmodelConfig
as parameters supports more dynamic handling of environment and model settings.templates/components/vectordbs/typescript/pinecone/index.ts (1)
2-2
: Updated import path for PineconeVectorStore is appropriate.
Using@llamaindex/pinecone
directly is more canonical and likely aligns with the new library structure.templates/components/vectordbs/typescript/pinecone/generate.ts (1)
2-2
: LGTM! Import path updated to use scoped package.The change correctly updates the import path to use the new scoped package
@llamaindex/pinecone
.templates/components/providers/typescript/azure-openai/provider.ts (3)
26-37
: LGTM! Proper model fallback and type handling.The LLM configuration is well-structured with:
- Appropriate model fallback to "gpt-35-turbo"
- Proper type conversion for maxTokens
39-48
: LGTM! Proper embedding model configuration.The embedding model setup is well-implemented with:
- Optional dimensions parameter
- Proper type conversion using parseInt
6-17
:❓ Verification inconclusive
Verify model mapping completeness and accuracy.
The model mapping appears comprehensive, but some model names reference future dates (e.g., gpt-4o-2024-05-13, gpt-4-turbo-2024-04-09) that might not be currently available.
🌐 Web query:
What are the currently available Azure OpenAI model deployments and their corresponding OpenAI model names?
💡 Result:
Azure OpenAI Service offers a diverse range of model deployments with varying capabilities and regional availability. Here’s an overview of key deployments and their corresponding underlying OpenAI models:
Available Model Deployments
O-Series Models
Specialized for advanced reasoning tasks like coding and mathematics:
Azure Deployment Name Corresponding OpenAI Model Key Features o3-mini
Limited-access reasoning Structured outputs; text-only input o1
Limited-access multimodal Text/image input; expanded token support o1-preview
Older preview version Legacy support o1-mini
Global standard deployment Faster coding tasks; lower latency GPT Series
General-purpose language and multimodal capabilities:
Azure Deployment Name Corresponding OpenAI Model Capabilities gpt‑35‑turbo
Open-source base General language tasks gpt‑35‑turbo-instruct
Instruction-following variant Task-specific responses Multimodal Models gpt‑40
Latest multimodal Text/image input; low latency gpt‑40‑mini
Compact version Cost-efficient inference gpt‑turbo-with-vision
Vision integration Image understanding/analysis Specialized Models
For niche applications:
Category Azure Deployment Names Embeddings Text similarity vectorization DALL-E Image generation from text Whisper Speech-to-text transcription Text-to-Speech Audio synthesis (preview) Regional Availability
Availability varies significantly by region:
eastus2: Full O-Series + latest GPT variants swedencentral: Broadest coverage westus/northcentralus: Partial O-Series access
Most O-Series require explicit access requests except global-standard
o1-mini
.Deployment Types
Two primary infrastructure options:
# Standard Deployments openai.api_type = "azure_standard" # Global routing # Provisioned Deployments openapi.deployment_type = "provisioned_managed" # Dedicated capacityFor code integration using Python SDK:
from openai import AzureOpenAI client = AzureOpenAI( api_key="YOUR_KEY", api_version="2025年02月19日", base_url="https://<resource>.openai.azure.com" ) models = client.models.list() print([model.id for model in models])Key considerations when deploying:
- Verify regional availability via Microsoft Learn documentation[2][7]
- Check content filtering requirements[2]
- Use auto-update settings where possible[7]
Recent updates include expanded vision capabilities through multimodal O-Series/GPT integrations[1][10].
Citations:
- 1: https://blog.consoleconnect.com/whats-new-with-microsoft-azure-for-2025
- 2: https://learn.microsoft.com/en-us/azure/ai-services/openai/overview
- 3: https://www.restack.io/p/openai-python-answer-azure-openai-list-models-cat-ai
- 4: https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models
- 5: https://learn.microsoft.com/en-us/rest/api/azureopenai/models/list?view=rest-azureopenai-2024-10-21
- 6: https://www.youtube.com/watch?v=a_ALdOWXn-0
- 7: https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/working-with-models
- 8: https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/chatgpt
- 9: `Model` API doesn't retrieve Azure OpenAI deployments openai/openai-python#920
- 10: https://learn.microsoft.com/en-us/azure/ai-services/openai/whats-new
Verify Azure OpenAI model mapping consistency and intent.
The current mapping in
templates/components/providers/typescript/azure-openai/provider.ts
(lines 6–17) looks comprehensive overall. However, please double-check the entries that include date-specific identifiers:
gpt-4-turbo-2024-04-09
→gpt-4-turbo
gpt-4o-2024-05-13
→gpt-4o-2024-05-13
Recent Azure OpenAI documentation and deployments do not clearly list models with these date suffixes. Confirm whether:
- These date-tagged entries are intentionally reserved for future or pre-release deployments.
- They should instead be aligned with the currently documented model deployments (e.g.,
gpt‑35‑turbo
,gpt‑35‑turbo-instruct
,gpt‑40
, etc.).Please review and update if necessary to ensure the provider’s configuration accurately reflects the active Azure OpenAI service offerings.
templates/types/streaming/express/package.json (1)
19-20
:❓ Verification inconclusive
Verify dependency compatibility with LITS 0.9.
The addition of new dependencies and version update align with the PR objective to bump LITS to 0.9.
Also applies to: 26-26
🏁 Script executed:
#!/bin/bash # Check for any peer dependency warnings with the new versions npm install --package-lock-only npm ls llamaindex @aws-crypto/sha256-js patheLength of output: 544
Below is an updated review comment. Note that the original dependency check ran from the repository root instead of the package directory. Please verify manually by re-running the checks from within the proper location (i.e.
templates/types/streaming/express
) to confirm that no peer dependency issues exist.
Ensure dependency checks run from the correct directory
The dependency bump and new additions for LITS 0.9 appear aligned with the PR objective. However, the initial verification command failed because it ran from the repository root instead of the package's directory. Please re-run the following command from within
templates/types/streaming/express
:
Command to run:
cd templates/types/streaming/express npm install --package-lock-only && npm ls llamaindex @aws-crypto/sha256-js patheAction required:
Manually verify that this command produces no peer dependency warnings before merging.Also applies to: 26-26
beautiful @thucpn ! |
Summary by CodeRabbit
New Features
setupProvider
function for multiple providers to streamline initialization.Refactor
Chores