Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First version of lanchain adapter #144

Merged
merged 9 commits into from
Jan 22, 2025
Merged

First version of lanchain adapter #144

merged 9 commits into from
Jan 22, 2025

Conversation

sunbit
Copy link
Contributor

@sunbit sunbit commented Jan 17, 2025

Script to test agents:

from crewai import Agent, Task
from crewai import Crew, Process
import litellm
from nuclia.lib.nua_chat import NucliaNuaChat
import asyncio


TOKEN = "XXXXXXX" # NUA Key

custom_llm = NucliaNuaChat(
    token=TOKEN,
)

litellm.custom_provider_map = [{"provider": "nuclia", "custom_handler": custom_llm}]


# Create a researcher agent
researcher = Agent(
    role="Senior Researcher",
    goal="Discover groundbreaking technologies",
    verbose=True,
    llm="nuclia/chatgpt-azure-4o",
    backstory="A curious mind fascinated by cutting-edge innovation and the potential to change the world, you know everything about tech.",
)

# Task for the researcher
research_task = Task(
    description="Identify the next big trend in AI",
    expected_output="5 paragraphs on the next big AI trend",
    agent=researcher,  # Assigning the task to the researcher
)


tech_crew = Crew(
    agents=[researcher],
    tasks=[research_task],
    process=Process.sequential,
)


# Begin the task execution
async def async_crew_execution():
    await tech_crew.kickoff_async()


asyncio.run(async_crew_execution())

@drf7 drf7 merged commit ec6f115 into main Jan 22, 2025
3 checks passed
@drf7 drf7 deleted the langchain_adapter branch January 22, 2025 11:52
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