mirror of
https://github.com/katanemo/plano.git
synced 2026-05-08 23:32:43 +02:00
parent
dab7a44053
commit
8c6ad87c1c
4 changed files with 59 additions and 3510 deletions
76
README.md
76
README.md
|
|
@ -1,5 +1,7 @@
|
||||||
|
[](https://github.com/katanemo/arch/actions/workflows/static.yml)
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<img src="docs/source/_static/img/arch-logo.png" alt="Arch Gateway Logo" title="Arch Gateway Logo">
|
<img src="docs/source/_static/img/arch-logo.png" alt="Arch Gateway Logo" title="Arch Gateway Logo" height="350">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## Build fast, robust, and personalized AI agents.
|
## Build fast, robust, and personalized AI agents.
|
||||||
|
|
@ -68,28 +70,43 @@ listener:
|
||||||
llm_providers:
|
llm_providers:
|
||||||
- name: OpenAI
|
- name: OpenAI
|
||||||
provider: openai
|
provider: openai
|
||||||
access_key: OPENAI_API_KEY
|
access_key: $OPENAI_API_KEY
|
||||||
model: gpt-4o
|
model: gpt-3.5-turbo
|
||||||
default: true
|
default: true
|
||||||
|
|
||||||
# default system prompt used by all prompt targets
|
# default system prompt used by all prompt targets
|
||||||
system_prompt: |
|
system_prompt: |
|
||||||
You are a network assistant that just offers facts; not advice on manufacturers or purchasing decisions.
|
You are a network assistant that helps operators with a better understanding of network traffic flow and perform actions on networking operations. No advice on manufacturers or purchasing decisions.
|
||||||
|
|
||||||
prompt_targets:
|
prompt_targets:
|
||||||
- name: reboot_devices
|
- name: device_summary
|
||||||
description: Reboot specific devices or device groups
|
description: Retrieve network statistics for specific devices within a time range
|
||||||
|
endpoint:
|
||||||
path: /agent/device_reboot
|
name: app_server
|
||||||
parameters:
|
path: /agent/device_summary
|
||||||
- name: device_ids
|
parameters:
|
||||||
type: list
|
- name: device_ids
|
||||||
description: A list of device identifiers (IDs) to reboot.
|
type: list
|
||||||
required: false
|
description: A list of device identifiers (IDs) to retrieve statistics for.
|
||||||
- name: device_group
|
required: true # device_ids are required to get device statistics
|
||||||
type: str
|
- name: days
|
||||||
description: The name of the device group to reboot
|
type: int
|
||||||
required: false
|
description: The number of days for which to gather device statistics.
|
||||||
|
default: "7"
|
||||||
|
- name: reboot_devices
|
||||||
|
description: Reboot a list of devices
|
||||||
|
endpoint:
|
||||||
|
name: app_server
|
||||||
|
path: /agent/device_reboot
|
||||||
|
parameters:
|
||||||
|
- name: device_ids
|
||||||
|
type: list
|
||||||
|
description: A list of device identifiers (IDs).
|
||||||
|
required: true
|
||||||
|
- name: days
|
||||||
|
type: int
|
||||||
|
description: A list of device identifiers (IDs)
|
||||||
|
default: "7"
|
||||||
|
|
||||||
# Arch creates a round-robin load balancing between different endpoints, managed via the cluster subsystem.
|
# Arch creates a round-robin load balancing between different endpoints, managed via the cluster subsystem.
|
||||||
endpoints:
|
endpoints:
|
||||||
|
|
@ -97,7 +114,7 @@ endpoints:
|
||||||
# value could be ip address or a hostname with port
|
# value could be ip address or a hostname with port
|
||||||
# this could also be a list of endpoints for load balancing
|
# this could also be a list of endpoints for load balancing
|
||||||
# for example endpoint: [ ip1:port, ip2:port ]
|
# for example endpoint: [ ip1:port, ip2:port ]
|
||||||
endpoint: 127.0.0.1:80
|
endpoint: host.docker.internal:18083
|
||||||
# max time to wait for a connection to be established
|
# max time to wait for a connection to be established
|
||||||
connect_timeout: 0.005s
|
connect_timeout: 0.005s
|
||||||
```
|
```
|
||||||
|
|
@ -106,20 +123,23 @@ endpoints:
|
||||||
Make outbound calls via Arch
|
Make outbound calls via Arch
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import openai
|
from openai import OpenAI
|
||||||
|
|
||||||
# Set the OpenAI API base URL to the Arch gateway endpoint
|
|
||||||
openai.api_base = "http://127.0.0.1:12000/v1"
|
|
||||||
# No need to set a specific openai.api_key since it's configured in Arch's gateway
|
|
||||||
openai.api_key = "null"
|
|
||||||
|
|
||||||
# Use the OpenAI client as usual
|
# Use the OpenAI client as usual
|
||||||
response = openai.Completion.create(
|
client = OpenAI(
|
||||||
model="text-davinci-003",
|
# No need to set a specific openai.api_key since it's configured in Arch's gateway
|
||||||
prompt="What is the capital of France?"
|
api_key = '--',
|
||||||
|
# Set the OpenAI API base URL to the Arch gateway endpoint
|
||||||
|
base_url = "http://127.0.0.1:12000/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
print("OpenAI Response:", response.choices[0].text.strip())
|
response = client.chat.completions.create(
|
||||||
|
# we select model from arch_config file
|
||||||
|
model="--",
|
||||||
|
messages=[{"role": "user", "content": "What is the capital of France?"}],
|
||||||
|
)
|
||||||
|
|
||||||
|
print("OpenAI Response:", response.choices[0].message.content)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
3487
arch/tools/poetry.lock
generated
3487
arch/tools/poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "archgw"
|
name = "archgw"
|
||||||
version = "0.0.5"
|
version = "0.1.0"
|
||||||
description = "Python-based CLI tool to manage Arch Gateway."
|
description = "Python-based CLI tool to manage Arch Gateway."
|
||||||
authors = ["Katanemo Labs, Inc."]
|
authors = ["Katanemo Labs, Inc."]
|
||||||
packages = [
|
packages = [
|
||||||
|
|
@ -22,7 +22,7 @@ click = "^8.1.7"
|
||||||
jinja2 = "^3.1.4"
|
jinja2 = "^3.1.4"
|
||||||
jsonschema = "^4.23.0"
|
jsonschema = "^4.23.0"
|
||||||
setuptools = "75.3.0"
|
setuptools = "75.3.0"
|
||||||
archgw_modelserver = "0.0.5"
|
archgw_modelserver = "0.1.1"
|
||||||
huggingface_hub = "^0.26.0"
|
huggingface_hub = "^0.26.0"
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "archgw_modelserver"
|
name = "archgw_modelserver"
|
||||||
version = "0.0.5"
|
version = "0.1.1"
|
||||||
description = "A model server for serving models"
|
description = "A model server for serving models"
|
||||||
authors = ["Katanemo Labs, Inc <archgw@katanemo.com>"]
|
authors = ["Katanemo Labs, Inc <archgw@katanemo.com>"]
|
||||||
license = "Apache 2.0"
|
license = "Apache 2.0"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue