Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasVitale committed Jan 22, 2024
1 parent c930d63 commit ebd8f43
Show file tree
Hide file tree
Showing 14 changed files with 172 additions and 8 deletions.
16 changes: 16 additions & 0 deletions 01-chat-models/chat-models-ollama/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Chat Models: Ollama

## Running the application

### When using Ollama

```shell
ollama run llama2
```

```shell
./gradlew bootTestRun
```

### When using Docker/Podman

```shell
./gradlew bootTestRun
```

## Calling the application

```shell
http :8080/ai/chat
```
8 changes: 7 additions & 1 deletion 01-chat-models/chat-models-openai/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Chat Models: OpenAI

## Running the application

### When using OpenAI

```shell
export SPRING_AI_OPENAI_API_KEY=<INSERT KEY HERE>
```

```shell
./gradlew bootTestRun
./gradlew bootRun
```

## Calling the application

```shell
http :8080/ai/chat
```
Expand Down
16 changes: 16 additions & 0 deletions 02-prompts/prompts-basics-ollama/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Prompts Basic: Ollama

## Running the application

### When using Ollama

```shell
ollama run llama2
```

```shell
./gradlew bootTestRun
```

### When using Docker/Podman

```shell
./gradlew bootTestRun
```

## Calling the application

```shell
http --raw "What is the capital of Italy?" :8080/ai/chat/simple
```
Expand Down
8 changes: 7 additions & 1 deletion 02-prompts/prompts-basics-openai/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Prompts Basic: OpenAI

## Running the application

### When using OpenAI

```shell
export SPRING_AI_OPENAI_API_KEY=<INSERT KEY HERE>
```

```shell
./gradlew bootTestRun
./gradlew bootRun
```

## Calling the application

```shell
http --raw "What is the capital of Italy?" :8080/ai/chat/simple
```
Expand Down
16 changes: 16 additions & 0 deletions 02-prompts/prompts-messages-ollama/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Prompts Messages: Ollama

## Running the application

### When using Ollama

```shell
ollama run llama2
```

```shell
./gradlew bootTestRun
```

### When using Docker/Podman

```shell
./gradlew bootTestRun
```

## Calling the application

```shell
http --raw "What is the capital of Italy?" :8080/ai/chat/single
```
Expand Down
8 changes: 7 additions & 1 deletion 02-prompts/prompts-messages-openai/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Prompts Messages: OpenAI

## Running the application

### When using OpenAI

```shell
export SPRING_AI_OPENAI_API_KEY=<INSERT KEY HERE>
```

```shell
./gradlew bootTestRun
./gradlew bootRun
```

## Calling the application

```shell
http --raw "What is the capital of Italy?" :8080/ai/chat/single
```
Expand Down
16 changes: 16 additions & 0 deletions 02-prompts/prompts-templates-ollama/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Prompts Templates: Ollama

## Running the application

### When using Ollama

```shell
ollama run llama2
```

```shell
./gradlew bootTestRun
```

### When using Docker/Podman

```shell
./gradlew bootTestRun
```

## Calling the application

```shell
http :8080/ai/chat/user genre="rock" instrument="piano"
```
Expand Down
8 changes: 7 additions & 1 deletion 02-prompts/prompts-templates-openai/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Prompts Templates: OpenAI

## Running the application

### When using OpenAI

```shell
export SPRING_AI_OPENAI_API_KEY=<INSERT KEY HERE>
```

```shell
./gradlew bootTestRun
./gradlew bootRun
```

## Calling the application

```shell
http :8080/ai/chat/user genre="rock" instrument="piano"
```
Expand Down
16 changes: 16 additions & 0 deletions 03-output-parsers/output-parsers-ollama/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Output Parsers: Ollama

## Running the application

### When using Ollama

```shell
ollama run llama2
```

```shell
./gradlew bootTestRun
```

### When using Docker/Podman

```shell
./gradlew bootTestRun
```

## Calling the application

```shell
http :8080/ai/chat/bean genre="rock" instrument="piano"
```
Expand Down
8 changes: 7 additions & 1 deletion 03-output-parsers/output-parsers-openai/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Output Parsers: OpenAI

## Running the application

### When using OpenAI

```shell
export SPRING_AI_OPENAI_API_KEY=<INSERT KEY HERE>
```

```shell
./gradlew bootTestRun
./gradlew bootRun
```

## Calling the application

```shell
http :8080/ai/chat/bean genre="rock" instrument="piano"
```
Expand Down
16 changes: 16 additions & 0 deletions 04-embedding-models/embedding-models-ollama/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Embedding Models: Ollama

## Running the application

### When using Ollama

```shell
ollama run llama2
```

```shell
./gradlew bootTestRun
```

### When using Docker/Podman

```shell
./gradlew bootTestRun
```

## Calling the application

```shell
http :8080/ai/embed
```
8 changes: 7 additions & 1 deletion 04-embedding-models/embedding-models-openai/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Embedding Models: OpenAI

## Running the application

### When using OpenAI

```shell
export SPRING_AI_OPENAI_API_KEY=<INSERT KEY HERE>
```

```shell
./gradlew bootTestRun
./gradlew bootRun
```

## Calling the application

```shell
http :8080/ai/embed
```
18 changes: 17 additions & 1 deletion 05-document-readers/document-readers-json-ollama/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Embedding Models: Ollama
# JSON Document Readers: Ollama

## Running the application

### When using Ollama

```shell
ollama run llama2
```

```shell
./gradlew bootTestRun
```

### When using Docker/Podman

```shell
./gradlew bootTestRun
```

## Calling the application

```shell
http --raw "What bike is good for city commuting?" :8080/ai/doc/chat
```
18 changes: 17 additions & 1 deletion 05-document-readers/document-readers-text-ollama/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Embedding Models: Ollama
# Text Document Readers: Ollama

## Running the application

### When using Ollama

```shell
ollama run llama2
```

```shell
./gradlew bootTestRun
```

### When using Docker/Podman

```shell
./gradlew bootTestRun
```

## Calling the application

```shell
http --raw "What is Iorek's biggest dream?" :8080/ai/doc/chat
```
Expand Down

0 comments on commit ebd8f43

Please sign in to comment.