# LangChain: Optimum Habana Examples Text-Generation

**URL:** https://forum.habana.ai/t/langchain-optimum-habana-examples-text-generation/1173
**Category:** Inference
**Created:** [April 24, 2024, 3:13am UTC](https://forum.habana.ai/t/langchain-optimum-habana-examples-text-generation/1173 "2024-04-24T03:13:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kitana](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kitana](https://forum.habana.ai/u/kitana)
#### Post date: [April 24, 2024, 3:13am UTC](https://forum.habana.ai/t/langchain-optimum-habana-examples-text-generation/1173/1 "2024-04-24T03:13:54Z")

</div>

I am having difficulty using LangChain v0.0.191 with the Text-Generation-Pipeline and DeepSpeed v1.15.0 when I pulled the latest version of Optimum Habana from main. I followed the directions on the GitHub page ([optimum-habana/examples/text-generation/text-generation-pipeline at main · huggingface/optimum-habana · GitHub](https://github.com/huggingface/optimum-habana/tree/main/examples/text-generation/text-generation-pipeline)) but was unable to get a usable response. I could use the single or multi-prompt CLI script from Text-Generation however that was all. Is anyone else experiencing issues?

---

<div class="post-metadata">

### Author: ![Sayantan\_S](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@Sayantan\_S](https://forum.habana.ai/u/Sayantan_S)
#### Post date: [April 30, 2024, 6:19pm UTC](https://forum.habana.ai/t/langchain-optimum-habana-examples-text-generation/1173/2 "2024-04-30T18:19:02Z")

</div>

Thanks for posting, taking a look

---

<div class="post-metadata">

### Author: ![Sayantan\_S](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@Sayantan\_S](https://forum.habana.ai/u/Sayantan_S)
#### Post date: [April 30, 2024, 6:21pm UTC](https://forum.habana.ai/t/langchain-optimum-habana-examples-text-generation/1173/3 "2024-04-30T18:21:30Z")

</div>

When you say “but was unable to get a usable response”, do you mean you generate text but it is garbage? Or are you not able to generate anything at all.

Also you mentioned `LangChain v0.0.191` but in the [requirements](https://github.com/huggingface/optimum-habana/tree/main/examples/text-generation/text-generation-pipeline#requirements), it says `langchain==0.1.16`. Can you please confirm your langchain version

---

<div class="post-metadata">

### Author: ![kitana](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kitana](https://forum.habana.ai/u/kitana)
#### Post date: [June 4, 2024, 5:48pm UTC](https://forum.habana.ai/t/langchain-optimum-habana-examples-text-generation/1173/4 "2024-06-04T17:48:22Z")

</div>

Pardon the late reply, it seems like I made the mistake of using the main branch rather than v1.11.1. It works now!
