[GH-ISSUE #2] AttributeError: module 'ollama' has no attribute 'chat' #941

Closed
opened 2026-04-17 05:07:20 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @shyamshyre on GitHub (May 2, 2024).
Original GitHub issue: https://github.com/Shubhamsaboo/awesome-llm-apps/issues/2

Error while executing the Program.

Inititally it was throwing if the model name is given as llama3. Then i changed with the modelname displaying in ollama:list.

Then it ran and displayed " Web Page Successfully Loaded". Then after made an attempt to chat then it was throwing below error.

module 'ollama' has no attribute 'chat'

Originally created by @shyamshyre on GitHub (May 2, 2024). Original GitHub issue: https://github.com/Shubhamsaboo/awesome-llm-apps/issues/2 Error while executing the Program. Inititally it was throwing if the model name is given as llama3. Then i changed with the modelname displaying in ollama:list. Then it ran and displayed " Web Page Successfully Loaded". Then after made an attempt to chat then it was throwing below error. module 'ollama' has no attribute 'chat'
Author
Owner

@shyamshyre commented on GitHub (May 2, 2024):

Screenshot 2024-05-03 at 12 45 59 AM
<!-- gh-comment-id:2091348513 --> @shyamshyre commented on GitHub (May 2, 2024): <img width="791" alt="Screenshot 2024-05-03 at 12 45 59 AM" src="https://github.com/Shubhamsaboo/awesome-llm-apps/assets/1207919/e24e4d4d-00f7-4012-a0d3-b36caae1da3b">
Author
Owner

@shyamshyre commented on GitHub (May 4, 2024):

Any help ? Any breakthrough??

<!-- gh-comment-id:2094240367 --> @shyamshyre commented on GitHub (May 4, 2024): Any help ? Any breakthrough??
Author
Owner

@Shubhamsaboo commented on GitHub (May 4, 2024):

What's the name of your python file?

Is your file named ollama.py?

<!-- gh-comment-id:2094309789 --> @Shubhamsaboo commented on GitHub (May 4, 2024): What's the name of your python file? Is your file named ollama.py?
Author
Owner

@Shubhamsaboo commented on GitHub (May 4, 2024):

Screenshot 2024-05-04 at 12 19 57 PM

The same code works for me, make sure your file is not named as ollama.py and you install all the requirements correctly.

<!-- gh-comment-id:2094310658 --> @Shubhamsaboo commented on GitHub (May 4, 2024): <img width="820" alt="Screenshot 2024-05-04 at 12 19 57 PM" src="https://github.com/Shubhamsaboo/awesome-llm-apps/assets/31396011/cc53f664-7903-4ef0-88a9-1f578a28b43a"> The same code works for me, make sure your file is not named as ollama.py and you install all the requirements correctly.
Author
Owner

@shyamshyre commented on GitHub (May 4, 2024):

Spot on ! Same Mistake.
Thanks, you made my day !!

<!-- gh-comment-id:2094318748 --> @shyamshyre commented on GitHub (May 4, 2024): Spot on ! Same Mistake. Thanks, you made my day !!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-llm-apps#941