Skip to content

Fix hf_transformers backend#127

Open
levilovearch wants to merge 2 commits intoFarama-Foundation:mainfrom
levilovearch:main
Open

Fix hf_transformers backend#127
levilovearch wants to merge 2 commits intoFarama-Foundation:mainfrom
levilovearch:main

Conversation

@levilovearch
Copy link

The conversational pipeline has been removed since transformers 4.42 [1], and we need to use the text-generation pipeline instead [2]. I copied some code from backends/openai.py as the new pipeline is similar to Openai API in organising previous messages. The modified code has passed all related tests.
In addition, maybe it's better to change the class name TransformersConversational to something else. Please give me some suggestions, thanks.

Levi

Reference:

  1. Remove ConversationalPipeline and Conversation object huggingface/transformers#31165
  2. https://huggingface.co/docs/transformers/main/en/conversations

@LukeLIN-web
Copy link

LukeLIN-web commented Oct 9, 2024

Thank you for your effort! It is really helpful for me.

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