Skip to content

Commit 558b847

Browse files
committed
LCORE-304: Service configuration
1 parent e889faa commit 558b847

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,65 @@ Installation steps depends on operation system. Please look at instructions for
4343
- [Linux installation](https://lightspeed-core.github.io/lightspeed-stack/installation_linux)
4444
- [macOS installation](https://lightspeed-core.github.io/lightspeed-stack/installation_macos)
4545

46+
47+
4648
# Configuration
4749

50+
The Llama Stack can be run as a standalone server and accessed via its the REST
51+
API. However, instead of direct communication via the REST API (and JSON
52+
format), there is an even better alternative. It is based on the so-called
53+
Llama Stack Client. It is a library available for Python, Swift, Node.js or
54+
Kotlin, which "wraps" the REST API stack in a suitable way, which is easier for
55+
many applications.
56+
57+
## Llama Stack as separate server
58+
59+
If Llama Stack runs as a separate server, the Lightspeed service needs to be configured to be able to access it. For example, if server runs on localhost:8321, the service configuration should look like:
60+
61+
```yaml
62+
name: foo bar baz
63+
service:
64+
host: localhost
65+
port: 8080
66+
auth_enabled: false
67+
workers: 1
68+
color_log: true
69+
access_log: true
70+
llama_stack:
71+
use_as_library_client: false
72+
url: http://localhost:8321
73+
user_data_collection:
74+
feedback_disabled: false
75+
feedback_storage: "/tmp/data/feedback"
76+
transcripts_disabled: false
77+
transcripts_storage: "/tmp/data/transcripts"
78+
```
79+
80+
## Llama Stack as client library
81+
82+
There are situations in which it is not advisable to run two processors (one with Llama Stack, the other with a service). In these cases, the stack can be run directly within the client application. For such situations, the configuration file could look like:
83+
84+
```yaml
85+
name: foo bar baz
86+
service:
87+
host: localhost
88+
port: 8080
89+
auth_enabled: false
90+
workers: 1
91+
color_log: true
92+
access_log: true
93+
llama_stack:
94+
use_as_library_client: true
95+
library_client_config_path: <path-to-llama-stack-run.yaml-file>
96+
user_data_collection:
97+
feedback_disabled: false
98+
feedback_storage: "/tmp/data/feedback"
99+
transcripts_disabled: false
100+
transcripts_storage: "/tmp/data/transcripts"
101+
```
102+
103+
104+
48105
# Usage
49106
50107
```

0 commit comments

Comments
 (0)