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

COM Tool Calling Support #5

Open
rrg92 opened this issue Sep 11, 2024 · 1 comment
Open

COM Tool Calling Support #5

rrg92 opened this issue Sep 11, 2024 · 1 comment

Comments

@rrg92
Copy link
Owner

rrg92 commented Sep 11, 2024

Implement COM Function Calling support, as suggest by p3nGu1nZz in that discord thread:
https://discord.com/channels/879548962464493619/1282446590954569780

many software companies provide these COM files openly on places like github, or distributed along with software which is typical, and sometimes closed for commercial software, orcale for example. you can also make your own COM file for software, but some assembly required. being

# Create a new Word application object
$word = New-Object -ComObject Word.Application

# Make Word visible (optional)
$word.Visible = $true

# Open an existing document
$document = $word.Documents.Open("C:\path\to\your\document.docx")

# Perform some operations, e.g., find and replace text
$find = $word.Selection.Find
$find.Text = "old text"
$find.Replacement.Text = "new text"
$find.Execute([ref]$null, [ref]$null, [ref]$null, [ref]$null, [ref]$null, [ref]$null, [ref]$null, [ref]$null, [ref]$null, [ref]$null, [ref]$null, [ref]$null, [ref]$null, [ref]$null)

# Save the document
$document.SaveAs("C:\path\to\your\new_document.docx")

# Close the document
$document.Close()

# Quit the Word application
$word.Quit()

# Release the COM object
[System.Runtime.InteropServices.Marshal]::ReleaseComObject($word)

most often its a real bore to have to craft these files, and being able to automate these by implementing your service level api for a llm model and scripts like this above are very powerful. in fact i working on building a similar arch in my Tau model that i am working on currently. This is a fantastic way to generate training data, eg, writing scripts to index a plethora of docx and xls and use llm to transform the data into call response format in the appropiate domain and context, anyways powershai could be a nice tool for this

@rrg92 rrg92 changed the title COM Functiona Calling Support COM Tool Calling Support Sep 11, 2024
@p3nGu1nZz
Copy link

looks good! Thats pretty much what I was trying to get across. I usually end up writing these scripts in ps or bat files which is less than ideal, Codify this process would be rad.

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

No branches or pull requests

2 participants