Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Mirascope Third Party Integration Docs Page #98

Closed
wants to merge 5 commits into from
Closed

Adding Mirascope Third Party Integration Docs Page #98

wants to merge 5 commits into from

Conversation

willbakst
Copy link
Contributor

  • Added a new third_party/ directory in the docs/integrations/ directory for all future third party integrations.
  • Added the mirascope.md docs page describing the integration to the third_party/ directory.
  • Tried to match existing docs pages wrt. internal links.
  • NOTE: I have purposefully excluded an image for the extraction section since Logfire UI does not yet have Function Calling supported (see Feature Request: Handle Tool Call Assistant Messages For OpenAI (and other providers) #54). I will add that screenshot once that feature is released.

Copy link

codecov bot commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@Kludex
Copy link
Member

Kludex commented May 3, 2024

I don't think I have rights to push to this branch. Can you apply this patch, please?

diff --git a/docs/integrations/third_party/mirascope.md b/docs/integrations/third_party/mirascope.md
index a0e07f89..91ce9b45 100644
--- a/docs/integrations/third_party/mirascope.md
+++ b/docs/integrations/third_party/mirascope.md
@@ -1,5 +1,3 @@
-# Mirascope
-
 [Mirascope](https://github.com/Mirascope/mirascope) is an intuitive approach to building AI-powered applications using LLMs. Their library is the first third party integration with Logfire to make observability and monitoring for LLMs easy and seamless.
 
 You can enable it using their [`@with_logire`](https://docs.mirascope.io/latest/integrations/logfire/#how-to-use-logfire-with-mirascope) decorator, which will work with all of the [model providers that they support](https://docs.mirascope.io/latest/concepts/supported_llm_providers/) (e.g. OpenAI, Anthropic, Groq, and more).
diff --git a/docs/plugins/main.py b/docs/plugins/main.py
index b184ba44..57cf3c9b 100644
--- a/docs/plugins/main.py
+++ b/docs/plugins/main.py
@@ -20,8 +20,8 @@ def on_page_markdown(markdown: str, page: Page, config: Config, files: Files) ->
     markdown = build_environment_variables_table(markdown, page)
     markdown = logfire_print_help(markdown, page)
     markdown = install_logfire(markdown, page)
-    if page.file.src_uri == 'guides/onboarding_checklist/06_add_metrics.md':
-        check_documented_system_metrics(markdown, page)
+    markdown = check_documented_system_metrics(markdown, page)
+    markdown = warning_on_third_party(markdown, page)
     return markdown
 
 
@@ -36,6 +36,9 @@ def check_documented_system_metrics(markdown: str, page: Page) -> str:
 
     This function checks that all the metrics in `DEFAULT_CONFIG` are documented.
     """
+    if page.file.src_uri != 'guides/onboarding_checklist/06_add_metrics.md':
+        return markdown
+
     metrics_documented: set[str] = set()
     for line in markdown.splitlines():
         match = re.search(r'\* `(.*)`: ', line)
@@ -134,3 +137,17 @@ def install_logfire(markdown: str, page: Page) -> str:
     ```
 """
     return re.sub(r'{{ *install_logfire\(.*\) *}}', instructions, markdown)
+
+
+def warning_on_third_party(markdown: str, page: Page) -> str:
+    if not page.file.src_uri.startswith('integrations/third_party/'):
+        return markdown
+
+    note = """
+!!! note "Third-party integrations"
+    Third-party integrations are not officially supported by **Logfire**.
+
+    They are maintained by the community and may not be as reliable as the integrations developed by **Logfire**.
+"""
+
+    return note + markdown

@@ -0,0 +1,83 @@
# Mirascope

[Mirascope](https://github.com/Mirascope/mirascope) is an intuitive approach to building AI-powered applications using LLMs. Their library is the first third party integration with Logfire to make observability and monitoring for LLMs easy and seamless.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the "first third party integration" part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


[Mirascope](https://github.com/Mirascope/mirascope) is an intuitive approach to building AI-powered applications using LLMs. Their library is the first third party integration with Logfire to make observability and monitoring for LLMs easy and seamless.

You can enable it using their [`@with_logire`](https://docs.mirascope.io/latest/integrations/logfire/#how-to-use-logfire-with-mirascope) decorator, which will work with all of the [model providers that they support](https://docs.mirascope.io/latest/concepts/supported_llm_providers/) (e.g. OpenAI, Anthropic, Groq, and more).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We link third party dependencies with mkdocstrings - Do you want to do that, or do you prefer like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this out of habit. Updated to use mkdocstrings instead (like I did for the pydantic links already)

@Kludex Kludex assigned Kludex and unassigned samuelcolvin May 3, 2024
@willbakst
Copy link
Contributor Author

I applied the patch and addressed the comments (but have left things unresolved for you to resolve).

@Kludex please let me know if I missed anything.

@willbakst
Copy link
Contributor Author

@Kludex I just updated the docs to include a screenshot of extraction now that function calling shows up nice and pretty in the UI :)

Copy link
Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem like I can rebase this branch to main. Can you do it?

@Kludex
Copy link
Member

Kludex commented May 6, 2024

I don't know exactly what the problem is with this branch - I'm not sure if it's because it was created on an org's main branch, or I can't edit the branch, but I've copied the commits here to #133.

I'll merge that PR, thanks @willbakst ! :)

@Kludex Kludex closed this May 6, 2024
@willbakst
Copy link
Contributor Author

Ah yeah not sure what the issue was, maybe cause it's a fork? Thanks for taking care of this and merging in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants