new(all): Node.js v22 and ts-node.
This commit is contained in:
		
							parent
							
								
									40dc1f5946
								
							
						
					
					
						commit
						a99430e5df
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -119,7 +119,8 @@ export class ImageProcessingServices {
 | 
				
			||||||
      // Initialize the Azure OpenAI client
 | 
					      // Initialize the Azure OpenAI client
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      const client = new AzureOpenAI({
 | 
					      const client = new AzureOpenAI({
 | 
				
			||||||
        baseURL: azureOpenAIEndpoint,
 | 
					        endpoint: azureOpenAIEndpoint,
 | 
				
			||||||
 | 
					        deployment: azureOpenAIImageModel,
 | 
				
			||||||
        apiVersion: azureOpenAIVersion,
 | 
					        apiVersion: azureOpenAIVersion,
 | 
				
			||||||
        apiKey: azureOpenAIKey
 | 
					        apiKey: azureOpenAIKey
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
| 
						 | 
					@ -127,7 +128,7 @@ export class ImageProcessingServices {
 | 
				
			||||||
      // Make a request to the image generation endpoint
 | 
					      // Make a request to the image generation endpoint
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
      const response = await client.images.generate({
 | 
					      const response = await client.images.generate({
 | 
				
			||||||
        model: azureOpenAIImageModel,
 | 
					        model: '',
 | 
				
			||||||
        prompt: prompt,
 | 
					        prompt: prompt,
 | 
				
			||||||
        n: 1,
 | 
					        n: 1,
 | 
				
			||||||
        size: '1024x1024'
 | 
					        size: '1024x1024'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue