bumped crewai version, added ollama node
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
__pycache__
|
||||
node.zip
|
||||
venv
|
||||
@@ -1,3 +1,4 @@
|
||||
from .nodes.llm_ollama_node import LlmOllama
|
||||
from .nodes.llm_chatGpt_node import LlmChatGpt
|
||||
from .nodes.llm_huggingface_node import LlmHuggingFace
|
||||
from .nodes.llm_openai_node import LlmOpenai
|
||||
@@ -16,6 +17,7 @@ NODE_CLASS_MAPPINGS = {
|
||||
"📎CrewAI LLM OpenAI": LlmOpenai,
|
||||
"📎CrewAI LLM Hugging Face": LlmHuggingFace,
|
||||
"📎CrewAI LLM Chat GPT": LlmChatGpt,
|
||||
"📎CrewAI LLM Ollama": LlmOllama,
|
||||
}
|
||||
|
||||
WEB_DIRECTORY = "./js"
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
@@ -1,5 +1,5 @@
|
||||
from .base_node import BaseNode
|
||||
from langchain_openai import ChatOpenAI
|
||||
from crewai import LLM
|
||||
import os
|
||||
|
||||
|
||||
@@ -26,5 +26,5 @@ class LlmChatGpt(BaseNode):
|
||||
FUNCTION = "create_task"
|
||||
|
||||
def create_task(self, model, api_key):
|
||||
llm = ChatOpenAI(model=model, api_key=api_key)
|
||||
llm = LLM(model=model, api_key=api_key)
|
||||
return (llm,)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from .base_node import BaseNode
|
||||
from langchain_community.llms.huggingface_endpoint import HuggingFaceEndpoint
|
||||
from crewai import LLM
|
||||
|
||||
import os
|
||||
|
||||
|
||||
@@ -31,7 +32,7 @@ class LlmHuggingFace(BaseNode):
|
||||
FUNCTION = "create_task"
|
||||
|
||||
def create_task(self, base_url, api_key, task, max_new_tokens):
|
||||
llm = HuggingFaceEndpoint(
|
||||
llm = LLM(
|
||||
endpoint_url=base_url,
|
||||
huggingfacehub_api_token=api_key,
|
||||
task=task,
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
from .base_node import BaseNode
|
||||
from crewai import LLM
|
||||
|
||||
|
||||
class LlmOllama(BaseNode):
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"model": ("STRING", {
|
||||
"default": "ollama/llama3:70b"
|
||||
}),
|
||||
"base_url": ("STRING", {
|
||||
"default": "http://localhost:11434"
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("CREWAI_LLM",)
|
||||
RETURN_NAMES = ("llm",)
|
||||
|
||||
FUNCTION = "create_task"
|
||||
|
||||
def create_task(self, model, base_url):
|
||||
llm = LLM(model=model, base_url=base_url)
|
||||
return (llm,)
|
||||
@@ -1,5 +1,5 @@
|
||||
from .base_node import BaseNode
|
||||
from langchain_openai import ChatOpenAI
|
||||
from crewai import LLM
|
||||
import os
|
||||
|
||||
|
||||
@@ -31,5 +31,5 @@ class LlmOpenai(BaseNode):
|
||||
FUNCTION = "create_task"
|
||||
|
||||
def create_task(self, model, base_url, api_key):
|
||||
llm = ChatOpenAI(model=model, base_url=base_url, api_key=api_key)
|
||||
llm = LLM(model=model, base_url=base_url, api_key=api_key)
|
||||
return (llm,)
|
||||
|
||||
+4
-2
@@ -1,9 +1,11 @@
|
||||
[project]
|
||||
name = "comfyui-crewai"
|
||||
description = "ComfyUI-CrewAI aims to integrate Crew AI's multi-agent collaboration framework into the ComfyUI environment. By combining the strengths of Crew AI's role-based, collaborative AI agent system with ComfyUI's intuitive interface, we will create a robust platform for managing and executing complex AI tasks seamlessly"
|
||||
version = "1.0.3"
|
||||
version = "1.1.0"
|
||||
license = { file = "LICENSE" }
|
||||
dependencies = ["crewai>=0.5.0", "langchain-community>=0.0.20", "langchain-openai>=0.0.2.post1", "tokenizers>=0.19"]
|
||||
dependencies = [
|
||||
"crewai[tools]>=0.95.0,<1.0.0"
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://github.com/luandev/ComfyUI-CrewAI"
|
||||
|
||||
+1
-4
@@ -1,4 +1 @@
|
||||
crewai>=0.5.0
|
||||
langchain-community>=0.0.20
|
||||
langchain-openai>=0.0.2.post1
|
||||
tokenizers>=0.19
|
||||
crewai>=0.95.0
|
||||
|
||||
Reference in New Issue
Block a user