Skip to content

Commit

Permalink
docs: fix mistral link + add migration info
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbanse committed Sep 22, 2024
1 parent dc863f4 commit 0771090
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/tutorial/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| Google Gemini | `google-generativeai` | [Guide for Google Gemini :octicons-link-16:](providers/google.md) |
| Hugging Face Hub | `huggingface-hub` | [Guide for Hugging Face Hub :octicons-link-16:](providers/huggingface_hub.md) |
| LiteLLM | `litellm` | [Guide for LiteLLM :octicons-link-16:](providers/litellm.md) |
| Mistral AI | `mistralai` | [Guide for Mistral AI v1 :octicons-link-16:](providers/mistralai) |
| Mistral AI | `mistralai` | [Guide for Mistral AI :octicons-link-16:](providers/mistralai.md) |
| OpenAI | `openai` | [Guide for OpenAI :octicons-link-16:](providers/openai.md) |
| Azure OpenAI | `openai` | [Guide for Azure OpenAI :octicons-link-16:](providers/openai.md#compatibility-with-azure-openai) |

Expand Down
7 changes: 5 additions & 2 deletions docs/tutorial/providers/mistralai.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ Integrating EcoLogits with your applications does not alter the standard outputs

for chunk in stream:
# Get cumulative estimated environmental impacts of the inference
print(chunk.data.impacts)
print(chunk.data.impacts) # (2)!
```

1. Use `client.chat_stream` for Mistral AI v0.
2. Use `chunk.impacts` for Mistral AI v0.

=== "Async"

Expand All @@ -135,10 +136,12 @@ Integrating EcoLogits with your applications does not alter the standard outputs
async for chunk in stream:
# Get cumulative estimated environmental impacts of the inference
if hasattr(chunk, "impacts"):
print(chunk.data.impacts)
print(chunk.data.impacts) # (2)!


asyncio.run(main())
```

1. Use `client.chat_stream` for Mistral AI v0.
2. Use `chunk.impacts` for Mistral AI v0.

0 comments on commit 0771090

Please sign in to comment.