Commit graph

32 commits

Author SHA1 Message Date
Ashwin Bharambe
19770f6330 Remove conflicting annotation 2024-09-03 21:39:56 -07:00
Ashwin Bharambe
297d51b183 Support downloading of URLs for attachments for code interpreter 2024-08-30 12:10:48 -07:00
Ashwin Bharambe
afb18880b5 Delete utils.py; move to agentic system 2024-08-30 11:53:21 -07:00
Ashwin Bharambe
e53e115a5b Add a log just for consistency 2024-08-29 16:19:43 -07:00
Ashwin Bharambe
3cb67f1f58 llama_toolchain/distribution -> llama_toolchain/core 2024-08-28 17:43:08 -07:00
Ashwin Bharambe
197f768636 All the new CLI for api + stack work 2024-08-28 15:55:57 -07:00
Ashwin Bharambe
45987996c4 Several smaller fixes to make adapters work
Also, reorganized the pattern of __init__ inside providers so
configuration can stay lightweight
2024-08-28 15:55:21 -07:00
Hardik Shah
f5620c09ad Rag Updates 2024-08-27 20:09:33 -07:00
Hardik Shah
69d9655ecd Add ToolPromptFormat to ChatFormat.encode_message so that tools are encoded properly 2024-08-26 17:42:24 -07:00
Ashwin Bharambe
3230af4910 combine datatypes.py and endpoints.py into api.py 2024-08-26 12:58:04 -07:00
Ashwin Bharambe
c1078a60e7 remove api.endpoints imports 2024-08-26 12:58:04 -07:00
Ashwin Bharambe
0760849a1f Bug fix, show memory retrieval steps in EventLogger 2024-08-25 15:03:49 -07:00
Ashwin Bharambe
ceef117abc Refactor custom tool execution utilities 2024-08-25 14:34:20 -07:00
Ashwin Bharambe
440d125ea0 small bug fixes for inline attachments 2024-08-24 23:51:27 -07:00
Ashwin Bharambe
58e2feceb0 basic RAG seems to work 2024-08-24 23:36:58 -07:00
Ashwin Bharambe
830252257b fix agentic_system utils 2024-08-24 22:56:43 -07:00
Ashwin Bharambe
8efe614719 re-work tool definitions, fix FastAPI issues, fix tool regressions 2024-08-24 22:35:56 -07:00
Ashwin Bharambe
a08958c000 faiss provider implementation 2024-08-24 14:50:08 -07:00
Ashwin Bharambe
14637bea66 agentic loop has a RAG implementation 2024-08-23 21:01:11 -07:00
Ashwin Bharambe
77d6055d9f flesh out memory banks API 2024-08-23 21:01:08 -07:00
Ashwin Bharambe
31289e3f47 InterleavedTextAttachment -> InterleavedTextMedia, introduce memory tool 2024-08-23 21:00:19 -07:00
Ashwin Bharambe
48c6a32edd <WIP> memory changes
- inlined AgenticSystemInstanceConfig so API feels more ergonomic
- renamed it to AgentConfig, AgentInstance -> Agent
- added a MemoryConfig and `memory` parameter
- added `attachments` to input and `output_attachments` to the response

- some naming changes
2024-08-23 21:00:17 -07:00
Hardik Shah
5655266d58 Moved ToolPromptFormat and jinja templates to llama_models.llama3.api 2024-08-23 14:58:52 -07:00
Hardik Shah
68855ed218 add tools to chat completion request 2024-08-22 15:57:59 -07:00
Ashwin Bharambe
863bb915e1 Remove quantization_config from the APIs for now 2024-08-21 14:17:50 -07:00
Ashwin Bharambe
ab0a24f333
Add API keys to AgenticSystemConfig instead of relying on dotenv (#33) 2024-08-21 12:35:59 -07:00
Ashwin Bharambe
38244c3161 llama_models.llama3_1 -> llama_models.llama3 2024-08-19 10:55:37 -07:00
Hardik Shah
b8fc4d4dee
Updates to prompt for tool calls (#29)
* update system prompts to drop new line

* Add tool prompt formats

* support json format

* JSON in caps

* function_tag system prompt is also added as a user message

* added docstrings for ToolPromptFormat

---------

Co-authored-by: Hardik Shah <hjshah@fb.com>
2024-08-15 13:23:51 -07:00
Dalton Flanagan
b311dcd143 formatting 2024-08-14 17:03:43 -04:00
Dalton Flanagan
b6ccaf1778 formatting 2024-08-14 14:22:25 -04:00
Hardik Shah
37da47ef8e upgrade pydantic to latest 2024-08-12 15:14:21 -07:00
Ashwin Bharambe
e830814399
Introduce Llama stack distributions (#22)
* Add distribution CLI scaffolding

* More progress towards `llama distribution install`

* getting closer to a distro definition, distro install + configure works

* Distribution server now functioning

* read existing configuration, save enums properly

* Remove inference uvicorn server entrypoint and llama inference CLI command

* updated dependency and client model name

* Improved exception handling

* local imports for faster cli

* undo a typo, add a passthrough distribution

* implement full-passthrough in the server

* add safety adapters, configuration handling, server + clients

* cleanup, moving stuff to common, nuke utils

* Add a Path() wrapper at the earliest place

* fixes

* Bring agentic system api to toolchain

Add adapter dependencies and resolve adapters using a topological sort

* refactor to reduce size of `agentic_system`

* move straggler files and fix some important existing bugs

* ApiSurface -> Api

* refactor a method out

* Adapter -> Provider

* Make each inference provider into its own subdirectory

* installation fixes

* Rename Distribution -> DistributionSpec, simplify RemoteProviders

* dict key instead of attr

* update inference config to take model and not model_dir

* Fix passthrough streaming, send headers properly not part of body :facepalm

* update safety to use model sku ids and not model dirs

* Update cli_reference.md

* minor fixes

* add DistributionConfig, fix a bug in model download

* Make install + start scripts do proper configuration automatically

* Update CLI_reference

* Nuke fp8_requirements, fold fbgemm into common requirements

* Update README, add newline between API surface configurations

* Refactor download functionality out of the Command so can be reused

* Add `llama model download` alias for `llama download`

* Show message about checksum file so users can check themselves

* Simpler intro statements

* get ollama working

* Reduce a bunch of dependencies from toolchain

Some improvements to the distribution install script

* Avoid using `conda run` since it buffers everything

* update dependencies and rely on LLAMA_TOOLCHAIN_DIR for dev purposes

* add validation for configuration input

* resort imports

* make optional subclasses default to yes for configuration

* Remove additional_pip_packages; move deps to providers

* for inline make 8b model the default

* Add scripts to MANIFEST

* allow installing from test.pypi.org

* Fix #2 to help with testing packages

* Must install llama-models at that same version first

* fix PIP_ARGS

---------

Co-authored-by: Hardik Shah <hjshah@fb.com>
Co-authored-by: Hardik Shah <hjshah@meta.com>
2024-08-08 13:38:41 -07:00