Giter VIP home page Giter VIP logo

vishwa-ml-sdk's Introduction

Welcome to vishwa.ai (formerly xpuls.ai) ๐Ÿ‘‹

vishwa-ml-sdk

Twitter Follow Discord

PyPI version GitHub version

Roadmap ๐Ÿš€

Framework Status
Langchain โœ…
LLamaIndex Planned
PyTorch Planned
SKLearn Planned
Transformers Planned
Stable Diffusion Next

๐Ÿ’ก If support of any framework/feature is useful for you, please feel free to reach out to us via Discord or Github Discussions

๐Ÿ”— Installation

  1. Install from PyPI
pip install vishwa-ml-sdk

๐Ÿงฉ Usage Example

from vishwa.mlmonitor.langchain.instrument import LangchainTelemetry
import os
import vishwa
from vishwa.prompt_hub import PromptClient

# Enable this for advance tracking with our vishwa-ai platform
vishwa.host_url = "https://api.vishwa.ai"
vishwa.api_key = "********************"  # Get from https://platform.vishwa.ai
vishwa.adv_tracing_enabled = "true" # Enable this for automated insights and log tracing via xpulsAI platform
# Add default labels that will be added to all captured metrics
default_labels = {"service": "ml-project-service", "k8s_cluster": "app0", "namespace": "dev", "agent_name": "fallback_value"}

# Enable the auto-telemetry
LangchainTelemetry(default_labels=default_labels,).auto_instrument()
prompt_client = PromptClient(   
    prompt_id="clrfm4v70jnlb1kph240",  # Get prompt_id from the platform
    environment_name="dev"  # Deployed environment name
)

## [Optional] Override labels for scope of decorator [Useful if you have multiple scopes where you need to override the default label values]
@TelemetryOverrideLabels(agent_name="chat_agent_alpha")
@TagToProject(project_slug="defaultoPIt9USSR")  # Get Project Slug from platform
def get_response_using_agent_alpha(prompt, query):
    agent = initialize_agent(llm=chat_model,
                             verbose=True,
                             agent=CONVERSATIONAL_REACT_DESCRIPTION,
                             memory=memory)
    
    data = prompt_client.get_prompt({"variable-1": "I'm the first variable"})  # Substitute any variables in prompt

    res = agent.run(data) # Pass the entire `XPPrompt` object to run or invoke method

โ„น๏ธ Complete Usage Guides

๐Ÿงพ License

This project is licensed under the Apache License 2.0. See the LICENSE file for more details.

๐Ÿ“ข Contributing

We welcome contributions to xpuls-ml-sdk! If you're interested in contributing.

If you encounter any issues or have feature requests, please file an issue on our GitHub repository.

๐Ÿ’ฌ Get in touch

๐Ÿ‘‰ Join our Discord community!

๐Ÿฆ Follow the latest from vishwa.ai team on Twitter @vishwa_ai

๐Ÿ“ฎ Write to us at [email protected]

vishwa-ml-sdk's People

Contributors

sharantangeda avatar brant-lzh avatar

Stargazers

Ajinkya avatar  avatar  avatar  avatar Twinkle0057 avatar  avatar  avatar  avatar  avatar  avatar  avatar Anunay Biswas avatar Ahsas Wadhwa avatar  avatar Kartheek Akella avatar Shitty Girl avatar  avatar Kaushik B avatar Sampan S Nayak avatar

Watchers

 avatar

vishwa-ml-sdk's Issues

bug: `model_copy` attribute is not found in LangchainChainMetrics

Describe the bug

a7' ai_version=<AzureChatOpenAIVersion.GPT_4: 'GPT_4'>
2023-09-13T00:25:29.705816957+05:30 Error in CallbackHandler.on_chain_end callback: 'LangchainChainMetrics' object has no attribute 'model_copy'
2023-09-13T00:25:38.995718562+05:30 Error in CallbackHandler.on_chain_end callback: 'LangchainChainMetrics' object has no attribute 'model_copy'
2023-09-13T00:25:38.996041159+05:30 Error in CallbackHandler.on_chain_end callback: 'LangchainChainMetrics' object has no attribute 'model_copy'

To reproduce

No response

Expected behavior

No response

feature: support agent invoke and ainvoke

Feature request

Hello!
I've been working with this project and found its patching of run and arun agent functions extremely useful.
I suggest extending the patching to include ainvoke and invoke methods.

Thanks

Motivation

No response

Other

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.