I gave it training data for C# API, and DesignScript, not just Python, but that will need further testing.
Should I limit the coaching output and try to make it spit out mostly code?
These are its instructions:
Assistant is an expert in programming Autodesk Revit versions 2022 and newer, with a strong emphasis on C Sharp, Python 3, DesignScript, and using nodes for Dynamo. It offers specialized guidance, code examples, and troubleshooting advice for these programming languages and tools, specifically tailored to Revit's newer versions. The GPT provides detailed explanations and practical solutions for programming challenges in Revit, helping users optimize their workflow through efficient and innovative use of the Revit API, DesignScript, Python, and Dynamo nodes. It keeps up-to-date with the latest features and best practices for Revit 2022 and beyond.
Hotkeys for this GPT:
h : Show hotkeys for this GPT
c : Show complete code without comments or empty lines, do not write any explanation outside of the code itself. Show code in language being discussed: cpython3, DesignScript, or C#.
e : Explain the concept being discussed
i : Show Instructions for this GPT
Yes, GPTs only are accessible to subscribers of GPT Plus at $20/mo.
What I have been saying since I subscribed, is that I cannot afford not to pay it. It has capabilities to help my consultancy with a much higher value than that.
For example, I wanted something that will Zip a folder with a timestamp in the Zip filename. I used the Grimoire GPT and it wrote the whole app in python in a few prompts.
Nice Work! Was also planning to do that.
Will test your GPT. First tests show same common mistakes that GPT4 is making. So I think this just needs more content for training.
Two questions:
Can you try to force full code output instead of code snippets with filler comments?
Try typing “c” has a hotkey. c : Show complete code without comments or empty lines, do not write any explanation outside of the code itself. Show code in language being discussed: cpython3, DesignScript, or C#.
You can also emphasize than in your prompts.
Could you use any open source GPT platform? I have tried it on ms copilot-
import clr
clr.AddReference('RevitAPI')
clr.AddReference('RevitServices')
from Autodesk.Revit.DB import *
from RevitServices.Persistence import DocumentManager
# Get the current Revit document
doc = DocumentManager.Instance.CurrentDBDocument
# Placeholder for retrieving elements
from Revit
# Replace these with actual calls to get elements from your Revit model
nodes = [] # Your code to get nodes
edges = [] # Your code to get edges with weights
# Define Dijkstra's algorithm
def dijkstra(graph, start):
shortest_paths = {start: (None, 0)}
current_node = start
visited = set()
while current_node is not None:
visited.add(current_node)
destinations = graph[current_node]
weight_to_current_node = shortest_paths[current_node][1]
for next_node, weight in destinations.items():
weight = weight_to_current_node + weight
if next_node not in shortest_paths:
shortest_paths[next_node] = (current_node, weight)
else:
current_shortest_weight = shortest_paths[next_node][1]
if current_shortest_weight > weight:
shortest_paths[next_node] = (current_node, weight)
next_destinations = {node: shortest_paths[node] for node in shortest_paths if node not in visited}
if not next_destinations:
return shortest_paths
current_node = min(next_destinations, key=lambda k: next_destinations[k][1])
return shortest_paths
# Example usage
graph = {
'A': {'B': 1, 'C': 4},
'B': {'A': 1, 'C': 2, 'D': 5},
'C': {'A': 4, 'B': 2, 'D': 1},
'D': {'B': 5, 'C': 1}
}
start_node = 'A'
shortest_paths = dijkstra(graph, start_node)
print(shortest_paths)
One can write specialized chatbots with vector databases and text search, but it is rather complicated. I have been doing that for building specifications, etc.