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/llama index image reader #509

Merged
merged 16 commits into from
Jul 4, 2024
Merged

Conversation

suluyana
Copy link
Collaborator

@suluyana suluyana commented Jul 1, 2024

Change Summary

llama index当前已有的image reader中,i2t parser 较为固定:不传入参数时为hf的固定模型,需要一定网络环境才能够下载使用;自定义时也需要遵循preprocessor+model等固定范式,无法直接调用api。

增加ImageToTextParser以解决该问题,默认可以使用识图api。

Related issue number

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Run pre-commit install and pre-commit run --all-files before git commit, and passed lint check.
  • Some cases need DASHSCOPE_TOKEN_API to pass the Unit Tests, I have at least pass the Unit tests on local
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

api_key: str = os.getenv('DASHSCOPE_API_KEY', '')): # noqa
from openai import OpenAI

assert len(api_key), 'api_key is not set.'
Copy link
Collaborator

Choose a reason for hiding this comment

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

all api_key shall allow user pass in during runtime, no assertion in init stage.

@zzhangpurdue zzhangpurdue merged commit 86d42a0 into master Jul 4, 2024
3 checks passed
@zzhangpurdue zzhangpurdue deleted the feat/llama_index_image_reader branch July 4, 2024 08:47
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