mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-30 23:51:00 +00:00
port standardization
This commit is contained in:
parent
b556cd91fd
commit
67f727578c
5 changed files with 27 additions and 7 deletions
|
@ -15,6 +15,26 @@
|
||||||
"### Implementation"
|
"### Implementation"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "bfac8382",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"### 0. Configuration\n",
|
||||||
|
"Set up your connection parameters:"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "d80c0926",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"HOST = \"localhost\" # Replace with your host\n",
|
||||||
|
"PORT = 5000 # Replace with your port"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "markdown",
|
"cell_type": "markdown",
|
||||||
"id": "df89cff7",
|
"id": "df89cff7",
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"HOST = \"localhost\" # Replace with your host\n",
|
"HOST = \"localhost\" # Replace with your host\n",
|
||||||
"PORT = 5001 # Replace with your port"
|
"PORT = 5000 # Replace with your port"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"# Example usage\n",
|
"# Example usage\n",
|
||||||
"async def search_example():\n",
|
"async def search_example():\n",
|
||||||
" client = LlamaStackClient(base_url=\"http://localhost:5001\")\n",
|
" client = LlamaStackClient(base_url=\"http://{HOST}:{PORT}\")\n",
|
||||||
" agent = await create_search_agent(client)\n",
|
" agent = await create_search_agent(client)\n",
|
||||||
"\n",
|
"\n",
|
||||||
" # Create a session\n",
|
" # Create a session\n",
|
||||||
|
@ -307,7 +307,7 @@
|
||||||
"\n",
|
"\n",
|
||||||
"# Example usage\n",
|
"# Example usage\n",
|
||||||
"async def weather_example():\n",
|
"async def weather_example():\n",
|
||||||
" client = LlamaStackClient(base_url=\"http://localhost:5001\")\n",
|
" client = LlamaStackClient(base_url=\"http://{HOST}:{PORT}\")\n",
|
||||||
" agent = await create_weather_agent(client)\n",
|
" agent = await create_weather_agent(client)\n",
|
||||||
" session_id = agent.create_session(\"weather-session\")\n",
|
" session_id = agent.create_session(\"weather-session\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"HOST = \"localhost\" # Replace with your host\n",
|
"HOST = \"localhost\" # Replace with your host\n",
|
||||||
"PORT = 5001 # Replace with your port"
|
"PORT = 5000 # Replace with your port"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"# Configure connection parameters\n",
|
"# Configure connection parameters\n",
|
||||||
"HOST = \"localhost\" # Replace with your host if using a remote server\n",
|
"HOST = \"localhost\" # Replace with your host if using a remote server\n",
|
||||||
"PORT = 5001 # Replace with your port if different\n",
|
"PORT = 5000 # Replace with your port if different\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Initialize client\n",
|
"# Initialize client\n",
|
||||||
"client = LlamaStackClient(\n",
|
"client = LlamaStackClient(\n",
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"HOST = \"localhost\" # Replace with your host\n",
|
"HOST = \"localhost\" # Replace with your host\n",
|
||||||
"PORT = 5001 # Replace with your port"
|
"PORT = 5000 # Replace with your port"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"HOST = \"localhost\" # Replace with your host\n",
|
"HOST = \"localhost\" # Replace with your host\n",
|
||||||
"PORT = 5001 # Replace with your port"
|
"PORT = 5000 # Replace with your port"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue