Support for Openrouter (#1628)

This commit is contained in:
Dev Khant
2024-08-03 22:51:03 +05:30
committed by GitHub
parent 5837991e5c
commit 04b4807145
4 changed files with 68 additions and 7 deletions

View File

@@ -42,6 +42,17 @@ config = {
}
}
# Use Openrouter by passing it's api key
# os.environ["OPENROUTER_API_KEY"] = "your-api-key"
# config = {
# "llm": {
# "provider": "openai",
# "config": {
# "model": "meta-llama/llama-3.1-70b-instruct",
# }
# }
# }
m = Memory.from_config(config)
m.add("Likes to play cricket on weekends", user_id="alice", metadata={"category": "hobbies"})
```