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: add Anthropic component #161

Closed
wants to merge 45 commits into from

Conversation

namwoam
Copy link
Collaborator

@namwoam namwoam commented Jun 13, 2024

Summary

  • Added support for the Anthropic component with fields aligned to the current Instill model's "TASK_TEXT_GENERATION_CHAT" task.
  • Introduced "TASK_UNMARSHAL_LIST" to the JSON component for unmarshaling JSON Lines objects.

Design Choices

  1. Unlike OpenAI, the Anthropic model does not support reading image files through image URLs. Consequently, content with the image_url field in the chat_history will be omitted. To maintain alignment with the current Instill model, incompatible fields are retained with a warning in the description.

  2. In the API specification from anthropic platform, link. We should specify media file format in our request. However, the interface of Instill Model image input doesn't support field for file format, thus this component assume all incoming images as JPEG file format at the moment.

ai/anthropic/v0/main.go Fixed Show fixed Hide fixed
@chuang8511 chuang8511 marked this pull request as draft June 13, 2024 16:17
@chuang8511
Copy link
Member

I transformed it into Draft because it has not been ready.
Please install lint to make lint pass first.

@namwoam namwoam changed the title Added Anthropic Component Support feat: Added Anthropic Component Support Jun 13, 2024
@namwoam namwoam marked this pull request as ready for review June 13, 2024 23:16
@namwoam namwoam marked this pull request as draft June 13, 2024 23:20
@namwoam namwoam changed the title feat: Added Anthropic Component Support feat: add Anthropic component Jun 13, 2024
@namwoam namwoam force-pushed the namwoam/anthropic-ai-conponent branch from 747a01e to b9586ce Compare June 25, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👋 Done
4 participants