Skip to content

Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.

[Feat]: Fix Cohere and Anthropic examples in Docs (#141)

Patcher99fcf1a864dd8a
diff --git a/README.md b/README.md
index 6f77aadf..c6862a70 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,8 @@
Doku is an **open-source LLMOps tool** engineered to enables developers with comprehensive capabilities to monitor, analyze, and optimize LLM applications. It provides valuable real-time data on **LLM usage, performance, and costs**. Through seamless integrations with leading LLM platforms, including OpenAI, Cohere, and Anthropic, Doku acts as a central command center for all your LLM needs. It effectively guides your efforts, ensuring that your LLM applications not only operate at peak efficiency but also scale successfully.
+https://github.com/dokulabs/doku/assets/150420377/80281574-40c0-404a-a0bc-bdc5c631c9d8
+
## Why use Doku?
Get advanced monitoring and evaluation for your LLM applications with these key benefits:
diff --git a/docs/0.1/integrations/anthropic/examples/messages.mdx b/docs/0.1/integrations/anthropic/examples/messages.mdx
index 24754e12..1bf4d688 100644
--- a/docs/0.1/integrations/anthropic/examples/messages.mdx
+++ b/docs/0.1/integrations/anthropic/examples/messages.mdx
@@ -22,6 +22,7 @@ description: 'Monitor Anthropic `messages` API usage for cost, performance & use
message = client.messages.create(
messages=[{ "role": "user", "content": "Hello, Explain LLM Monitoring in one sentence"}],
model="claude-3-opus-20240229",
+ max_tokens=1024
)
print(message.content)
```
@@ -38,6 +39,7 @@ description: 'Monitor Anthropic `messages` API usage for cost, performance & use
stream = client.messages.create(
messages=[{"role": "user", "content": "Hello, Explain LLM Monitoring in one sentence"}],
+ max_tokens=1024,
model="claude-3-opus-20240229",
stream=True,
)
diff --git a/docs/0.1/integrations/cohere/examples/cochat.mdx b/docs/0.1/integrations/cohere/examples/cochat.mdx
index fc07c39d..84718404 100644
--- a/docs/0.1/integrations/cohere/examples/cochat.mdx
+++ b/docs/0.1/integrations/cohere/examples/cochat.mdx
@@ -34,16 +34,15 @@ description: 'Monitor Cohere `chat` API usage for cost, performance & user inter
# Pass the above `co` object along with your Doku Ingester URL and API key and this will make sure that all Cohere calls are automatically tracked.
dokumetry.init(llm=co, doku_url="YOUR_DOKU_INGESTER_URL", api_key="YOUR_DOKU_TOKEN")
- response = co.chat(
+ response = co.chat_steam(
chat_history=[
{"role": "USER", "message": "What is LLM Observability?"},
{"role": "CHATBOT", "message": "The best tool to monitor LLM Applications is Doku!"}
],
message="How to monitor LLM Applications?",
- stream=True,
)
for text in response:
- if text.eventType === "text-generation":
+ if text.event_type === "text-generation":
print(text)
```
</CodeGroup>
diff --git a/docs/0.1/introduction.mdx b/docs/0.1/introduction.mdx
index 57bbac1a..fb716d2a 100644
--- a/docs/0.1/introduction.mdx
+++ b/docs/0.1/introduction.mdx
@@ -3,9 +3,15 @@ title: What is Doku?
description: 'Open-source platform for monitoring and evaluating LLMs at scale'
---
-<Frame>
- <img src="https://github.com/dokulabs/.github/blob/main/profile/assets/doku-client-1.jpg?raw=true" />
-</Frame>
+<iframe
+ width="560"
+ height="315"
+ src="https://www.youtube.com/embed/6jhxVesllEY?si=M8dkLVVE2G7WhmBo"
+ title="Demo: Monitoring LLM Application with Doku"
+ frameborder="0"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; playsinline"
+ allowfullscreen
+></iframe>
Doku is an **open-source LLMOps tool** engineered to enables developers with comprehensive capabilities to monitor, analyze, and optimize LLM applications. It provides valuable real-time data on **LLM usage, performance, and costs**. Through seamless integrations with leading LLM platforms, including OpenAI, Cohere, and Anthropic, Doku acts as a central command center for all your LLM needs. It effectively guides your efforts, ensuring that your LLM applications not only operate at peak efficiency but also scale successfully.
diff --git a/docs/latest/integrations/anthropic/examples/messages.mdx b/docs/latest/integrations/anthropic/examples/messages.mdx
index 24754e12..1bf4d688 100644
--- a/docs/latest/integrations/anthropic/examples/messages.mdx
+++ b/docs/latest/integrations/anthropic/examples/messages.mdx
@@ -22,6 +22,7 @@ description: 'Monitor Anthropic `messages` API usage for cost, performance & use
message = client.messages.create(
messages=[{ "role": "user", "content": "Hello, Explain LLM Monitoring in one sentence"}],
model="claude-3-opus-20240229",
+ max_tokens=1024
)
print(message.content)
```
@@ -38,6 +39,7 @@ description: 'Monitor Anthropic `messages` API usage for cost, performance & use
stream = client.messages.create(
messages=[{"role": "user", "content": "Hello, Explain LLM Monitoring in one sentence"}],
+ max_tokens=1024,
model="claude-3-opus-20240229",
stream=True,
)
diff --git a/docs/latest/integrations/cohere/examples/cochat.mdx b/docs/latest/integrations/cohere/examples/cochat.mdx
index fc07c39d..84718404 100644
--- a/docs/latest/integrations/cohere/examples/cochat.mdx
+++ b/docs/latest/integrations/cohere/examples/cochat.mdx
@@ -34,16 +34,15 @@ description: 'Monitor Cohere `chat` API usage for cost, performance & user inter
# Pass the above `co` object along with your Doku Ingester URL and API key and this will make sure that all Cohere calls are automatically tracked.
dokumetry.init(llm=co, doku_url="YOUR_DOKU_INGESTER_URL", api_key="YOUR_DOKU_TOKEN")
- response = co.chat(
+ response = co.chat_steam(
chat_history=[
{"role": "USER", "message": "What is LLM Observability?"},
{"role": "CHATBOT", "message": "The best tool to monitor LLM Applications is Doku!"}
],
message="How to monitor LLM Applications?",
- stream=True,
)
for text in response:
- if text.eventType === "text-generation":
+ if text.event_type === "text-generation":
print(text)
```
</CodeGroup>
diff --git a/docs/latest/introduction.mdx b/docs/latest/introduction.mdx
index 5a46c275..8c17e069 100644
--- a/docs/latest/introduction.mdx
+++ b/docs/latest/introduction.mdx
@@ -3,9 +3,15 @@ title: What is Doku?
description: 'Open-source platform for monitoring and evaluating LLMs at scale'
---
-<Frame>
- <img src="https://github.com/dokulabs/.github/blob/main/profile/assets/doku-client-1.jpg?raw=true" />
-</Frame>
+<iframe
+ width="560"
+ height="315"
+ src="https://www.youtube.com/embed/6jhxVesllEY?si=M8dkLVVE2G7WhmBo"
+ title="Demo: Monitoring LLM Application with Doku"
+ frameborder="0"
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; playsinline"
+ allowfullscreen
+></iframe>
Doku is an **open-source LLMOps tool** engineered to enables developers with comprehensive capabilities to monitor, analyze, and optimize LLM applications. It provides valuable real-time data on **LLM usage, performance, and costs**. Through seamless integrations with leading LLM platforms, including OpenAI, Cohere, and Anthropic, Doku acts as a central command center for all your LLM needs. It effectively guides your efforts, ensuring that your LLM applications not only operate at peak efficiency but also scale successfully.