Skip to content

Commit 37b10d7

Browse files
committed
small fix
1 parent 585e5f4 commit 37b10d7

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

gentopia/agent/vanilla/agent.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
from typing import List, Union, Optional
22

33
from gentopia.agent.base_agent import BaseAgent
4-
from gentopia.llm import OpenAIGPTClient, HuggingfaceLLMClient
4+
from gentopia.llm import OpenAIGPTClient
5+
from gentopia.utils.util import check_huggingface
6+
if check_huggingface():
7+
from gentopia.llm import HuggingfaceLLMClient
58
from gentopia.llm.base_llm import BaseLLM
69
from gentopia.model.agent_model import AgentType
710
from gentopia.output.base_output import BaseOutput

gentopia/llm/client/huggingface.py

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
raise ImportError("Huggingface LLM requires PyTorch and Transformers to be installed.")
55
import json
66
import os
7+
import torch
8+
from transformers import TextIteratorStreamer
79
from typing import Generator, Optional
810
from threading import Thread
911
from pydantic import validator

gentopia/manager/local_llm_manager.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import socket
44
from typing import AnyStr, Tuple, List
55
from time import sleep
6-
from gentopia.llm import HuggingfaceLLMClient
76
from gentopia.llm.base_llm import BaseLLM
87
from gentopia.llm.wrap_llm import WrapLLM
98
from gentopia.manager.base_llm_manager import BaseLLMManager, BaseServerInfo

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='gentopia',
5-
version='0.0.2',
5+
version='0.0.4',
66
packages=find_packages(exclude=['llm', 'llm.*']),
77
url='https://github.com/Gentopia-AI/Gentopia',
88
license='MIT license',
@@ -43,5 +43,7 @@
4343
'pinecone-client',
4444
'chroma',
4545
'chromadb',
46+
'tiktoken',
47+
'scholarly'
4648
],
4749
)

0 commit comments

Comments
 (0)