Git Product home page Git Product logo

seniaxz / crewai-simple Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arapellis-odysseas/crewai-simple

0.0 0.0 0.0 12 KB

This simple example creates a single agent (Writer) which receives a tech topic and creates a small blog-post. The output is a markdown file. The important thing here is the integration with ollama. Ollama allows easy access to a list of LLMs.

License: MIT License

Python 100.00%

crewai-simple's Introduction

CrewAI

A simple CrewAI example

This simple example creates a single agent (Writer) which receives a tech topic and creates a small blog-post. The output is a markdown file. The important thing here is the integration with ollama. Ollama allows easy access to a list of LLMs.

Ollama set-up

  • Install Ollama. You can find information at Ollama or Ollama_github

  • Download one model with the ollama pull {name_of_the_model} e.g. ollama pull gemma:2b to download and use locally the gemma:2b model

  • Create a Modelfile. Authors of CrewAI suggest you create a custom modelfile. So, create a file named customModelfile. Inside write:

    • FROM gemma:2b
      PARAMETER temperature 0.8
      PARAMETER stop Result
      
    • ollama create CrewAI -f ./customModelfile note: Replace ./customModelfile with your actual path.
  • Make sure that the model exist by showing all the models you have available with the following command:

    • ollama list
  • Make sure that ollama is running with the following command:

    • ollama run CrewAI
    • To leave the chat write on the terminal /bye

Create your prefered virtual environment

  • Use the command in your terminal: python -m venv /path/to/new/virtual/environment and then activate the venv.
  • python -m venv .venv
  • Windows version: venv\Scripts\activate
  • Then install all depedencies by: pip3 install -r requirements.txt
  • Then create a new folder inside your working folder e.g. crew.
  • Then paste the following files inside:
    • .env
    • main.py
  • Create a new folder inside and name it : blog-posts

Set up you .env file

  • The only thing you need to change is the OPENAI_MODEL_NAME=. Make sure that you put the name you gave in the custom model. e.g. CrewAI

Run the main.py

  • cd into the Crew folder: cd crew
  • python main.py

crewai-simple's People

Contributors

arapellis-odysseas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.