removing azure example

This commit is contained in:
itlackey
2024-01-09 14:33:11 -06:00
parent 9ec560f956
commit 0bd01d2905
6 changed files with 0 additions and 1688 deletions

View File

@@ -1,4 +0,0 @@
AZURE_OPENAI_VERSION="2022-12-01"
AZURE_OPENAI_DEPLOYMENT=""
AZURE_OPENAI_ENDPOINT=""
AZURE_OPENAI_KEY=""

View File

@@ -1,4 +0,0 @@
.env
.DS_Store
__pycache__
.venv

View File

@@ -1,17 +0,0 @@
# AI Crew using Azure OpenAI Endpoint
## Introduction
This is a simple example using the CrewAI framework with an Azure Open AI endpoint.
## Running the Script
This example uses the Azure OpenAI API to call a model.
- **Configure Environment**: Copy ``.env.example` and set up the environment variables the model, endpoint url, and api key.
- **Install Dependencies**: Run `poetry install --no-root`.
- **Execute the Script**: Run `python main.py` to see a list of recommended changes to this document.
## Details & Explanation
- **Running the Script**: Execute `python main.py`. The script will leverage the CrewAI framework to process the specified file and return a list of changes.
## License
This project is released under the MIT License.

View File

@@ -1,57 +0,0 @@
import sys
from crewai import Agent, Task
import os
from dotenv import load_dotenv
from crewai import Crew, Process
from langchain_openai import AzureChatOpenAI
os.environ.clear()
load_dotenv()
default_llm = AzureChatOpenAI(
openai_api_version=os.environ.get("AZURE_OPENAI_VERSION", "2023-07-01-preview"),
azure_deployment=os.environ.get("AZURE_OPENAI_DEPLOYMENT", "gpt35"),
azure_endpoint=os.environ.get("AZURE_OPENAI_ENDPOINT", "https://<your-endpoint>.openai.azure.com/"),
api_key=os.environ.get("AZURE_OPENAI_KEY")
)
# Create a researcher agent
researcher = Agent(
role='Senior Researcher',
goal='Discover groundbreaking technologies',
verbose=True,
backstory='A curious mind fascinated by cutting-edge innovation and the potential to change the world, you know everything about tech.'
)
# Create a writer agent
writer = Agent(
role='Writer',
goal='Craft compelling stories about tech discoveries',
verbose=True,
backstory='A creative soul who translates complex tech jargon into engaging narratives for the masses, you write using simple words in a friendly and inviting tone that does not sounds like AI.'
)
# Task for the researcher
research_task = Task(
description='Identify the next big trend in AI',
agent=researcher # Assigning the task to the researcher
)
# Task for the writer
write_task = Task(
description='Write an article on AI advancements leveraging the research made.',
agent=writer # Assigning the task to the writer
)
# Instantiate your crew
tech_crew = Crew(
agents=[researcher, writer],
tasks=[research_task, write_task],
process=Process.sequential # Tasks will be executed one after the other
)
# Begin the task execution
tech_crew.kickoff()

1581
azure_model/poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,25 +0,0 @@
[tool.poetry]
name = "azure-crewai-example"
version = "0.1.0"
description = ""
authors = ["ITLackey <itlackey@gmail.com>"]
[tool.poetry.dependencies]
python = ">=3.10.0,<3.12"
crewai = "0.1.24"
python-dotenv = "1.0.0"
langchain_openai = "0.0.2"
[tool.pyright]
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md
useLibraryCodeForTypes = true
exclude = [".cache"]
[tool.ruff]
# https://beta.ruff.rs/docs/configuration/
select = ['E', 'W', 'F', 'I', 'B', 'C4', 'ARG', 'SIM']
ignore = ['W291', 'W292', 'W293']
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"