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

[Feat] Integrate Bedrock & Vertex AI Embedding Adapters #156

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

pk-zipstack
Copy link
Contributor

What

Added adapter support for Bedrock and Vertext AI Embedding models

Why

...

How

...

Relevant Docs

Related Issues or PRs

Dependencies Versions / Env Variables

Notes on Testing

  • Tested Prompt Studio with plugins like summarize, and single pass extraction.
  • Deployed the same as a workflow and tested.

Screenshots

...

Checklist

I have read and understood the Contribution Guidelines.

Copy link
Contributor

Choose a reason for hiding this comment

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

@gaya3-zipstack do you see any benefit of adding this file and similarly for other adapters as well? If not, let's remove it since we anyway treat everything as subpackages

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see us leveraging this. We can remove it. But better we be consistent and do it all across..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gaya3-zipstack @chandrasekharan-zipstack, Is removing all the toml files of adapters in this PR feasible?

return "/icons/adapter-icons/Bedrock.png"

@staticmethod
def get_json_schema() -> str:
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: Check if you define this in the base class alone and avoid redefining in each implementation

except Exception as e:
raise AdapterError(str(e))

def test_connection(self) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: I see that the same is used in all implementations. You can move this to the base class and not define it in each implementation

src/unstract/sdk/adapters/exceptions.py Outdated Show resolved Hide resolved
embedding: BaseEmbedding = VertexTextEmbedding(
model_name=self.config.get(Constants.MODEL),
project=self.config.get(Constants.PROJECT),
credentials=credentials,
Copy link
Contributor

Choose a reason for hiding this comment

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

@pk-zipstack Can you please check if there are alternate ways to pass in credentials other than service account json? I remeber reading that we can also pass in keys. We can discuss and see if we need to add that option also. If at all we are supporting anything of that sort, we may have to do it for Vertex LLM also.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gaya3-zipstack, I remember reading about it too... I'll re-check once and we can discuss about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Due to the task's urgency, I wanted to follow what the LLM followed to ship it quickly.

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.

3 participants