Compare commits

..

49 Commits

Author SHA1 Message Date
Lorenze Jay
c0ad4576e2 Merge branch 'main' of github.com:crewAIInc/crewAI into knowledge 2024-11-20 15:36:40 -08:00
Lorenze Jay
6359b64d22 added docstrings and type hints for cli 2024-11-20 15:36:12 -08:00
Lorenze Jay
9329119f76 clearer docs 2024-11-20 14:05:15 -08:00
Lorenze Jay
38c0d61b11 more fixes 2024-11-20 14:02:12 -08:00
Lorenze Jay
8564f5551f rm print 2024-11-20 13:49:58 -08:00
Lorenze Jay
8a5404275f linted 2024-11-20 13:48:11 -08:00
Lorenze Jay
52189a46bc more docs 2024-11-20 13:43:08 -08:00
Lorenze Jay
44ab749fda improvements from review 2024-11-20 13:32:00 -08:00
Lorenze Jay
3c4504bd4f better docs 2024-11-20 13:31:13 -08:00
Lorenze Jay
23276cbd76 adding docs 2024-11-19 18:31:09 -08:00
Lorenze Jay
fe18da5e11 fix 2024-11-19 18:22:05 -08:00
Lorenze Jay
76da972ce9 put a flag 2024-11-19 17:42:44 -08:00
Lorenze Jay
4663997b4c verbose run 2024-11-19 17:31:53 -08:00
Lorenze Jay
b185b9e289 linted 2024-11-19 17:29:06 -08:00
Lorenze Jay
787f2eaa7c mock knowledge query to not spin up db 2024-11-19 17:27:17 -08:00
Lorenze Jay
e7d816fb2a Merge branch 'main' of github.com:crewAIInc/crewAI into knowledge 2024-11-19 15:09:33 -08:00
Lorenze Jay
8373c9b521 linted 2024-11-19 14:50:26 -08:00
Lorenze Jay
ec2fe6ff91 just mocks 2024-11-19 14:48:00 -08:00
Lorenze Jay
58bf2d57f7 added extra cassette 2024-11-19 14:16:22 -08:00
Lorenze Jay
705ee16c1c type check fixes 2024-11-19 12:06:29 -08:00
Lorenze Jay
0c5b6f2a93 mypysrc fixes 2024-11-19 12:02:06 -08:00
Lorenze Jay
914067df37 fixed text_file_knowledge 2024-11-19 11:39:18 -08:00
Lorenze Jay
de742c827d improvements 2024-11-19 11:27:01 -08:00
Lorenze Jay
efa8a378a1 None embedder to use default on pipeline cloning 2024-11-19 10:53:09 -08:00
Lorenze Jay
e882725b8a updated default embedder 2024-11-19 10:43:06 -08:00
Lorenze Jay
cbfdbe3b68 generating cassettes for knowledge test 2024-11-19 10:10:14 -08:00
Lorenze Jay
c8bf242633 fix duplicate 2024-11-19 09:59:23 -08:00
Lorenze Jay
70910dd7b4 fix test 2024-11-19 09:41:33 -08:00
Lorenze Jay
b104404418 cleanup rm unused embedder 2024-11-18 16:03:48 -08:00
Lorenze Jay
d579c5ae12 linted 2024-11-18 13:58:23 -08:00
Lorenze Jay
4831dcb85b Merge branch 'main' of github.com:crewAIInc/crewAI into knowledge 2024-11-18 13:55:32 -08:00
Lorenze Jay
cbfcde73ec consolodation and improvements 2024-11-18 13:52:33 -08:00
Lorenze Jay
b2c06d5b7a properly reset memory+knowledge 2024-11-18 13:45:43 -08:00
Lorenze Jay
352d05370e properly reset memory 2024-11-18 13:37:16 -08:00
Lorenze Jay
b90793874c return this 2024-11-15 15:51:07 -08:00
Lorenze Jay
cdf5233523 Merge branch 'main' of github.com:crewAIInc/crewAI into knowledge 2024-11-15 15:42:32 -08:00
Lorenze Jay
cb03ee60b8 improvements all around Knowledge class 2024-11-15 15:28:07 -08:00
Lorenze Jay
10f445e18a ensure embeddings are persisted 2024-11-14 18:31:07 -08:00
Lorenze Jay
98a708ca15 Merge branch 'main' of github.com:crewAIInc/crewAI into knowledge 2024-11-14 12:22:07 -08:00
Brandon Hancock
7b59c5b049 adding in lorenze feedback 2024-11-07 12:10:09 -05:00
Brandon Hancock
86ede8344c update yaml to include optional deps 2024-11-07 11:41:49 -05:00
Brandon Hancock
59165cbad8 fix linting 2024-11-07 11:37:06 -05:00
Brandon Hancock
4af263ca1e Merge branch 'main' into knowledge 2024-11-07 11:33:08 -05:00
Brandon Hancock
617ee989cd added additional sources 2024-11-06 16:41:17 -05:00
Brandon Hancock
6131dbac4f Improve types and better support for file paths 2024-11-06 15:57:03 -05:00
Brandon Hancock
1a35114c08 Adding core knowledge sources 2024-11-06 12:33:55 -05:00
Brandon Hancock
a8a2f80616 WIP 2024-11-05 12:04:58 -05:00
Brandon Hancock
dc314c1151 Merge branch 'main' into knowledge 2024-11-04 15:02:47 -05:00
João Moura
75322b2de1 initial knowledge 2024-11-04 15:53:19 -03:00
4 changed files with 21 additions and 34 deletions

View File

@@ -100,7 +100,7 @@ You can now start developing your crew by editing the files in the `src/my_proje
#### Example of a simple crew with a sequential process:
Instantiate your crew:
Instatiate your crew:
```shell
crewai create crew latest-ai-development
@@ -399,7 +399,7 @@ Data collected includes:
- Roles of agents in a crew
- Understand high level use cases so we can build better tools, integrations and examples about it
- Tools names available
- Understand out of the publicly available tools, which ones are being used the most so we can improve them
- Understand out of the publically available tools, which ones are being used the most so we can improve them
Users can opt-in to Further Telemetry, sharing the complete telemetry data by setting the `share_crew` attribute to `True` on their Crews. Enabling `share_crew` results in the collection of detailed crew and task execution data, including `goal`, `backstory`, `context`, and `output` of tasks. This enables a deeper insight into usage patterns while respecting the user's choice to share.

View File

@@ -310,8 +310,8 @@ These are examples of how to configure LLMs for your agent.
from crewai import LLM
llm = LLM(
model="llama-3.1-sonar-large-128k-online",
base_url="https://api.perplexity.ai/",
model="perplexity/mistral-7b-instruct",
base_url="https://api.perplexity.ai/v1",
api_key="your-api-key-here"
)
agent = Agent(llm=llm, ...)
@@ -400,4 +400,4 @@ This is particularly useful when working with OpenAI-compatible APIs or when you
- **API Errors**: Check your API key, network connection, and rate limits.
- **Unexpected Outputs**: Refine your prompts and adjust temperature or top_p.
- **Performance Issues**: Consider using a more powerful model or optimizing your queries.
- **Timeout Errors**: Increase the `timeout` parameter or optimize your input.
- **Timeout Errors**: Increase the `timeout` parameter or optimize your input.

View File

@@ -1,6 +1,6 @@
import io
import logging
import sys
import threading
import warnings
from contextlib import contextmanager
from typing import Any, Dict, List, Optional, Union
@@ -13,25 +13,16 @@ from crewai.utilities.exceptions.context_window_exceeding_exception import (
)
class FilteredStream:
def __init__(self, original_stream):
self._original_stream = original_stream
self._lock = threading.Lock()
def write(self, s) -> int:
with self._lock:
if (
"Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new"
in s
or "LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True`"
in s
):
return 0
return self._original_stream.write(s)
def flush(self):
with self._lock:
return self._original_stream.flush()
class FilteredStream(io.StringIO):
def write(self, s):
if (
"Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new"
in s
or "LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True`"
in s
):
return
super().write(s)
LLM_CONTEXT_WINDOW_SIZES = {
@@ -69,8 +60,8 @@ def suppress_warnings():
# Redirect stdout and stderr
old_stdout = sys.stdout
old_stderr = sys.stderr
sys.stdout = FilteredStream(old_stdout)
sys.stderr = FilteredStream(old_stderr)
sys.stdout = FilteredStream()
sys.stderr = FilteredStream()
try:
yield

View File

@@ -20,10 +20,10 @@ from pydantic import (
from pydantic_core import PydanticCustomError
from crewai.agents.agent_builder.base_agent import BaseAgent
from crewai.tools.base_tool import BaseTool
from crewai.tasks.output_format import OutputFormat
from crewai.tasks.task_output import TaskOutput
from crewai.telemetry.telemetry import Telemetry
from crewai.tools.base_tool import BaseTool
from crewai.utilities.config import process_config
from crewai.utilities.converter import Converter, convert_to_model
from crewai.utilities.i18n import I18N
@@ -208,9 +208,7 @@ class Task(BaseModel):
"""Execute the task asynchronously."""
future: Future[TaskOutput] = Future()
threading.Thread(
daemon=True,
target=self._execute_task_async,
args=(agent, context, tools, future),
target=self._execute_task_async, args=(agent, context, tools, future)
).start()
return future
@@ -279,9 +277,7 @@ class Task(BaseModel):
content = (
json_output
if json_output
else pydantic_output.model_dump_json()
if pydantic_output
else result
else pydantic_output.model_dump_json() if pydantic_output else result
)
self._save_file(content)