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

Dev tasks #447

Merged
merged 133 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 114 commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
10d3600
feat(agents-api): Implement doc* models (#442)
creatorrr Aug 4, 2024
919b9e9
feat(agents-api): Reimplement agents routes
Aug 4, 2024
65a0b99
wip(agents-api): Session routes
Aug 4, 2024
50c898e
Reimplement tests for queries and operations (#443)
creatorrr Aug 5, 2024
33e86a2
feat(agents-api): Hybrid docs search (#444)
creatorrr Aug 5, 2024
41e5df8
feat(agents-api): Add temporal workflow lookup relation and queries (…
creatorrr Aug 5, 2024
1dc4ed3
feat: Resume workflow execution
whiterabbit1983 Aug 5, 2024
051a172
Merge branch 'dev-tasks-disable-routes' into f/new-routes
Aug 5, 2024
160c76f
feat(agents-api): Add user routes
Aug 5, 2024
c9c9a06
feat(agents-api): Add docs routes
Aug 5, 2024
3b6e81d
feat(agents-api): Add doc search routes
Aug 5, 2024
2cf9af5
Merge pull request #445 from julep-ai/f/new-routes
whiterabbit1983 Aug 6, 2024
6483fbe
fix: Fix update execution route
whiterabbit1983 Aug 6, 2024
781c7ab
feat(agents-api): Add litellm proxy to docker compose
Aug 8, 2024
31a485e
Merge pull request #448 from julep-ai/f/litellm
creatorrr Aug 9, 2024
10fee9d
refactor(agents-api): Move tests to root dir
Aug 9, 2024
d37965f
Update test files to reflect new location of model functions
creatorrr Aug 9, 2024
7bfab9a
creatorrr Aug 9, 2024
d5b08b9
Remove `DeleteDocRequest` import and related tests from `test_docs_qu…
creatorrr Aug 9, 2024
ad27ec0
fix(agents-api): Fixed tests
Aug 9, 2024
db58349
Merge pull request #449 from julep-ai/x/agents-api-tests
creatorrr Aug 9, 2024
440b5f7
Add tests for various queries in `agents-api`
creatorrr Aug 9, 2024
d305468
fix(agents-api): Fixed tests
Aug 9, 2024
c9b28e9
Merge pull request #450 from julep-ai/creatorrr/f-add-missing-tests
creatorrr Aug 9, 2024
afe3be8
feat(agents-api): Add route tests
Aug 9, 2024
dd52045
creatorrr Aug 9, 2024
d0b3e6b
fix(agents-api): Fixed tests
Aug 9, 2024
0ee50d4
Merge pull request #451 from julep-ai/f/route-tests
whiterabbit1983 Aug 10, 2024
4e6656c
fix: Apply fixes
whiterabbit1983 Aug 10, 2024
128f074
Add tests for docs routes
creatorrr Aug 10, 2024
e0c3140
feat(agents-api): Add docs tests
Aug 10, 2024
28afb53
feat: Implement error step
whiterabbit1983 Aug 10, 2024
f0111d8
Merge pull request #452 from julep-ai/creatorrr/add-docs-routes-tests
whiterabbit1983 Aug 10, 2024
2d379b8
feat(agents-api): Fix prepare_chat_context
Aug 10, 2024
e4c7827
feat(agents-api): Make session.render_templates true by default
Aug 10, 2024
8428659
wip(agents-api): Implementing chat
Aug 11, 2024
a107221
feat(agents-api,typespec): Re-org some of the endpoint models for pro…
Aug 11, 2024
b813353
feat(agents-api): Add litellm client
Aug 11, 2024
7043cdd
feat(model-serving): Remove model-serving container
Aug 11, 2024
068cef0
feat: Remove support for presets
Aug 11, 2024
aefe3ab
feat(agents-api): Add settings to developers relation
Aug 11, 2024
892226d
feat(agents-api): Preliminary implementation of session.chat
Aug 11, 2024
a3377dd
Merge pull request #453 from julep-ai/f/session-chat
whiterabbit1983 Aug 12, 2024
7ab4075
fix(agents-api): Minor fix to fastapi dependency
Aug 12, 2024
5f91ac3
feat(agents-api): Make chat route tests pass
Aug 12, 2024
dcc54c4
fix(agents-api): Fixed chat route and tests
Aug 13, 2024
6279937
feat(agents-api): Add /embed route
Aug 13, 2024
95dfa18
fix: Fix generation
whiterabbit1983 Aug 12, 2024
67db1fd
Merge pull request #454 from julep-ai/f/chat-tests
whiterabbit1983 Aug 13, 2024
9f8e6d6
feat(agents-api): Bump python version to 3.11
Aug 13, 2024
0f6e061
chore: Refactor tasks routes and add unit tests
whiterabbit1983 Aug 13, 2024
83a02cf
feat: Fix type checks
Aug 13, 2024
853da78
fix(agents-api): Fix chat endpoint behavior
Aug 13, 2024
afc3546
refactor(agents-api): Remove unnecessary stuff
Aug 13, 2024
be18ec6
feat(agents-api): Add fixtures for testing workflows
Aug 14, 2024
3a38e70
feat(agents-api): Add some workflow tests
Aug 14, 2024
9e4b707
Merge pull request #456 from julep-ai/f/workflow-tests
whiterabbit1983 Aug 14, 2024
82c8af2
fix(agents-api): Minor fix to tests
Aug 14, 2024
b1fc2a4
fix(agents-api): Fix tests and fixtures
Aug 14, 2024
3ab7758
refactor(agents-api): Move gather_messages to its own model
Aug 14, 2024
313a312
feat(agents-api): Add token count support using litellm
Aug 14, 2024
152c29a
feat(agents-api): Minor modifier to models
Aug 14, 2024
14544b9
Merge branch 'dev-tasks-disable-routes' into f/workflow-tests
Aug 14, 2024
e97b6fb
fix(agents-api): Minor fixes
Aug 15, 2024
9dca03e
Merge pull request #457 from julep-ai/f/workflow-tests
creatorrr Aug 15, 2024
adb2d9f
fix: Fix tasks routes and tests
whiterabbit1983 Aug 15, 2024
93a5fda
fix: Split create execution query
whiterabbit1983 Aug 16, 2024
cceae91
fix: Apply various small fixes
whiterabbit1983 Aug 16, 2024
0610f86
fix(agents-api): Minor fixes
Aug 15, 2024
939569b
wip
Aug 16, 2024
abb6e9a
wip
Aug 16, 2024
ebd3640
wip
Aug 16, 2024
00edef7
wip
Aug 16, 2024
a4e49a0
wip
Aug 16, 2024
be7471b
wip
Aug 16, 2024
d13a46f
Merge pull request #458 from julep-ai/f/task-tests
whiterabbit1983 Aug 16, 2024
cc43f38
fix(agents-api): Fix update_execution model
Aug 16, 2024
a22a65e
feat(agents-api): Add demo workflow for testing
Aug 16, 2024
2d3effe
fix(agents-api): Use a contextmanager instead of fixture for creating…
Aug 16, 2024
655d222
wip
Aug 16, 2024
0194c73
feat(agents-api): ALL TESTS PASS!! :D
Aug 17, 2024
729a0aa
Merge pull request #459 from julep-ai/f/task-tests
whiterabbit1983 Aug 17, 2024
ae112cb
feat: Add test for evaluate step
Aug 17, 2024
2fbd877
feat(agents-api): Add more tests for the task execution
Aug 17, 2024
010660b
refactor(agents-api): Add more types
Aug 17, 2024
8e0c9c0
feat(agents-api): Add lots of new steps
Aug 17, 2024
ae03634
feat(agents-api): Implement sleep step
Aug 17, 2024
b600eaf
feat(agents-api): Add return step
Aug 17, 2024
bbc7117
feat(agents-api): Add log step
Aug 17, 2024
d954077
feat(agents-api): Make evaluate_step, log_step, etc local activities
Aug 18, 2024
6cd98ae
feat(agents-api): Add wait_for_input step
Aug 18, 2024
2c6dada
refactor(agents-api): Minor refactors
Aug 18, 2024
9fdafaf
feat(agents-api): Add if-else step
Aug 19, 2024
aead2ab
wip(agents-api): Add stub for switch step
Aug 19, 2024
72da581
Merge pull request #460 from julep-ai/f/workflow-tests
whiterabbit1983 Aug 19, 2024
9c01928
fix(agents-api): Fix typespec for foreach step and regenerate
Aug 19, 2024
633c4f7
Merge pull request #461 from julep-ai/x/fix-typespec-foreach
whiterabbit1983 Aug 19, 2024
f8111ea
fix(agents-api): Fix the typespec bug and regenerate
Aug 20, 2024
5b97ce7
refactor(agents-api): Minor refactors
Aug 20, 2024
bd83b5c
fix(agents-api): Temporal local activities are too unreliable
Aug 20, 2024
b2fb5a9
fix(agents-api): Fix the codec, which was causing a lot of bugs
Aug 20, 2024
d92b054
refactor(agents-api): Minor refactors
Aug 20, 2024
9962356
feat(agents-api): Add YAML support
Aug 20, 2024
95a8889
Merge pull request #462 from julep-ai/x/fix-typespec-foreach
whiterabbit1983 Aug 20, 2024
b355113
Merge pull request #463 from julep-ai/x/fix-codec
whiterabbit1983 Aug 20, 2024
8263aea
Merge pull request #464 from julep-ai/f/yaml-task-create
whiterabbit1983 Aug 20, 2024
a63fb4a
feat: Add "switch" and "for each" activities
whiterabbit1983 Aug 20, 2024
744e2ef
refactor(agents-api): Minor refactors to typespec types
Aug 20, 2024
d2ab540
test: Test for each step, add small fixes
whiterabbit1983 Aug 20, 2024
1866a79
feat: Add map reduce step (WIP)
whiterabbit1983 Aug 20, 2024
8ab6dea
refactor(agents-api): MAJOR refactors to MAP-REDUCE and some typespec…
Aug 21, 2024
1c071ec
Merge pull request #465 from julep-ai/r/typespec-refactors
whiterabbit1983 Aug 21, 2024
3482bd4
feat: Add map reduce step
whiterabbit1983 Aug 21, 2024
30814b5
feat(agents-api): Switch step test passes!
Aug 21, 2024
a84cfcd
fix: Update map reduce logic
whiterabbit1983 Aug 22, 2024
14c8258
fix: Fix map reduce test
whiterabbit1983 Aug 22, 2024
81af536
chore: Enable prompt step
whiterabbit1983 Aug 22, 2024
c3d9ce7
fix: Fix prompt step test
whiterabbit1983 Aug 22, 2024
2a12e3c
fix(agents-api): Fix map reduce step and activity
Aug 23, 2024
93a32bf
Merge pull request #466 from julep-ai/x/map-reduce-step
whiterabbit1983 Aug 23, 2024
4c936b0
test: Add task yaml test
whiterabbit1983 Aug 23, 2024
e3bde88
chore: Rename accumulator value
whiterabbit1983 Aug 23, 2024
0a4708c
fix: Fix task file formatting
whiterabbit1983 Aug 23, 2024
effc4dd
feat(agents-api): Successfully create the sample task find_selector.yaml
Aug 23, 2024
47358c1
fix(agents-api): Fix agent/create-or-update route and YAML handling
Aug 23, 2024
80dd3f1
fix(agents-api): Fix tests and routes for sample
Aug 23, 2024
936ffbe
Merge branch 'x/map-reduce-step' into dev-tasks-disable-routes
Aug 23, 2024
3183267
feat(agents-api): Make the sample work (more or less)
Aug 24, 2024
8ec70ae
Add files via upload
creatorrr Aug 24, 2024
af121a2
fix: Fix templates rendering for different kind of messages
whiterabbit1983 Aug 24, 2024
abb36ba
fix(agents-api): Make the sample work
Aug 26, 2024
3457252
Merge pull request #467 from julep-ai/x/sample-test-fix
whiterabbit1983 Aug 26, 2024
9feb981
fix: Fix execute yaml task test
whiterabbit1983 Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 23 additions & 12 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,18 @@ COZO_HOST=http://memory-store:9070
COZO_PORT=9070
COZO_ROCKSDB_DIR=cozo.db
DTYPE=float16
EMBEDDING_SERVICE_URL=http://text-embeddings-inference/embed
EMBEDDING_SERVICE_BASE=http://text-embeddings-inference
EMBEDDING_SERVICE_URL=${EMBEDDING_SERVICE_BASE}/embed
GATEWAY_PORT=80
GPU_MEMORY_UTILIZATION=0.90

HF_TOKEN=""
HUGGING_FACE_HUB_TOKEN=""
HF_TOKEN=
HUGGING_FACE_HUB_TOKEN=
JWT_SHARED_KEY=

MAX_MODEL_LEN=8192
MAX_NUM_SEQS=1
MNT_DIR=/data
MODEL_API_KEY=myauthkey
MODEL_API_KEY_HEADER_NAME=Authorization
MODEL_API_URL=http://model-serving:8000
MODEL_INFERENCE_URL=http://model-serving:8000/v1
MODEL_ID=BAAI/bge-m3

# MODEL_NAME="OpenPipe/Hermes-2-Theta-Llama-3-8B-32k"
MODEL_NAME="julep-ai/Hermes-2-Theta-Llama-3-8B"

SKIP_CHECK_DEVELOPER_HEADERS=true
SUMMARIZATION_TOKENS_THRESHOLD=2048
Expand All @@ -40,4 +33,22 @@ WORKER_URL=temporal:7233

AGENTS_API_DEBUG=false
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
ANTHROPIC_API_KEY=
GROQ_API_KEY=
CLOUDFLARE_API_KEY=
CLOUDFLARE_ACCOUNT_ID=
NVIDIA_NIM_API_KEY=
GITHUB_API_KEY=
VOYAGE_API_KEY=
GOOGLE_APPLICATION_CREDENTIALS=

LITELLM_URL=http://litellm:4000
POSTGRES_DB=litellm
POSTGRES_USER=llmproxy
POSTGRES_PASSWORD=
LITELLM_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@litellm-db:5432/${POSTGRES_DB}
LITELLM_MASTER_KEY=
LITELLM_REDIS_HOST=litellm-redis
LITELLM_REDIS_PORT=6379
LITELLM_REDIS_PASSWORD=
REDIS_ARGS="--requirepass ${LITELLM_REDIS_PASSWORD}"
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
directory: [agents-api, model-serving, sdks/python]
directory: [agents-api, sdks/python]

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/push-to-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ jobs:
service-directory:
- gateway
- memory-store
# - model-serving

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion agents-api/.tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python 3.10.13
python 3.11.9
11 changes: 1 addition & 10 deletions agents-api/agents_api/activities/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
"""
The `activities` module within the agents-api package is designed to facilitate various activities related to agent interactions. This includes handling memory management, generating insights from dialogues, summarizing relationships, and more. Each file within the module offers specific functionality:

- `co_density.py`: Conducts cognitive density analysis to generate concise, entity-dense summaries.
- `demo.py`: Provides a simple demonstration of defining an activity with Temporal.
- `dialog_insights.py`: Extracts insights from dialogues, identifying details that participants might find interesting.
- `mem_mgmt.py`: Manages memory by updating and incorporating new personality information from dialogues.
- `mem_rating.py`: Rates memories based on their poignancy and importance.
- `relationship_summary.py`: Summarizes the relationship between individuals based on provided statements.
- `salient_questions.py`: Identifies salient questions from a set of statements.
- `summarization.py`: Summarizes dialogues and updates memory based on the conversation context.
The `activities` module within the agents-api package is designed to facilitate various activities related to agent interactions. This includes handling memory management, generating insights from dialogues, summarizing relationships, and more.

This module plays a crucial role in enhancing the capabilities of agents by providing them with the tools to understand and process information more effectively.
"""
114 changes: 0 additions & 114 deletions agents-api/agents_api/activities/co_density.py

This file was deleted.

21 changes: 15 additions & 6 deletions agents-api/agents_api/activities/demo.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
#!/usr/bin/env python3
from typing import Callable

from temporalio import activity

from ..env import testing

@activity.defn
async def say_hello(name: str) -> str:
message = f"Hello, {name}!"
print(message)
return message

async def demo_activity(a: int, b: int) -> int:
# Should throw an error if testing is not enabled
raise Exception("This should not be called in production")


async def mock_demo_activity(a: int, b: int) -> int:
return a + b


demo_activity: Callable[[int, int], int] = activity.defn(name="demo_activity")(
demo_activity if not testing else mock_demo_activity
)
117 changes: 0 additions & 117 deletions agents-api/agents_api/activities/dialog_insights.py

This file was deleted.

Loading
Loading