Skip to content

Commit

Permalink
Merge pull request #18 from rakshitgondwal/docs/FakeAiTut
Browse files Browse the repository at this point in the history
docs: add documentation for NoOpAiProvider
  • Loading branch information
AlexsJones committed Apr 25, 2023
2 parents f1dde6d + a7498ad commit efed550
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Binary file added docs/imgs/noopaiprovider-example.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions docs/tutorials/providers/noOpAiProvider/tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# NoOpAiProvider

NoOpAiProvider is a FakeAI Backend Provider used in k8sgpt. This may be useful in certain situations where you need to test a new feature or simulate the behaviour of an AI based-system without actually invoking it. It can help you with local devlopment, testing and troubleshooting.

## How does NoOpAiProvider works?

The NoOpAiProvider does not acutally perfornm any AI-based operations but simulates them by echoing the input given as a problem.

An example of the output can be seen below:

<img src="../../../imgs/noopaiprovider-example.png" alt="noopaiprovider-example">

## Working with NoOpAiProvider

Follow the steps outlined below to learn how to utilize the NoOpAiProvider:

- Authorize k8sgpt with `noopai` or `noop` as the Backend Provider.
```
k8sgpt auth -b noopai
```
- For the auth token, you can leave it blank as the NoOpAiProvider is configured to work fine with or without any token.

- Use the analyze and explain command to check for errors in your kubernetes cluster and the NoOpAiProvider should return the error as the solution itself.
```
k8sgpt analyze --explain
```

0 comments on commit efed550

Please sign in to comment.