docs: linting, syntax, formatting & spelling fixes for all files (#761)

* Update README.md

* fix: 'ollama run' should be 'ollama pull'

* fix: linting, syntax, spelling corrections for all docs

* fix: markdown linting rules and missed fixes

* fix: readded space to block

* fix: changed sh blocks to text

* docs: added exception for bare urls in markdown

* docs: added exception for in-line html (MD033/no-inline-html)

* docs: made python indentation level consistent (4 space tabs) even though I prefer 2.

---------

Co-authored-by: Charles Packer <packercharles@gmail.com>
This commit is contained in:
Owen Easter
2024-01-02 18:31:50 +00:00
committed by GitHub
parent 7ea94cd058
commit 796c33f1a6
31 changed files with 344 additions and 182 deletions

View File

@@ -1,27 +1,28 @@
---
title: Python client
excerpt: Developing using the MemGPT Python client
category: 6580dab16cade8003f996d17
category: 6580dab16cade8003f996d17
---
The fastest way to integrate MemGPT with your own Python projects is through the `MemGPT` client class:
```python
from memgpt import MemGPT
# Create a MemGPT client object (sets up the persistent state)
client = MemGPT(
quickstart="openai",
config={
"openai_api_key": "YOUR_API_KEY"
}
quickstart="openai",
config={
"openai_api_key": "YOUR_API_KEY"
}
)
# You can set many more parameters, this is just a basic example
agent_id = client.create_agent(
agent_config={
"persona": "sam_pov",
"user": "cs_phd",
}
agent_config={
"persona": "sam_pov",
"user": "cs_phd",
}
)
# Now that we have an agent_name identifier, we can send it a message!
@@ -44,11 +45,11 @@ client = MemGPT(
# user message. This may have performance implications, so you
# can otherwise choose when to save explicitly using client.save().
auto_save=True,
# Quickstart will automatically configure MemGPT (without having to run `memgpt configure`
# If you choose 'openai' then you must set the api key (env or in config)
quickstart=QuickstartChoice.memgpt_hosted,
# Allows you to override default config generated by quickstart or `memgpt configure`
config={}
)