Skip to main content

A multi-provider Python code execution and dependency management agent

Project description

CodeAgent

Help To Automate Code For Your Projects Using LLM

Install Dependency

 pip install -r requirements.txt

Initize Agent Using Proplexity API

from CodeAgent  import CodeAgent
from CodeAgentV2  import CodeAgent 
from CodeAgentV3  import CodeAgent

agent = CodeAgent("<apikey>")

if code agent v1 is just generate and run python project (provider="proplexity") if code agent v2 is just generate and run python project (provider="proplexity","gemini") (dependency Manager) if code agent v2 is just generate and run python project (provider=multiple providers) (dependency Manager) (multimodal also)

Just Generate Using Prompt

agent.generate(
    "Explain About Artificial Intelligence"
).json()

To Automate Flow - Example Project

prompt = """
 You are Ai Agent . You will able to code like ai research scientist

 Code For SmolAgents

Instructions :

  1) Agent should answer tech related questions
  2) Execution not supported
  3) Give only Code
  4) python only support
  5) Should Consider doc string


 user:  Building embedding model using contrastive learning . MultiModal embedding model ( Image + Text)

 Dataset Link and Description :
   Kaggle creadiential also settled up and

   load dataset


    ```python
    !mkdir -p /root/.kaggle
    !cp kaggle.json /root/.kaggle
    !chmod 600 /root/.kaggle/kaggle.json
    !kaggle datasets download paramaggarwal/fashion-product-images-small

    ```


  dataset load using python :

  import pandas as pd

  df = pd.read_csv("/content/myntradataset/styles.csv",on_bad_lines="skip")
  df.head()

  id	gender	masterCategory	subCategory	articleType	baseColour	season	year	usage	productDisplayName
  0	15970	Men	Apparel	Topwear	Shirts	Navy Blue	Fall	2011.0	Casual	Turtle Check Men Navy Blue Shirt
  1	39386	Men	Apparel	Bottomwear	Jeans	Blue	Summer	2012.0	Casual	Peter England Men Party Blue Jeans
  2	59263	Women	Accessories	Watches	Watches	Silver	Winter	2016.0	Casual	Titan Women Silver Watch
  3	21379	Men	Apparel	Bottomwear	Track Pants	Black	Fall	2011.0	Casual	Manchester United Men Solid Black Track Pants
  4	53759	Men	Apparel	Topwear	Tshirts	Grey	Summer	2012.0	Casual	Puma Men Grey T-shirt


  Use HuggingfacePretrained Bert and VIT model for embedding model and Use Torch and langchain(if needed)

  Embedding Model Train Using Contrastive Learning with Evaluation and Testing

  Save Best Model and load it for inference Then Save Log File also

  Progress bar using tqdm and cuda support

  Give me a full final code



"""

To Start Runing And Bebugging

agent(prompt)

To V3 Version:

agent = CodeAgent(
    gemini_apikey="AIzaSyDebfxNkbpWrQ7wRmdvxt53_uikm1-ZySU",
    provider= "gemini"
)
result = agent({
    "text": "Write a Python script to plot.save in ./plot.png",
    "images": ["/content/Loss.png","/content/Accuracy.png"]
})
print(result)

*** outputs are Stored Local Folders ***

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

c4agent-0.1.2.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

c4agent-0.1.2-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file c4agent-0.1.2.tar.gz.

File metadata

  • Download URL: c4agent-0.1.2.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for c4agent-0.1.2.tar.gz
Algorithm Hash digest
SHA256 025fbb5d703ccb48e1e1517c93f0d8ca5388dfed30733c3e30e3e13c686381d1
MD5 444610ff2f2389d76722a764ed4004c5
BLAKE2b-256 752756696d21340d8881d38f37318581ea0a4377788bf0cfa20a39cc26581a9c

See more details on using hashes here.

File details

Details for the file c4agent-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: c4agent-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for c4agent-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5da68ec99fc5f8666653d9d5c9ebab35c24cc4fc0807f186e681ef3823d5a232
MD5 b0cc34f04c1a27f20807cc16157251c4
BLAKE2b-256 d54678b998eada9d463360ee831953e0edea96df3a52c86f9825188fa84f1dca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page