Skip to content

Commit

Permalink
Updated as per feedbacks (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuldeep-knoldus authored Jun 24, 2024
1 parent f68ea2b commit 81e858e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ export class TabularViewComponent implements OnInit {
return '<button class="check-btn">Quality Check</button>';
},
onCellClicked: (params: { data: { id: number; }; }) => {
console.log('Cell clicked with ID:', params.data.id);

this.blogService.getPostById(params.data.id).subscribe((response: any) => {
this.router.navigate(['/quality-check'], {state: {data: response}});
});
Expand Down
5 changes: 0 additions & 5 deletions blogs-analyzer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@
<artifactId>spring-ai-vertex-ai-gemini-spring-boot-starter</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-vertex-ai-palm2-spring-boot-starter</artifactId>
</dependency>

<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-vertexai</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class CorsConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:4200")
.allowedOrigins("*")
.allowedMethods("GET", "POST", "PUT", "DELETE")
.allowedHeaders("*")
.allowCredentials(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public GenerativeModel geminiProVisionGenerativeModel(VertexAI vertexAI) {

@Bean
@SessionScope
public ChatSession chatSession(@Qualifier("geminiProGenerativeModel") GenerativeModel generativeModel) {
public ChatSession chatSession(@Qualifier("geminiProVisionGenerativeModel") GenerativeModel generativeModel) {
return new ChatSession(generativeModel);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
Expand All @@ -26,7 +27,8 @@ public class WordPressController {
@Autowired
private RestTemplate restTemplate;

private final String WORDPRESS_API_BASE_URL = "https://blog.nashtechglobal.com/wp-json/wp/v2/";
@Value("${wordpress.api.base-url}")
private String WORDPRESS_API_BASE_URL;

@GetMapping("/posts/{id}")
public ResponseEntity<String> getPostById(@PathVariable Long id) {
Expand Down
3 changes: 3 additions & 0 deletions blogs-analyzer/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ spring:
name: blogs-analyzer
server:
port: '8888'
wordpress:
api:
base-url: "https://blog.nashtechglobal.com/wp-json/wp/v2/"

0 comments on commit 81e858e

Please sign in to comment.