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

chore: let conv.message be str if no image provided in request #3225

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

Conversation

Lanture1064
Copy link

@Lanture1064 Lanture1064 commented Apr 7, 2024

Why are these changes needed?

When using langchaingo w/ fastchat, it generates requests with formats like "messages":["text":"given text", "type": "text"] as default, which will be recognized and processed as a request with image since JSON sees it as a list(dict), therefore causing errors at prompt = conv.get_prompt() since most model adapters for normal LLMs could not accept conv.messages as list[tuple].

By adopting this fix, requests will plain texts would be correctly recognized and appended to conv as str.

Related issue number (if applicable)

Checks

  • I've run format.sh to lint the changes in this PR.
  • I've included any doc changes needed.
  • I've made sure the relevant tests are passing (if applicable).

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.

None yet

1 participant