-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
852 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Weekly Notebook Test (YC FC) | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 4' # Запуск каждое четверг в 00:00 UTC | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test-notebook: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Create .env file | ||
run: | | ||
echo "FOLDER_ID=${{ secrets.FOLDER_ID }}" >> .env | ||
echo "YANDEX_API_KEY=${{ secrets.YANDEX_API_KEY }}" >> .env | ||
echo "PROXY_URL=${{ secrets.PROXY_URL }}" >> .env | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r yc/function_calling_api/requirements.txt | ||
pip install jupyter nbconvert | ||
- name: Execute notebook | ||
run: | | ||
jupyter nbconvert --to notebook --execute yc/function_calling_api/lesson.ipynb --output executed_notebook.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.env | ||
__pycache__ | ||
.venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# В этом репозитории собраны руководства по AIOps, LLMSysDesign и LLM-проектам | ||
для сайта https://ai-cookbook.ru | ||
|
||
Список руководств: | ||
- [YC function calling по API](yc/function_calling_api/lesson.ipynb) | ||
- [YC function calling через OpenAI SDK](yc/function_calling_openai/lesson.ipynb) | ||
- [YC function calling через YC ML SDK](yc/function_calling_ml_sdk/lesson.ipynb) | ||
|
||
Для работы с любым гайдом (пример для yc/function_calling_api): | ||
|
||
# Start of Selection | ||
1. `cd yc/function_calling_api` | ||
2. `cp .env .env.copy`, заполнить своими данными | ||
3. `pip install -r requirements.txt` |
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FOLDER_ID= | ||
YANDEX_API_KEY= | ||
|
||
# Search API | ||
#SERP_SITE=https://yandex.cloud/ru/docs | ||
SERP_SITE= | ||
SERP_HOST= | ||
SERP_URL= |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
yc/function_calling_api/cloud_instruments/serverless_func.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import httpx | ||
|
||
def send_post_request(name): | ||
url = f"https://functions.yandexcloud.net/d4ekuoccv9lmm79dh5rr?name={name}" | ||
with httpx.Client() as client: | ||
response = client.get(url) | ||
# print(f"Status Code: {response.status_code}") | ||
# print(f"Response Content: {response.text}") | ||
return response.text | ||
|
||
if __name__ == "__main__": | ||
name = "Master" | ||
send_post_request(name) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.