Skip to content
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

[BLCKCHN-213] add vertex ai #37

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

[BLCKCHN-213] add vertex ai #37

wants to merge 1 commit into from

Conversation

leejw51crypto
Copy link
Collaborator

Add support for Vertex AI in chatbot and service layers

@leejw51crypto leejw51crypto marked this pull request as draft December 17, 2024 12:28
@leejw51crypto leejw51crypto marked this pull request as ready for review December 18, 2024 07:29
Add support for Vertex AI in chatbot and service layers

- Introduced Vertex AI as a new provider option in the chatbot and service layers.
- Updated environment variable checks to include GOOGLE_PROJECT_ID.
- Enhanced .gitignore to exclude additional file types.
- Added VertexAIService class for handling interactions with Vertex AI.
- Updated LLM interfaces and factory to accommodate Vertex AI configurations.
- Implemented response generation methods for Vertex AI and updated existing services to support new functionality.

Enhance VertexAIService to support multiple function calls

- Updated the VertexAIService to handle multiple function calls from the response.
- Refactored response generation logic to accommodate cases with no function calls, returning text responses directly.
- Improved error handling for invalid response formats from the model.
@@ -188,4 +191,10 @@ export class GeminiService implements LLMService {
throw new Error(`Gemini API error: ${error instanceof Error ? error.message : 'Unknown error'}`);
}
}

async generateResponse(context: QueryContext[]): Promise<AIMessageResponse> {
// Convert existing interpretUserQuery implementation to match new interface
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove this comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants