Skip to content

Commit c3a1987

Browse files
committed
Add demo/README.md; tweak docs/env-vars.md
1 parent eea2a13 commit c3a1987

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

demo/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Demo scripts
2+
3+
The files here are the scripts from
4+
[Getting Started](../docs/getting-started.md).
5+
6+
- [demo.py](demo.py): The ingestion script.
7+
- [query.py](query.py): The query script.
8+
- [transcript.txt](transcript.txt): The test data.
9+
10+
Note that for any of this to work you need to acquire an OpenAI API key
11+
and set some variables; see
12+
[Environment Variables](../docs/env-vars.md).

docs/env-vars.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,24 @@ Typeagent currently supports two families of environment variables:
1111

1212
## OPENAI environment variables
1313

14-
The (public) OpenAI environment variables include:
14+
The (public) OpenAI environment variables include the following:
15+
16+
### Required:
1517

1618
- `OPENAI_API_KEY`: Your secret API key that you get from the
1719
[OpenAI dashboard](https://platform.openai.com/api-keys).
1820
- `OPENAI_MODEL`: An environment variable introduced by
1921
[TypeChat](https://microsoft.github.io/TypeChat/docs/examples/)
2022
indicating the model to use (e.g.`gpt-4o`).
21-
- `OPENAI_BASE_URL`: **Optional:** The URL for an OpenAI-compatible embedding server, e.g. [Infinity](https://github.com/michaelfeil/infinity). With this option `OPENAI_API_KEY` also needs to be set, but can be any value.
22-
- `OPENAI_ENDPOINT`: **Optional:** The URL for an server compatible with the OpenAI Chat Completions API. Make sure the `OPENAI_MODEL` variable matches with the deployed model name, e.g. 'llama:3.2:1b'
23+
24+
### Optional:
25+
26+
- `OPENAI_BASE_URL`: The URL for an OpenAI-compatible embedding server,
27+
e.g. [Infinity](https://github.com/michaelfeil/infinity). With this
28+
option `OPENAI_API_KEY` also needs to be set, but can be any value.
29+
- `OPENAI_ENDPOINT`: The URL for an server compatible with the OpenAI
30+
Chat Completions API. Make sure the `OPENAI_MODEL` variable matches
31+
with the deployed model name, e.g. 'llama:3.2:1b'
2332

2433
## Azure OpenAI environment variables
2534

@@ -35,12 +44,13 @@ environment variables, starting with:
3544
## Conflicts
3645

3746
If you set both `OPENAI_API_KEY` and `AZURE_OPENAI_API_KEY`,
38-
plain `OPENAI` will win.
47+
`OPENAI_API_KEY` will win.
3948

4049
## Other ways to specify environment variables
4150

4251
It is recommended to put your environment variables in a file named
4352
`.env` in the current or parent directory.
4453
To pick up these variables, call `typeagent.aitools.utils.load_dotenv()`
4554
at the start of your program (before calling any typeagent functions).
46-
(For simplicity this is not shown in [Getting Started](getting-started.md).)
55+
(For simplicity this is not shown in
56+
[Getting Started](getting-started.md).)

0 commit comments

Comments
 (0)