Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
GaspardBT committed Sep 13, 2024
1 parent 7a542c6 commit 7ab5c35
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ s = Mistral(
)

res = s.chat.complete(model="mistral-small-latest", messages=[

{
"content": "Who is the best French painter? Answer in one short sentence.",
"role": "user",
},
])

if res is not None:
Expand All @@ -103,7 +106,10 @@ async def main():
api_key=os.getenv("MISTRAL_API_KEY", ""),
)
res = await s.chat.complete_async(model="mistral-small-latest", messages=[

{
"content": "Who is the best French painter? Answer in one short sentence.",
"role": "user",
},
])
if res is not None:
# handle response
Expand Down Expand Up @@ -198,7 +204,8 @@ async def main():
)
res = await s.agents.complete_async(messages=[
{
"content": "<value>",
"content": "Who is the best French painter? Answer in one short sentence.",
"role": "user",
},
], agent_id="<value>")
if res is not None:
Expand Down Expand Up @@ -378,7 +385,10 @@ s = Mistral(
)

res = s.chat.stream(model="mistral-small-latest", messages=[

{
"content": "Who is the best French painter? Answer in one short sentence.",
"role": "user",
},
])

if res is not None:
Expand Down Expand Up @@ -699,4 +709,4 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u
## Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.

0 comments on commit 7ab5c35

Please sign in to comment.