Commit graph

841 commits

Author SHA1 Message Date
Dinesh Yeduguru
94cca7a72a add wolfram alpha, bing search 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
f9a98c278a simplify toolgroups registration 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
ba242c04cc remove memory from available tools to agent 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
e3775eb6f6 rename UserDefinedToolDef to ToolDef 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
db0b2a60c1 remove breakpoints 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
17abffb505 fix handle_docs 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
f3304abfba use maybe_register_memory 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
9efe30c9d3 add documents to turn 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
d0e8e1647b add matplotlib_custom_backend.py 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
1faf64b540 linter fixes 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
229999c572 add init.py 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
1ee3143ab1 print the module not found exception in lib cli 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
0bc876c130 minor fixes to agent instance 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
16d1f66f55 address feedback 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
ee542a7373 update client sdk tests 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
a945ab53d0 generate openapi spec 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
ac46bd5eb4 address feedback 2025-01-08 18:25:21 -08:00
Dinesh Yeduguru
8bf3f8ea56 update the client tests to use Agent.with_memory 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
70b2a58bef linter fixes 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
914938d3f2 update open api spec 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
c2dd0cdc78 more test fixes 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
40439509ca test fixes 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
9a3d7fa33c rebase fixes 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
b7ae86ae03 passing tool tests 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
50852cadf3 add tool tests 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
18d9937500 fix agent server tests 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
439f52b067 register toolgroup as part of test 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
f408fd3aca remove attachements, move memory bank to tool metadata 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
97798c8442 add a RAG test to client SDK 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
c76f5f418f move brave and tavily to remote 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
4dd2f4c363 working end to end client sdk tests with custom tools 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
1a66ddc1b5 add support for built in tool type 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
517bc9ebea add back custom tool tests 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
40f35f3a8d add code interpreter 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
0155700ea6 working end to end client sdk tests 2025-01-08 18:25:20 -08:00
Dinesh Yeduguru
2ad67529ef fix agents to run custom tools 2025-01-08 18:24:53 -08:00
Dinesh Yeduguru
9192a9bbb4 add tavily 2025-01-08 18:24:53 -08:00
Dinesh Yeduguru
dcdf9da6ef remove all usages of builtin tools in agents 2025-01-08 18:24:53 -08:00
Dinesh Yeduguru
f90e9c2003 agents to use tools api 2025-01-08 18:24:53 -08:00
Xi Yan
596afc6497
add --version to llama stack CLI & /version endpoint (#732)
# What does this PR do?

- add --version to llama stack CLI 
- add /version endpoint
- run OpenAPI generator for the new endpoint

## Test Plan

**CLI**
<img width="184" alt="image"
src="https://github.com/user-attachments/assets/3acb1d22-453e-4b79-baf6-e98e88d0671c"
/>



**endpoint**
<img width="430" alt="image"
src="https://github.com/user-attachments/assets/79cdd670-493b-40cf-8f9e-28a4ac0988ac"
/>


## Sources

Please link relevant resources if necessary.


## Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Ran pre-commit to handle lint / formatting issues.
- [ ] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [ ] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
2025-01-08 16:30:06 -08:00
Xi Yan
a5e6f10e33
fix links for distro (#733)
# What does this PR do?

- fix links for distro docs


## Test Plan

<img width="653" alt="image"
src="https://github.com/user-attachments/assets/a546a11e-2071-4d72-8232-8f30552b7341"
/>


## Sources

Please link relevant resources if necessary.


## Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Ran pre-commit to handle lint / formatting issues.
- [ ] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [ ] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
2025-01-08 14:47:09 -08:00
Sixian Yi
ca66a1b188
Update CODEOWNERS - add sixianyi0721 as the owner (#731)
# What does this PR do?

Add my own github id to CODEOWNERS file
- [ ] Addresses issue (#issue)


## Test Plan


## Sources

Please link relevant resources if necessary.


## Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Ran pre-commit to handle lint / formatting issues.
- [ ] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [ ] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
2025-01-07 21:11:59 -08:00
Xi Yan
7a4383e4c1
add 3.3 to together inference provider (#729)
# What does this PR do?

- add llama3.3 model for together
- fix fireworks distro_codegen

```
python llama_stack/scripts/distro_codegen.py
```

## Test Plan

<img width="1132" alt="image"
src="https://github.com/user-attachments/assets/bf94b933-9200-4e73-878e-d1a95d450a88"
/>

**Tests**
```
pytest -v -s -k "together" --inference-model="meta-llama/Llama-3.3-70B-Instruct" ./llama_stack/providers/tests/inference/test_text_inference.py
```
<img width="1139" alt="image"
src="https://github.com/user-attachments/assets/407dc98b-8de3-4841-8cb1-75e4b5128544"
/>


## Sources

Please link relevant resources if necessary.


## Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Ran pre-commit to handle lint / formatting issues.
- [ ] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [ ] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
2025-01-06 15:39:41 -08:00
Xi Yan
7a90fc5854
move DataSchemaValidatorMixin into standalone utils (#720)
# What does this PR do?

- there's no value in keeping data schema validation logic in a
DataSchemaValidatorMixin
- move into data schema validation logic into standalone utils

## Test Plan
```
pytest -v -s -m llm_as_judge_scoring_together_inference scoring/test_scoring.py --judge-model meta-llama/Llama-3.2-3B-Instruct
pytest -v -s -m basic_scoring_together_inference scoring/test_scoring.py
pytest -v -s -m braintrust_scoring_together_inference scoring/test_scoring.py

pytest -v -s -m meta_reference_eval_together_inference eval/test_eval.py
pytest -v -s -m meta_reference_eval_together_inference_huggingface_datasetio eval/test_eval.py
```



## Sources

Please link relevant resources if necessary.


## Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Ran pre-commit to handle lint / formatting issues.
- [ ] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [ ] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
2025-01-06 13:25:09 -08:00
Dinesh Yeduguru
0bc5d05243
remove default logger handlers when using libcli with notebook (#718)
# What does this PR do?

Remove the default log handlers for notebook to avoid polluting logs
2025-01-06 13:06:22 -08:00
Botao Chen
e86271aeac
support llama3.1 8B instruct in post training (#698)
## What does this PR do? 
- Change to support llama3.1 8B instruct model other than llama3 8B
model as llama3.1 8B instruct model is a better model to finetune on top
of
- Make the copy files logic in checkpointer safer in case the file be
copied doesn't exist in source path

## test
issue a post training request from client and verify training works as
expect
<img width="1101" alt="Screenshot 2025-01-02 at 12 18 45 PM"
src="https://github.com/user-attachments/assets/47cc4df9-3edc-4afd-b5dd-abe1f039f1ed"
/>

<img width="782" alt="Screenshot 2025-01-02 at 12 18 52 PM"
src="https://github.com/user-attachments/assets/b9435274-ef1d-4570-bd8e-0880c3a4b2e9"
/>
2025-01-03 17:33:05 -08:00
Aidan Do
485476c29a
Fix Groq invalid self.config reference (#719)
# What does this PR do?

Contributes towards: #432

RE: https://github.com/meta-llama/llama-stack/pull/609

I missed this one while refactoring. Fixes:

```python
Traceback (most recent call last):
  File "/Users/aidand/dev/llama-stack/llama_stack/distribution/server/server.py", line 191, in endpoint
    return await maybe_await(value)
  File "/Users/aidand/dev/llama-stack/llama_stack/distribution/server/server.py", line 155, in maybe_await
    return await value
  File "/Users/aidand/dev/llama-stack/llama_stack/providers/utils/telemetry/trace_protocol.py", line 101, in async_wrapper
    result = await method(self, *args, **kwargs)
  File "/Users/aidand/dev/llama-stack/llama_stack/distribution/routers/routers.py", line 156, in chat_completion
    return await provider.chat_completion(**params)
  File "/Users/aidand/dev/llama-stack/llama_stack/providers/utils/telemetry/trace_protocol.py", line 101, in async_wrapper
    result = await method(self, *args, **kwargs)
  File "/Users/aidand/dev/llama-stack/llama_stack/providers/remote/inference/groq/groq.py", line 127, in chat_completion
    response = self._get_client().chat.completions.create(**request)
  File "/Users/aidand/dev/llama-stack/llama_stack/providers/remote/inference/groq/groq.py", line 143, in _get_client
    return Groq(api_key=self.config.api_key)
AttributeError: 'GroqInferenceAdapter' object has no attribute 'config'. Did you mean: '_config'?
```


## Test Plan

Environment:

```shell
export GROQ_API_KEY=<api-key>

# build.yaml and run.yaml files
wget https://raw.githubusercontent.com/aidando73/llama-stack/9165502582cd7cb178bc1dcf89955b45768ab6c1/build.yaml
wget https://raw.githubusercontent.com/aidando73/llama-stack/9165502582cd7cb178bc1dcf89955b45768ab6c1/run.yaml

# Create environment if not already
conda create --prefix ./envs python=3.10
conda activate ./envs

# Build
pip install -e . && llama stack build --config ./build.yaml --image-type conda

# Activate built environment
conda activate llamastack-groq
```
<details>
<summary>Manual</summary>

```bash
llama stack run ./run.yaml --port 5001
```

Via this Jupyter notebook:
9165502582/hello.ipynb
</details>


## Sources

Please link relevant resources if necessary.


## Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [x] Ran pre-commit to handle lint / formatting issues.
- [x] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [x] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
2025-01-03 15:47:10 -08:00
Yuan Tang
04d5b9814f
Fix assert message and call to completion_request_to_prompt in remote:vllm (#709)
The current message is incorrect and model arg is not needed in
`completion_request_to_prompt`.

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2025-01-03 13:44:49 -08:00
Yuan Tang
96d8375663
Fix incorrect entrypoint for broken llama stack run (#706)
This fixes the issue when using `llama stack run` by correctly
specifying entrypoint:

```
LLAMA_STACK_DIR=. llama stack run /home/yutang/.llama/distributions/llamastack-vllm/vllm-run.yaml
Using config file: /home/yutang/.llama/distributions/llamastack-vllm/vllm-run.yaml
+ command -v selinuxenabled
+ selinuxenabled
+ DOCKER_OPTS=' --security-opt label=disable'
+ mounts=
+ '[' -n . ']'
++ readlink -f .
+ mounts=' -v /home/yutang/repos/llama-stack:/app/llama-stack-source'
+ '[' -n '' ']'
+ version_tag=latest
+ '[' -n '' ']'
+ '[' -n . ']'
+ version_tag=dev
+ podman run --security-opt label=disable -it -p 5000:5000 -v /home/yutang/.llama/distributions/llamastack-vllm/vllm-run.yaml:/app/config.yaml -v /home/yutang/repos/llama-stack:/app/llama-stack-source localhost/distribution-vllm:dev python -m llama_stack.distribution.server.server --yaml-config /app/config.yaml --port 5000
usage: server.py
       [-h]
       [--yaml-config YAML_CONFIG]
       [--template TEMPLATE]
       [--port PORT]
       [--disable-ipv6]
       [--env ENV]
server.py: error: unrecognized arguments: python -m llama_stack.distribution.server.server
++ error_handler 88
++ echo 'Error occurred in script at line: 88'
Error occurred in script at line: 88
++ exit 1

```

---------

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
2025-01-03 09:47:10 -08:00
Ashwin Bharambe
21357a6dee Kill autocomplete slop 2025-01-03 09:29:25 -08:00